Skip to main content
← All vulnerabilities
CVE-2026-93167

csky: Fix a4/a5 restoration in syscall trace path

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 5.5, 5.7, 5.10.270, 5.15.221, 6.1.188, and 4 more
None on Exploit-DB, Metasploit or GitHub

Summary

In the Linux kernel, the following vulnerability has been resolved: csky: Fix a4/a5 restoration in syscall trace path The syscall trace path reloads syscall arguments from pt_regs before calling the syscall handler. On C-SKY ABIv2, the 5th and 6th syscall arguments are prepared as stack arguments before invoking syscallid. The current code adjusts sp before loading LSAVE_A4 and LSAVE_A5. Since those offsets are relative to the original pt_regs base, loading them after changing sp fetches the wrong slots. As a result, traced syscalls that use the 5th or 6th argument may receive corrupted arguments. This is visible with mmap2(), which takes six arguments. A small PTRACE_SYSCALL reproducer opens a file and maps one page with: mmap(NULL, 4096, PROT_READ | PROT_EXEC, MAP_PRIVATE, fd, 0) Before the fix, the traced child fails the mmap and exits with 12. After the fix, the mapping succeeds and the child exits with 0. Fix the trace path by loading a4/a5 from pt_regs before changing sp. Tested on: ck860f, linux-4.19.15, C-SKY abiv2

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • Linux Linux

    From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in e9ae8e86eed68bea5d2670eadf61938a43bd2263; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in 64e3ec7a71d3b715e2567f19f64207f04999bb0c; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in 863fa63fd1491f201ac819f805a8db98d2a32c3d; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in e71a3dc5b8d2ea4d9cfbdb135d6b7777de84212e; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in 31c81b376e5f058c7f2c94f69719cf7caec2fc3f; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in a776afa89424570bfa637ebf812ca281a5732904; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in 343aa5275484d627c921a42e8e115cae366be5de; From e0bbb53843b5fdfe464b099217e3b9d97e8a75d7 · fixed in abb81e5ce7d995baa41556b8125fa59e28ba3be8; From 5.4.47 · fixed in 5.5; From 5.6.19 · fixed in 5.7

  • Linux Linux

    5.7

  • KernelLinux

    From 5.7.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6

References 8

git.kernel.org