Skip to contentSkip to conversation

CVE-2026-92515: bpf: Preserve unique-field state across nested structs

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-92515 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.11 with commit 64e8ee814819f21beeeda00d4119221443d77992 and fixed in 6.12.110 with commit cec97102d4147e18568c93946014c4c8ebf86fcf
	Issue introduced in 6.11 with commit 64e8ee814819f21beeeda00d4119221443d77992 and fixed in 6.18.52 with commit 28d5f20ed022ade0fb0bfbf50b78fec782083175
	Issue introduced in 6.11 with commit 64e8ee814819f21beeeda00d4119221443d77992 and fixed in 7.2.6 with commit 373a1e9366e711b89bc5e45bd6edf33ef62402cd
	Issue introduced in 6.11 with commit 64e8ee814819f21beeeda00d4119221443d77992 and fixed in 7.3-rc1 with commit f08619f060468076e4acbdc10e0713af20d60e65

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-92515

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
kernel/bpf/btf.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/cec97102d4147e18568c93946014c4c8ebf86fcf
	https://git.kernel.org/stable/c/28d5f20ed022ade0fb0bfbf50b78fec782083175
	https://git.kernel.org/stable/c/373a1e9366e711b89bc5e45bd6edf33ef62402cd
	https://git.kernel.org/stable/c/f08619f060468076e4acbdc10e0713af20d60e65