selftests/seccomp: Test PTRACE_O_SUSPEND_SECCOMP without CAP_SYS_ADMIN
authorJann Horn <jannh@google.com>
Sat, 19 Mar 2022 01:08:38 +0000 (02:08 +0100)
committerKees Cook <keescook@chromium.org>
Fri, 29 Apr 2022 18:28:42 +0000 (11:28 -0700)
commitd250a3e4e5b41d9d805a8bfd2458b548d1681742
treeaea2bb12ebaa5f47a49b0a0eee64efe1c4d9e6ca
parent2bfed7d2ffa5d86c462d3e2067f2832eaf8c04c7
selftests/seccomp: Test PTRACE_O_SUSPEND_SECCOMP without CAP_SYS_ADMIN

Add a test to check that PTRACE_O_SUSPEND_SECCOMP can't be set without
CAP_SYS_ADMIN through PTRACE_SEIZE or PTRACE_SETOPTIONS.

Signed-off-by: Jann Horn <jannh@google.com>
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
tools/testing/selftests/seccomp/Makefile
tools/testing/selftests/seccomp/seccomp_bpf.c