Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERL-{375,376,378,379,381}: Ensure various sysctl parameters are set #50

Merged
merged 5 commits into from
Sep 14, 2023

Conversation

IsaacJT
Copy link
Collaborator

@IsaacJT IsaacJT commented Sep 11, 2023

This sets the following sysctl parameters across all projects:

  • vm.overcommit_memory=2
  • kernel.randomize_va_space=2
  • kernel.kptr_restrict=1
  • kernel.yama.ptrace_scope=1

Additionally, it adds a spread test to ensure that these are set in the resulting images.

Signed-off-by: Isaac True <isaac.true@canonical.com>
This enables restricted ptrace access, meaning a process must have a
predefined relationship with the inferior it wants to call PTRACE_ATTACH on.

Signed-off-by: Isaac True <isaac.true@canonical.com>
This setting only allows privileged users to view the kernel memory addresses.

Signed-off-by: Isaac True <isaac.true@canonical.com>
This enables all kernel address space randomisation features.

Signed-off-by: Isaac True <isaac.true@canonical.com>
This setting disables memory overcommit.

Signed-off-by: Isaac True <isaac.true@canonical.com>
@IsaacJT
Copy link
Collaborator Author

IsaacJT commented Sep 11, 2023

Hi @ahresse and @m-kat can you please both review this :)

@IsaacJT IsaacJT added this to the NemOS Cycle 8 milestone Sep 11, 2023
Copy link

@m-kat m-kat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@IsaacJT IsaacJT merged commit f4ad4f6 into master Sep 14, 2023
6 checks passed
@IsaacJT IsaacJT deleted the ERL-375-376-378-379-381 branch September 14, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants