aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorJann Horn <[email protected]>2022-03-19 01:08:37 +0000
committerEric W. Biederman <[email protected]>2022-03-22 18:06:05 +0000
commitee1fee900537b5d9560e9f937402de5ddc8412f3 (patch)
tree7a1faba78812c3d8e884671d9e28cdd7540c1142 /tools/perf/util/scripting-engines/trace-event-python.c
parentptrace: Return the signal to continue with from ptrace_stop (diff)
downloadkernel-ee1fee900537b5d9560e9f937402de5ddc8412f3.tar.gz
kernel-ee1fee900537b5d9560e9f937402de5ddc8412f3.zip
ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
Setting PTRACE_O_SUSPEND_SECCOMP is supposed to be a highly privileged operation because it allows the tracee to completely bypass all seccomp filters on kernels with CONFIG_CHECKPOINT_RESTORE=y. It is only supposed to be settable by a process with global CAP_SYS_ADMIN, and only if that process is not subject to any seccomp filters at all. However, while these permission checks were done on the PTRACE_SETOPTIONS path, they were missing on the PTRACE_SEIZE path, which also sets user-specified ptrace flags. Move the permissions checks out into a helper function and let both ptrace_attach() and ptrace_setoptions() call it. Cc: [email protected] Fixes: 13c4a90119d2 ("seccomp: add ptrace options for suspend/resume") Signed-off-by: Jann Horn <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Eric W. Biederman <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions