Linux
arm64: ptrace: Keep 'orig_x0' in-sync with x0 on syscall entry
In the Linux kernel, the following vulnerability has been resolved: arm64: ptrace: Keep 'orig_x0' in-sync with x0 on syscall entry Commit e057b9477232 ("arm64: syscall: Ensure saved x0 is kept in-sync with tracer updates") attempted to resolve a long-standing issue with syscall entry tracing, where a tracer is able to manipulate the first syscall argument without being subjected to seccomp or audit checking. Unfortunately, that fix was incomplete [1], as it failed to update 'orig_x0' between a tracer updating x0 during a seccomp ptrace exit (SECCOMP_RET_TRACE) and the seccomp filter being re-evaluated. Rather than add hooks to the core seccomp code, instead move the synchronisation code into the ptrace GPR and syscall setting code so that 'orig_x0' is kept up to date with x0 whenever we're stopped on the syscall entry path.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= a5cd110cb8369d6b37ef5ccfe56b3fa1338c9615, < a9e7743b1067ea38c4ad2665d40c3c4a920ad9a9
- >= a5cd110cb8369d6b37ef5ccfe56b3fa1338c9615, < 332c9c1a148d0425326989c1187face8f6b2a60c
- >= a5cd110cb8369d6b37ef5ccfe56b3fa1338c9615, < ce17c651a90e242ad48df0df89b1e4cebcda5e14
- >= a5cd110cb8369d6b37ef5ccfe56b3fa1338c9615, < e9e2854fcff5733ffc607e8ecc87e0e591ab41fd
- >= a5cd110cb8369d6b37ef5ccfe56b3fa1338c9615, < f433869f23841a50455c4087d85540d5b4d37cde
- >= a5cd110cb8369d6b37ef5ccfe56b3fa1338c9615, < 88b839ce497ccb1ff92f7ae742c78dd2937ba572
Fixed in a9e7743b1067ea38c4ad2665d40c3c4a920ad9a9, 332c9c1a148d0425326989c1187face8f6b2a60c, ce17c651a90e242ad48df0df89b1e4cebcda5e14, e9e2854fcff5733ffc607e8ecc87e0e591ab41fd, f433869f23841a50455c4087d85540d5b4d37cde, 88b839ce497ccb1ff92f7ae742c78dd2937ba572
- 4.8
Fixed in 0, 6.1.191, 6.6.160, 6.12.114, 6.18.57, 7.2.6, 7.3
Mitigation
Upgrade Linux to a9e7743b1067ea38c4ad2665d40c3c4a920ad9a9 or 332c9c1a148d0425326989c1187face8f6b2a60c or ce17c651a90e242ad48df0df89b1e4cebcda5e14 or e9e2854fcff5733ffc607e8ecc87e0e591ab41fd or f433869f23841a50455c4087d85540d5b4d37cde or 88b839ce497ccb1ff92f7ae742c78dd2937ba572 or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.114 or 6.18.57 or 7.2.6 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.