Recently, a security issue related to orig_x0 was discovered and fixed in arm64, but there are still no test cases covering it. Seccomp, tracepoints, and audit can observe a stale value for x0 after a ptracer or SECCOMP_RET_TRACE modifies x0.
As Kees suggested, this series adds two kselftests for arm64 that validate the orig_x0 re-synchronisation fix in ptrace, the first one is for ptrace update, the second one is for SECCOMP_RET_TRACE update. Link: https://lore.kernel.org/all/[email protected]/ Link: https://lore.kernel.org/all/202607152004.DEA95D63@keescook/ Jinjie Ruan (2): kselftest/arm64: Add seccomp ptrace x0 bypass test kselftest/arm64: Add SECCOMP_RET_TRACE x0 bypass test tools/testing/selftests/arm64/abi/.gitignore | 2 + tools/testing/selftests/arm64/abi/Makefile | 2 +- .../arm64/abi/seccomp_ptrace_x0_bypass.c | 181 +++++++++++++ .../arm64/abi/seccomp_ret_trace_x0_bypass.c | 249 ++++++++++++++++++ 4 files changed, 433 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/arm64/abi/seccomp_ptrace_x0_bypass.c create mode 100644 tools/testing/selftests/arm64/abi/seccomp_ret_trace_x0_bypass.c -- 2.34.1

