bpf: Reject MEM_ALLOC BTF accesses past object bounds
- 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.6.160, 6.12.114, 6.18.57, 7.2.6
- 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
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject MEM_ALLOC BTF accesses past object bounds BTF struct walks relax the struct-size check for accesses through a trailing flexible array. That is valid for ordinary BTF type walking, but PTR_TO_BTF_ID | MEM_ALLOC values point to objects allocated with the static BTF type size. When walking a MEM_ALLOC object, reject the access before applying the flexible-array relaxation if the access range extends past the struct size. Apply the same policy to struct ID matching so kfunc and kptr type checks do not walk past the allocated object bounds either.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 958cf2e273f0929c66169e0788031310e8118722 · fixed in 94033c193bc38794511b2ebfa3dc0287d3b2bf60; From 958cf2e273f0929c66169e0788031310e8118722 · fixed in 90d36e825da4fadeede64784ceda975ab7b31dab; From 958cf2e273f0929c66169e0788031310e8118722 · fixed in cf08ff2255de98cfcbc8bf7236fbeb38f0d5b4f1; From 958cf2e273f0929c66169e0788031310e8118722 · fixed in e626a50d07d43421cbf7bfb5a084b33a5e276b6e; From 958cf2e273f0929c66169e0788031310e8118722 · fixed in 9c9ee0324c774490ae953162aaaf4561d222bd93
- Linux Linux
6.2
- KernelLinux
From 6.2.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.114; From 6.13.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.2.6