CVE-2026-74404: crypto: ccp - Fix snp_filter_reserved_mem_regions() off-by-one

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081509-CVE-2026-74404-2b54@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

crypto: ccp - Fix snp_filter_reserved_mem_regions() off-by-one

Sashiko notes:

> regarding the bounds check in snp_filter_reserved_mem_regions()
> called via walk_iomem_res_desc(): does the check
> if ((range_list->num_elements * 16 + 8) > PAGE_SIZE)
> allow an off-by-one heap buffer overflow?
>
> If range_list->num_elements is 255, 255 * 16 + 8 = 4088, which is <= 4096.
> Writing range->base (8 bytes) fills 4088-4095, but writing range->page_count
> (4 bytes) would write to 4096-4099, overflowing the kzalloc-allocated
> PAGE_SIZE buffer.

Fix this by accounting for the entry about to be written to, in addition to
the entries that are already allocated.

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


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

	Issue introduced in 6.9 with commit 1ca5614b84eed5904f65f143e0e7aaab0ac4c6b2 and fixed in 6.12.97 with commit 830c1f3e71989448652973375ef5e39b6ede47a3
	Issue introduced in 6.9 with commit 1ca5614b84eed5904f65f143e0e7aaab0ac4c6b2 and fixed in 6.18.40 with commit c5c79d92da0f9a09f48be5e2aabed2d6d1a96294
	Issue introduced in 6.9 with commit 1ca5614b84eed5904f65f143e0e7aaab0ac4c6b2 and fixed in 7.1.5 with commit af7341616b742ad2c374a90998bd650a035f694d
	Issue introduced in 6.9 with commit 1ca5614b84eed5904f65f143e0e7aaab0ac4c6b2 and fixed in 7.2-rc1 with commit 1b864b6cb213bbd7b406e9b2e98c962077f300df

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-74404
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:
	drivers/crypto/ccp/sev-dev.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/830c1f3e71989448652973375ef5e39b6ede47a3
	https://git.kernel.org/stable/c/c5c79d92da0f9a09f48be5e2aabed2d6d1a96294
	https://git.kernel.org/stable/c/af7341616b742ad2c374a90998bd650a035f694d
	https://git.kernel.org/stable/c/1b864b6cb213bbd7b406e9b2e98c962077f300df
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.