CVE-2026-74364: bpf: Reject exclusive maps as inner maps in map-in-map

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081502-CVE-2026-74364-1e36@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

bpf: Reject exclusive maps as inner maps in map-in-map

An exclusive map (created with excl_prog_hash) is bound to a single
program by hash: check_map_prog_compatibility() refuses to load any
program whose digest does not match map->excl_prog_sha. That check
only runs for maps a program references directly, i.e. its used_maps.
A map reached at runtime through a map-of-maps is never in used_maps,
and bpf_map_meta_equal() does not consider excl_prog_sha, so an
exclusive map can be inserted into a non-exclusive outer map and
then looked up and mutated by an unrelated program, bypassing the
exclusivity guarantee.

For the signed loader this defeats the metadata map exclusivity check
added in the signed loader: the cached map->sha[] is validated against
the signed hash while another program on a hostile host rewrites the
frozen map's contents through the outer map.

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


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

	Issue introduced in 6.18 with commit baefdbdf6812e120c9fba9cfb101d3656f478026 and fixed in 6.18.40 with commit 3a0f73d27a8d379a8852a378b3c3208143e3b3b2
	Issue introduced in 6.18 with commit baefdbdf6812e120c9fba9cfb101d3656f478026 and fixed in 7.1.5 with commit 7c58ace08f180f8e249e714d1623388362f9d807
	Issue introduced in 6.18 with commit baefdbdf6812e120c9fba9cfb101d3656f478026 and fixed in 7.2-rc1 with commit 9a3c3c49c333760c8944dadacbe114c1884546ef

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-74364
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_in_map.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/3a0f73d27a8d379a8852a378b3c3208143e3b3b2
	https://git.kernel.org/stable/c/7c58ace08f180f8e249e714d1623388362f9d807
	https://git.kernel.org/stable/c/9a3c3c49c333760c8944dadacbe114c1884546ef
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.