CVE-2026-74360: bpf: Reject exclusive maps for bpf_map_elem iterators

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081501-CVE-2026-74360-6213@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

bpf: Reject exclusive maps for bpf_map_elem iterators

Exclusive maps (aka excl_prog_hash) are meant to be reachable only
from the single program whose hash matches. This is enforced by
check_map_prog_compatibility() when the map is referenced from a
program such as signed BPF loaders.

A bpf_map_elem iterator, however, binds its target map at attach
time in bpf_iter_attach_map() instead of referencing it from the
program, so the exclusivity check is never reached. On top of that,
the iterator exposes the map value as a writable buffer.

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


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

	Issue introduced in 6.18 with commit baefdbdf6812e120c9fba9cfb101d3656f478026 and fixed in 6.18.40 with commit 5cf2c85b1231218a3e3e9f188afb4fe2e17903d5
	Issue introduced in 6.18 with commit baefdbdf6812e120c9fba9cfb101d3656f478026 and fixed in 7.1.5 with commit c3da741d5b2119c61c4498bc936f0fc1dbc3c79b
	Issue introduced in 6.18 with commit baefdbdf6812e120c9fba9cfb101d3656f478026 and fixed in 7.2-rc1 with commit 3c56ee343f9412d81918635c3e25e22a5dd6d87e

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-74360
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/map_iter.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/5cf2c85b1231218a3e3e9f188afb4fe2e17903d5
	https://git.kernel.org/stable/c/c3da741d5b2119c61c4498bc936f0fc1dbc3c79b
	https://git.kernel.org/stable/c/3c56ee343f9412d81918635c3e25e22a5dd6d87e
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.