ptrace and most proc files should be inaccessible to users if binary is not readable #160
Labels
area: filesystem
Issue related to filesystem
exported
Issue was exported automatically
priority: p3
Low priority
revived
The Issue has been revived by the issue reviver.
type: bug
Something isn't working
type: cleanup
Refactorings and cleanups to improve the code
Calling execve on a binary with execute permissions but no read permissions is allowed. However, the resulting task is marked non-dumpable[1] by the kernel.
This affects __ptrace_may_access[2], which enforces access by ptrace and to many proc files.
Basically, execute-no-read binaries are a subset of typical setuid binaries.
[1] https://elixir.bootlin.com/linux/v5.0.4/source/fs/exec.c#L1316
[2] https://elixir.bootlin.com/linux/v5.0.4/source/kernel/ptrace.c#L327
The text was updated successfully, but these errors were encountered: