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

KEYS: Fix add_key() race with keyring restriction

__key_create_or_update() snapshots keyring->restrict_link before taking
the destination keyring's semaphore. keyring_restrict() installs a
restriction while holding that semaphore.

This allows a writer to observe no restriction, wait for the keyring
owner to install a reject-all restriction and return successfully, and
then link a key using the stale NULL snapshot. The writer only needs
write permission on the destination keyring.

Move the restrict_link read after __key_link_lock() and
__key_link_begin(). The read and the subsequent restriction check are
then serialized with restriction installation by keyring->sem.

The race was reproduced on v7.2.8 in 19 executions where restriction
installation returned before the link completed. All 19 linked the key
despite the reject-all restriction. With this change, 312 executions
reached the same ordering and every add_key() call failed with -EPERM.

The issue was found by manual concurrency analysis assisted by AI-based
analysis and independently verified with a QEMU reproducer and kernel
instrumentation.
Published: 2026-10-23
Score: 2.5 Low
EPSS: < 1% Very Low
KEV: No
Impact: Privilege Escalation
Action: Immediate Patch
AI Analysis

Impact

The underlying flaw is a race condition in the key creation routine of the Linux kernel, which permits a user with write access to a destination keyring to bypass restriction checks and link a key even when a reject‑all restriction is in place. This flaw effectively allows the insertion of unauthorized keys, potentially giving the attacker elevated privileges or access to sensitive data. The weakness corresponds to a concurrency or race condition failure, formally classified as CWE‑362.

Affected Systems

All Linux kernel implementations containing the affected add_key implementation are impacted. The patch was demonstrated against kernel version 7.2.8 and applies to earlier releases with the same code path. No specific vendor or product version list is provided, so systems running any version of the Linux kernel should verify whether the fix has been applied by reviewing the kernel changelog for the relevant commit.

Risk and Exploitability

The EPSS score is <1% and the vulnerability is not listed in CISA’s KEV catalog, indicating that no widespread exploitation is currently known. Because the condition requires a local user with write permission to a keyring and relies on a precise timing window, the likelihood of successful exploitation in practice is low to moderate. Nevertheless, the impact of a successful attack is significant, elevating privileges and allowing unauthorized key manipulation. The CVSS score is 2.5, indicating a low severity rating in typical vulnerability scoring models.

Generated by OpenCVE AI on October 29, 2026 at 14:53 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the fix for the add_key race condition (e.g., the latest stable release or a release that contains the specified commit).
  • If immediate kernel upgrades are not feasible, audit and reduce write permissions on keyrings that enforce restrictions, ensuring only trusted processes can modify them.
  • Apply additional system hardening measures such as SELinux or AppArmor rules that restrict keyring modification capabilities to further mitigate the risk.
  • Verify that the key restriction enforcement logic aligns with the intended security policy, and consider disabling unnecessary keyring or restricting keys to reduce the attack surface.

Generated by OpenCVE AI on October 29, 2026 at 14:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 30 Oct 2026 13:00:00 +0000


Thu, 29 Oct 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-367
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Low


Sat, 24 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux

Fri, 23 Oct 2026 17:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Fri, 23 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: KEYS: Fix add_key() race with keyring restriction __key_create_or_update() snapshots keyring->restrict_link before taking the destination keyring's semaphore. keyring_restrict() installs a restriction while holding that semaphore. This allows a writer to observe no restriction, wait for the keyring owner to install a reject-all restriction and return successfully, and then link a key using the stale NULL snapshot. The writer only needs write permission on the destination keyring. Move the restrict_link read after __key_link_lock() and __key_link_begin(). The read and the subsequent restriction check are then serialized with restriction installation by keyring->sem. The race was reproduced on v7.2.8 in 19 executions where restriction installation returned before the link completed. All 19 linked the key despite the reject-all restriction. With this change, 312 executions reached the same ordering and every add_key() call failed with -EPERM. The issue was found by manual concurrency analysis assisted by AI-based analysis and independently verified with a QEMU reproducer and kernel instrumentation.
Title KEYS: Fix add_key() race with keyring restriction
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-30T12:41:13.694Z

Reserved: 2026-09-25T10:25:14.387Z

Link: CVE-2026-99040

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T13:17:27.360

Modified: 2026-10-30T13:21:41.200

Link: CVE-2026-99040

cve-icon Redhat

Severity : Low

Publid Date: 2026-10-23T00:00:00Z

Links: CVE-2026-99040 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-29T15:00:22Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition