CVE-2026-74567: keys: fix out-of-bounds read in keyring_get_key_chunk()

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

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

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

keys: fix out-of-bounds read in keyring_get_key_chunk()

For description-level chunks keyring_get_key_chunk() advances the read
pointer by level * sizeof(long) past the inline prefix but only
bounds-checks the prefix, so a long enough key description is read past
its kmemdup(desc, desc_len + 1) allocation.  Compute the full byte
offset and bounds-check the description against it before reading.

The walk only reaches a description-level chunk when two keys collide
through the hash, x, type and domain_tag chunks, so this is reached from
an unprivileged add_key(2) with a crafted pair of same-type keys whose
index hashes collide; KASAN reports a slab-out-of-bounds read.

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


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

	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 6.6.151 with commit d1933e03e8c74a018550c31a393b79c4d95bff40
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 6.12.103 with commit 3a744838453fb9309ce5a5526d3252e211d60152
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 6.18.44 with commit e9417d21a22ad2ec398e78fcf084b717ce92cf2f
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 7.1.8 with commit 8dba33c1e779d0fb9a2acb31e354cf0fc0229111
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 7.2-rc6 with commit 63918731f9ae25b5deb022f118e941e6dddfcef4

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-74567
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:
	security/keys/keyring.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/d1933e03e8c74a018550c31a393b79c4d95bff40
	https://git.kernel.org/stable/c/3a744838453fb9309ce5a5526d3252e211d60152
	https://git.kernel.org/stable/c/e9417d21a22ad2ec398e78fcf084b717ce92cf2f
	https://git.kernel.org/stable/c/8dba33c1e779d0fb9a2acb31e354cf0fc0229111
	https://git.kernel.org/stable/c/63918731f9ae25b5deb022f118e941e6dddfcef4
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.