currently CrOS enables the YAMA LSM which means "ptrace_scope" defaults to "1". from the docs:
https://www.kernel.org/doc/Documentation/security/Yama.txt
1 - restricted ptrace: a process must have a predefined relationship
with the inferior it wants to call PTRACE_ATTACH on. By default,
this relationship is that of only its descendants when the above
classic criteria is also met. To change the relationship, an
inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare
an allowed debugger PID to call PTRACE_ATTACH on the inferior.
Using PTRACE_TRACEME is unchanged.
2 - admin-only attach: only processes with CAP_SYS_PTRACE may use ptrace
with PTRACE_ATTACH, or through children calling PTRACE_TRACEME.
3 - no attach: no processes may use ptrace with PTRACE_ATTACH nor via
PTRACE_TRACEME. Once set, this sysctl value cannot be changed.
we should be able to increase this to 2 on CrOS systems. lets investigate!
Comment 1 by sheriffbot@chromium.org
, Nov 16Status: Untriaged (was: Available)