FS#36846 - [linux] enable CONFIG_SECURITY_YAMA
Attached to Project:
Arch Linux
Opened by Travis Kendrick (pouar) - Monday, 09 September 2013, 23:52 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 31 January 2014, 12:42 GMT
Opened by Travis Kendrick (pouar) - Monday, 09 September 2013, 23:52 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 31 January 2014, 12:42 GMT
|
Details
yama is a new security module introduced in 3.4 which has
the ability to restrict ptrace, which could prevent some
malware from running. Could you enable it
|
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Friday, 31 January 2014, 12:42 GMT
Reason for closing: Implemented
Friday, 31 January 2014, 12:42 GMT
Reason for closing: Implemented
Common debugging situtaion is:
./someProgram &
ps ax | grep someProgram
gdb attach pid
This will not work unless I become root to attach to process which I'm trying to debug or I manually disable yama.
or use "sysctl kernel.yama.ptrace_scope=0" to disable it temporarily, or maybe use "setcap cap_sys_ptrace=eip /usr/bin/gdb"
What worries me is that people (eg. students) will install gdb for the first time and then get unexpected behaviour of debugger not working as advertised and give up.
Could we make it somehow that when gdb is installed it automatically either disables yama or does setcap magic?
* CONFIG_DEFAULT_SECURITY_YAMA is not set and by defualt /proc/sys/kernel/yama/ptrace_scope is 0, so yama is disabled by default.
* Yama can be enforced by setting the above sysctl parameter to 1, 2 or 3.
So, I'd close this bugreport...
I probably would too.
CONFIG_SECURITY_YAMA=y
CONFIG_SECURITY_YAMA_STACKED=y
In /usr/lib/modules/3.13.0-2-ARCH/build/.config
(also fonud at) https://projects.archlinux.org/svntogit/packages.git/tree/trunk/config.x86_64?h=packages/linux
Please reopen again and fix this.