bpf: Preserve unique-field state across nested structs
- 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.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: Preserve unique-field state across nested structs btf_find_struct_field() initializes a fresh seen mask for every recursive descent. Unique special fields in different levels of the same aggregate therefore do not see one another. The duplicate fields can reach btf_parse_fields(), where they trigger an invariant WARN_ON_ONCE(). A crafted user BTF can consequently trigger the warning before map creation checks capabilities. Initialize the seen mask once in btf_find_field() and pass the same pointer through struct, datasec, and nested-struct walks. This gives the entire field traversal one shared uniqueness state.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 64e8ee814819f21beeeda00d4119221443d77992 · fixed in cec97102d4147e18568c93946014c4c8ebf86fcf; From 64e8ee814819f21beeeda00d4119221443d77992 · fixed in 28d5f20ed022ade0fb0bfbf50b78fec782083175; From 64e8ee814819f21beeeda00d4119221443d77992 · fixed in 373a1e9366e711b89bc5e45bd6edf33ef62402cd; From 64e8ee814819f21beeeda00d4119221443d77992 · fixed in f08619f060468076e4acbdc10e0713af20d60e65
- Linux Linux
6.11
- KernelLinux
From 6.11.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6