From bc55732c55a0c854f6e3c3cc40efd603907ecdcb Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 15 Mar 2022 17:05:22 +0000 Subject: deploy: 33d74c3b33394769a2040ff451fbfdfd58e9bf92 --- linux/ptrace_scope.html | 238 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 linux/ptrace_scope.html (limited to 'linux/ptrace_scope.html') diff --git a/linux/ptrace_scope.html b/linux/ptrace_scope.html new file mode 100644 index 0000000..cac4361 --- /dev/null +++ b/linux/ptrace_scope.html @@ -0,0 +1,238 @@ + + + + + + ptrace_scope - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

ptrace_scope

+

In case the kernel was compiled with the yama security module +(CONFIG_SECURITY_YAMA), tracing processes with ptrace(2) can be restricted.

+
/proc/sys/kernel/yama/ptrace_scope
+    0 => No restrictions.
+    1 => Restricted attach, only the following can attach
+            - A process in the parent hierarchy.
+            - A process with CAP_SYS_PTRACE.
+            - A process with the PID that the tracee allowed by via
+              PR_SET_PTRACER.
+    2 => Only processes with CAP_SYS_PTRACE in the user namespace of the tracee
+         can attach.
+    3 => No tracing allowed.
+
+

Further details in ptrace(2).

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3