KernelScan.io

HIGH Introduced in 4.8

arm64 PtraceSeccomp Bypass

CVE-2026-68171

CVSS 7.8 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: arm64: syscall: Ensure saved x0 is kept in-sync with tracer updates When seccomp support was originally added to arm64 in a1ae65b21941 ("arm64: add seccomp support"), seccomp was erroneously called _before_ the ptrace syscall-enter-stop and therefore the tracer could trivially manipulate the syscall register state after the seccomp check had passed. This was subsequently fixed in a5cd110cb836 ("arm64/ptrace: run seccomp after ptrace") by moving the seccomp check after the tracer has run. Unfortunately, a decade later, that fix has been reported to be incomplete. On arm64, both the first argument to a syscall and its eventual return value are allocated to register x0. In order to facilitate syscall restarting and querying of syscall arguments on the syscall exit path, the original value of x0 is stashed in 'struct pt_regs::orig_x0' early during the syscall entry path and is returned for the first argument by syscall_get_arguments(). Unlike 32-bit Arm, this stashed value is not directly exposed via ptrace() and so changes to register x0 made by the tracer on a syscall-enter-stop are not reflected in 'orig_x0'. This means that seccomp, syscall tracepoints and audit can observe a stale value for the register compared to the argument that will be observed by the actual syscall. Re-sync 'orig_x0' from x0 on the syscall entry path following a potential ptrace stop (i.e. PTRACE_EVENTMSG_SYSCALL_ENTRY or SECCOMP_RET_TRACE). This behaviour is limited to native tasks (because compat tasks expose 'orig_r0' to ptrace) where the syscall is not being skipped (because x0 is updated to hold the return value of -ENOSYS in that case).

02

Engine v0.6.0

Risk summary

On arm64 systems, a ptrace tracer can modify a syscall's first argument after seccomp has already checked the stale saved copy, allowing seccomp argument-based filtering to be bypassed. Any local process that can ptrace a target (typically same UID) can exploit this to execute syscalls with arguments that seccomp would have blocked. This undermines sandboxing on arm64 systems that rely on seccomp for syscall restriction, including container runtimes and security monitors.

Affectedarch/arm64/kernel/ptrace.c (arm64 syscall/ptrace)

Vulnerability analysis

On arm64, the first syscall argument and the syscall return value share register x0, so the original argument is saved separately early in syscall entry. When a ptrace tracer modifies x0 during a syscall-enter-stop, that saved copy is not updated, so seccomp, audit, and tracepoints all inspect the original stale value while the actual syscall executes with the tracer's modified argument. This lets a ptracer bypass seccomp argument filtering — seccomp approves the syscall based on the old argument, but the kernel dispatches it with the new one. The fix re-syncs the saved argument from the live register after every point where a tracer could have modified it, so all downstream checks and the syscall itself see the same value. This is reachable locally by any process that can ptrace the target (typically same UID or CAP_SYS_PTRACE), on arm64 systems where seccomp is in use.

03

BranchIntroducedFixed inPatch commit
6.124.86.12.101b7afd2a80593
5.154.85.15.2166b3325c5ed1c
6.14.86.1.183c0d3627c4383
6.184.86.18.4264ab0964c7db
5.104.85.10.265d30c5f9c3b97
mainline4.87.2-rc5e057b9477232
7.14.87.1.6e59c2476ef75
6.64.86.6.1488000a5f4d1d1