CVE-2026-64353: bpf: Keep dynamic inner array lookups nullable

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:49:30 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072519-CVE-2026-64353-6baf@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

In the Linux kernel, the following vulnerability has been resolved:

bpf: Keep dynamic inner array lookups nullable

An ARRAY_OF_MAPS can use an array created with BPF_F_INNER_MAP as its
inner map template. A concrete inner array with a different max_entries
value can then replace the template.

After a successful outer map lookup, the verifier represents the
resulting map pointer using the inner map template. Const-key lookup
nullness elision consequently uses the template max_entries even though
the runtime helper uses the concrete inner map max_entries.

Do not elide lookup result nullness for maps marked with BPF_F_INNER_MAP,
because the template max_entries does not prove that the key is in bounds
for the concrete runtime map.

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


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

	Issue introduced in 6.14 with commit d2102f2f5d75a84dbab6ff890359f0bd4a18ca22 and fixed in 6.18.40 with commit 0b92ad64d6e4bde85e6b9888404f9a7a2b65d269
	Issue introduced in 6.14 with commit d2102f2f5d75a84dbab6ff890359f0bd4a18ca22 and fixed in 7.1.4 with commit d57db0d975053e01410c54e708a85b6d32ef2ebd
	Issue introduced in 6.14 with commit d2102f2f5d75a84dbab6ff890359f0bd4a18ca22 and fixed in 7.2-rc1 with commit 53040a81ae57cdca8af8ac36fe4e661730cf7c6b

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-64353
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/verifier.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/0b92ad64d6e4bde85e6b9888404f9a7a2b65d269
	https://git.kernel.org/stable/c/d57db0d975053e01410c54e708a85b6d32ef2ebd
	https://git.kernel.org/stable/c/53040a81ae57cdca8af8ac36fe4e661730cf7c6b