Blame config/10-default-yama-scope.conf

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