Skip to content

Restrict ptrace attach to privileged users#193

Merged
schurzi merged 3 commits into
masterfrom
yama_ptrace
May 26, 2026
Merged

Restrict ptrace attach to privileged users#193
schurzi merged 3 commits into
masterfrom
yama_ptrace

Conversation

@schurzi
Copy link
Copy Markdown
Contributor

@schurzi schurzi commented May 24, 2026

This pull request adds a new security control to the sysctl_spec.rb file to ensure that only privileged users can use ptrace to attach to processes. This helps prevent unprivileged users from interfering with or inspecting other processes, enhancing system security.

Security hardening:

  • Added a control (sysctl-35) to verify that the kernel.yama.ptrace_scope parameter is set to at least 2, restricting ptrace attach operations to privileged users.

@schurzi schurzi linked an issue May 24, 2026 that may be closed by this pull request
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
Comment thread controls/sysctl_spec.rb Outdated
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
@schurzi schurzi merged commit 0d4644e into master May 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ptrace should be disabled or admin-only

2 participants