-
Notifications
You must be signed in to change notification settings - Fork 51
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
Disable the usage of ptrace()
by all processes
#242
Conversation
Being restricted to |
It probably is for most purposes but one flaw in the current approach is that it can be changed through If set to I think this is a very important reduction in attack surface as it will require someone to change the actual configuration files and reboot to enable |
But that's okay because that requires root and for now, as soon as root is compromised it's considered game over anyhow? |
Yes and no. While obtaining root is obviously game over, in the same way as a root user you can not turn off CPU mitigations until reboot, I think This will be a good form of defence-in-depth as any user that is considering changing it will as a byproduct be educated on its purpose and it is restricted. There are plenty of online forum tutorials dealing with broken applications that all suggest enabling This is particularly important on desktop Linux as enabling |
There are probably a ton of settings which are unsafe to change. If there was an option to lock all settings until reboot (I think there is not), should we do that? User education by locking settings and requiring reboot seems out-of-scope of security-misc. Related:
|
Ok I think I understand your reasoning and agree that educating users by locking till a reboot is outside the scope of security-misc. While I still personally think that I have reverted the commit and posted a link to this PR so that this discussion can be logged for future reference. |
As an additional reference, KSPP also currently recommends disabling the usage of |
Upgrade existing
sysctl
to now disableptrace()
usage by all processes.Previously it was restricted to users with
CAP_SYS_PTRACE
.It is unlikely that this would cause significantly more software breakages than the previous setting.
Needs to be thoroughly tested before being upgraded.
Changes
kernel.yama.ptrace_scope=2
to
kernel.yama.ptrace_scope=3
Mandatory Checklist
Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint
Optional Checklist
The following items are optional but might be requested in certain cases.