|
Packit |
032894 |
# When yama is enabled in the kernel it might be used to filter any user
|
|
Packit |
032894 |
# space access which requires PTRACE_MODE_ATTACH like ptrace attach, access
|
|
Packit |
032894 |
# to /proc/PID/{mem,personality,stack,syscall}, and the syscalls
|
|
Packit |
032894 |
# process_vm_readv and process_vm_writev which are used for interprocess
|
|
Packit |
032894 |
# services, communication and introspection (like synchronisation, signaling,
|
|
Packit |
032894 |
# debugging, tracing and profiling) of processes.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# Usage of ptrace attach is restricted by normal user permissions. Normal
|
|
Packit |
032894 |
# unprivileged processes cannot interact through ptrace with processes
|
|
Packit |
032894 |
# that they cannot send signals to or processes that are running set-uid
|
|
Packit |
032894 |
# or set-gid.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# yama ptrace scope can be used to reduce these permissions even more.
|
|
Packit |
032894 |
# This should normally not be done because it will break various programs
|
|
Packit |
032894 |
# relying on the default ptrace security restrictions. But can be used
|
|
Packit |
032894 |
# if you don't have any other way to separate processes in their own
|
|
Packit |
032894 |
# domains. A different way to restrict ptrace is to set the selinux
|
|
Packit |
032894 |
# deny_ptrace boolean. Both mechanisms will break some programs relying
|
|
Packit |
032894 |
# on the ptrace system call and might force users to elevate their
|
|
Packit |
032894 |
# priviliges to root to do their work.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# For more information see Documentation/security/Yama.txt in the kernel
|
|
Packit |
032894 |
# sources. Which also describes the defaults when CONFIG_SECURITY_YAMA
|
|
Packit |
032894 |
# is enabled in a kernel build (currently 1 for ptrace_scope).
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# This runtime kernel parameter can be set to the following options:
|
|
Packit |
032894 |
# (Note that setting this to anything except zero will break programs!)
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# 0 - Default attach security permissions.
|
|
Packit |
032894 |
# 1 - Restricted attach. Only child processes plus normal permissions.
|
|
Packit |
032894 |
# 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE.
|
|
Packit |
032894 |
# 3 - No attach. No process may call ptrace at all. Irrevocable.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
kernel.yama.ptrace_scope = 0
|
|
Packit |
032894 |
|