In the Linux kernel, the following vulnerability has been resolved: KEYS: Fix add_key() race with keyring restriction __key_create_or_update()… (CVE-2026-99040)
Description
A race condition vulnerability in the Linux kernel's key management subsystem was resolved. The flaw allowed a writer with write permission on a destination keyring to bypass keyring restrictions by exploiting a timing issue between restriction installation and key linking. This could result in unauthorized keys being linked despite reject-all restrictions. The issue was confirmed through repeated testing and fixed by reordering operations to ensure proper serialization of restriction checks with semaphore locking.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in the Linux kernel involved a race condition in the add_key() function related to keyring restrictions. Specifically, __key_create_or_update() took a snapshot of keyring->restrict_link before acquiring the destination keyring's semaphore, while keyring_restrict() installed restrictions while holding that semaphore. This allowed a writer to observe no restriction, then wait for the owner to install a reject-all restriction, and still link a key using the stale NULL snapshot. The fix moved the restrict_link read to occur after __key_link_lock() and __key_link_begin(), ensuring serialization with restriction installation via the keyring semaphore. The race was reproducibly demonstrated on version 7.2.8 with 19 successful exploit attempts, all prevented after the fix.
Potential Impact
An attacker with write permission on a destination keyring could bypass keyring restrictions and link unauthorized keys despite reject-all restrictions. This could undermine the security controls intended to restrict key usage and potentially lead to privilege escalation or unauthorized access within the kernel's key management system.
Mitigation Recommendations
The vulnerability has been resolved in the Linux kernel by reordering operations to ensure proper synchronization of keyring restrictions and key linking. Users should update to a Linux kernel version that includes this fix. Patch status is not explicitly stated; check the vendor advisory or kernel changelogs for the specific fixed version and apply updates accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-xfxp-jqfr-m4g5
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-99040"]
Threat ID: 6adbaaced73cc49347b20515
Added to database: 10/23/2026, 18:43:26 UTC
Last enriched: 10/23/2026, 18:51:31 UTC
Last updated: 10/24/2026, 00:25:21 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.