bpf: Require a BPF cpumask for bpf_cpumask_populate()
- 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.18.52, 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: Require a BPF cpumask for bpf_cpumask_populate() bpf_cpumask_populate() writes to its destination with bitmap_copy(), but the destination is typed as struct cpumask *. That allows the verifier to accept borrowed cpumask pointers returned by read-only kfuncs, such as scx_bpf_get_online_cpumask(), as a writable destination. Make the destination a struct bpf_cpumask * so populate follows the same ownership rule as the other mutating cpumask kfuncs. Query kfuncs continue to accept const struct cpumask * inputs.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 950ad93df2fce70445e655ed2e74f5c1a8653ab2 · fixed in 0cfc9348a045da64955af2dd6902e66dfc7d6469; From 950ad93df2fce70445e655ed2e74f5c1a8653ab2 · fixed in b7e2a5c6519adc73be55c3de2cb545e095a0fbc5; From 950ad93df2fce70445e655ed2e74f5c1a8653ab2 · fixed in 8740156ad33be5071b588b594c55f279457f667c
- Linux Linux
6.15
- KernelLinux
From 6.15.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6