CVE-2026-74566: keys: make keyring key-chunk byte order agree with keyring_diff_objects()

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

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

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

keys: make keyring key-chunk byte order agree with keyring_diff_objects()

keyring_get_key_chunk() loads description bytes into the index chunk low
address first, while keyring_diff_objects() numbers the first differing
bit from the low end and folds the absolute byte index into the level
without removing the inline-prefix offset the level already carries.
The two disagree on byte order and bit position, so the array can be
told two keys first differ at a bit that does not differ in the chunk
the walker uses, letting crafted descriptions collide into one node.

Load the chunk in the order keyring_diff_objects() assumes and drop the
inline-prefix length when folding the byte index into the level.  This
only changes the in-memory ordering used to place keys within a keyring;
add, search and read of non-colliding keys are unaffected.

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


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

	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 6.6.151 with commit bd0f976ef89dce6db458bf75bc2cf51127becc41
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 6.12.103 with commit 7269df3e7fcfa308e6a456305162f7788747bdbd
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 6.18.44 with commit 3d9f16c0b643ceac305526b2e2fe25c2c6166926
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 7.1.8 with commit 7e5397a3fed0dee7779bd084bec3c0584db3c930
	Issue introduced in 5.3 with commit f771fde82051976a6fc0fd570f8b86de4a92124b and fixed in 7.2-rc6 with commit 58565eef0f8d861aae92abfb7658458d661cee17

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-74566
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/bd0f976ef89dce6db458bf75bc2cf51127becc41
	https://git.kernel.org/stable/c/7269df3e7fcfa308e6a456305162f7788747bdbd
	https://git.kernel.org/stable/c/3d9f16c0b643ceac305526b2e2fe25c2c6166926
	https://git.kernel.org/stable/c/7e5397a3fed0dee7779bd084bec3c0584db3c930
	https://git.kernel.org/stable/c/58565eef0f8d861aae92abfb7658458d661cee17
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.