xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.12.110, 6.18.36, 7.0.13
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata() The TX metadata area resides in the UMEM buffer which is memory-mapped and concurrently writable by userspace. In xsk_skb_metadata(), csum_start and csum_offset are read from shared memory for bounds validation, then read again for skb assignment. A malicious userspace application can race to overwrite these values between the two reads, bypassing the bounds check and causing out-of-bounds memory access during checksum computation in the transmit path. Fix this by reading csum_start and csum_offset into local variables once, then using the local copies for both validation and assignment. Note that other metadata fields (flags, launch_time) and the cached csum fields may be mutually inconsistent due to concurrent userspace writes, but this is benign: the only security-critical invariant is that each field's validated value is the same one used, which local caching guarantees.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 48eb03dd26304c24f03bdbb9382e89c8564e71df · fixed in eb778aed8a9b2381668fcb1247ae4fa011224768; From 48eb03dd26304c24f03bdbb9382e89c8564e71df · fixed in 0dfe05b938435892875e07771170051346412df9; From 48eb03dd26304c24f03bdbb9382e89c8564e71df · fixed in bfdfd2706d5fb2cd496a1506e680daf979309c8b; From 48eb03dd26304c24f03bdbb9382e89c8564e71df · fixed in 22ba97ea9cc1f63a0d0244fae38057ed452b6ac7
- Linux Linux
6.8
- KernelLinux
From 6.8.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.36; From 6.19.0 · fixed in 7.0.13