CVE-2026-99222

keys: Protect the read method check against type removal

Published Nov 2, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

keys: Protect the read method check against type removal

keyctl_read_key() checks key->type->read without holding key->sem.
A reference keeps the key alive, but does not pin the module containing
its type. A surviving RxRPC key can therefore be read while AF_RXRPC
is being unloaded:

KEYCTL_READ task Module unload and key GC
---------------- ------------------------
lookup_user_key()
permission / possession checks
load key->type
af_rxrpc_exit()
unregister_key_type()
GC: down_write(key->sem)
GC: retype to key_type_dead
GC: up_write(key->sem)
unregister_key_type() returns
free_module()
read saved type's read member

The final access can read freed module storage. The read invocation in
__keyctl_read_key() is already protected by key->sem, but the earlier
method check is outside that critical section.

Move the method check into __keyctl_read_key(), after key_validate() and
under its existing read hold on key->sem. The check and invocation then
use the same protected type for length queries and every read retry.
The GC cannot retype the key until the semaphore is released, and type
unregistration waits for that GC pass before the module can be freed.

Return -EOPNOTSUPP when validation succeeds and the type has no read
method. A temporary buffer may now be allocated before this result;
allocation and copying to userspace remain outside the semaphore.

Analysis

AI-generated

Technical impact

In the Linux kernel the keyctl_read_key system call performs a type check on a key’s read method without holding the key’s semaphore. When an AF_RXRPC key exists, the corresponding key type can be unregistered while a read is pending. This race allows the read operation to access freed module storage, exposing arbitrary memory contents or causing a crash. The flaw is a classic use‑after‑free, classified as CWE‑416.

Affected Systems

All Linux kernel builds that include AF_RXRPC before the patches in the listed commits are affected. The fix, which moves the type‑check inside the semaphore‑protected section, applies to every kernel version supplied by the GNU/Linux distribution maintainers that contain the commit changes referenced in the advisory.

Risk and Exploitability

The EPSS score is < 1% and the vulnerability is not listed in the CISA KEV catalog. Consequently, known exploitation probability remains low, but the flaw could be triggered by a local attacker who can create or control AF_RXRPC keys. The impact is confined to the kernel’s address space and does not provide remote access without additional exploits. The CVSS score of 4.7 quantifies the severity and indicates a moderate risk for affected systems, though the use‑after‑free nature still poses a serious local privilege escalation concern.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that incorporates the commit sequence fixing the use‑after‑free in keyctl_read_key.
  • If an upgrade cannot be performed immediately, unload or disable the AF_RXRPC kernel module to eliminate the unprotected read path until the patch is available.
  • For custom kernels or unmaintained builds, apply a local patch that encloses the key type check inside the key semaphore guard and returns –EOPNOTSUPP when a type lacks a read method, replicating the upstream fix.

Generated by OpenCVE AI on November 4, 2026 at 13:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4904-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4906-1 linux security update
Ubuntu USN Ubuntu USN USN-9165-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9166-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9167-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9167-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-2 Linux kernel vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: keys: Protect the read method check against type removal keyctl_read_key() checks key->type->read without holding key->sem. A reference keeps the key alive, but does not pin the module containing its type. A surviving RxRPC key can therefore be read while AF_RXRPC is being unloaded: KEYCTL_READ task Module unload and key GC ---------------- ------------------------ lookup_user_key() permission / possession checks load key->type af_rxrpc_exit() unregister_key_type() GC: down_write(key->sem) GC: retype to key_type_dead GC: up_write(key->sem) unregister_key_type() returns free_module() read saved type's read member The final access can read freed module storage. The read invocation in __keyctl_read_key() is already protected by key->sem, but the earlier method check is outside that critical section. Move the method check into __keyctl_read_key(), after key_validate() and under its existing read hold on key->sem. The check and invocation then use the same protected type for length queries and every read retry. The GC cannot retype the key until the semaphore is released, and type unregistration waits for that GC pass before the module can be freed. Return -EOPNOTSUPP when validation succeeds and the type has no read method. A temporary buffer may now be allocated before this result; allocation and copying to userspace remain outside the semaphore.
Title keys: Protect the read method check against type removal
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 3, 2026, 7:12 PM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Nov 2, 2026, 4:17 PM
Modified
Nov 3, 2026, 8:18 PM
Severity
Moderate
Public date
Nov 2, 2026, 4:06 PM