* [CVE-2026-99040][IMPORTANT] KEYS: Fix add_key() race with keyring restriction
@ 2026-10-27 4:12 21% AL-KERNEL
0 siblings, 0 replies; 1+ results
From: AL-KERNEL @ 2026-10-27 4:12 UTC (permalink / raw)
To: kernel-cve
CVE: CVE-2026-99040
Priority: IMPORTANT
AL-KERNEL base severity: IMPORTANT
KPANIC flag: NO
Patch: KEYS: Fix add_key() race with keyring restriction
Commit: 305f1828b871dd46bf41addeb6f11d2c162dcb25
Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=305f1828b871dd46bf41addeb6f11d2c162dcb25
Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-99040
Analysis date: Tue, 27 Oct 2026 00:12:46 -0400
ActionableScore: 5
ActionableScore lower bound: unknown
Actionable bucket: Actionable Moderate / Strong Important candidate requiring manual review
Manual review required: YES
Summary:
A write-authorized local caller can race keyring restriction installation and link a key after a reject-all policy has taken effect.
======================================================================
ABOUT THIS REPORT
======================================================================
The original Linux kernel CVE announcement for CVE-2026-99040 is available here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-99040
The original announcement does not normally provide a security severity
estimate, CVSS assessment, or enough information to determine whether the
reported kernel bug represents a practically relevant security issue.
This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin. It combines
an autonomous classifier with LLM-assisted technical analysis and a
separate ActionableScore mechanism.
The purpose of this report is to prioritize Linux kernel CVEs before
manual review, identify cases that require prompt investigation, and
support automatic closure of issues that are unlikely to have meaningful
security impact.
Published priority for this report: IMPORTANT
Manual review required: YES
A detailed explanation of the methodology and priority rules is included
at the end of this message.
======================================================================
AL-KERNEL CLASSIFICATION RESULT
======================================================================
CVE-2026-99040 IMPORTANT https://www.kernelcve.org/list/?q=CVE-2026-99040 CHECK WITH IMPACT FROM ORIG NN IMPORTANT | AEGIS IMPACT IMPORTANT AEGIS_AS=4 LEGACY=IMPORTANT RESULT=SAME (final reconciliation agrees; DECISION: both IMPORTANT) Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L';CWE-367;CWE-362;CWE-863;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N';BEST CVSS score: '5.8';DESCR 'A race in __key_create_or_update can bypass a keyring restriction because restrict_link was read before the destination keyring semaphore was acquired. A concurrent keyring_restrict call can install and return from a reject all restriction while add_key later links a key using the stale NULL snapshot. For the CVSS the PR:L value is selected because the attacker needs write permission on the destination keyring but does not need full administrative privilege. AC:H reflects the required concurrency ordering. The direct impact is an integrity policy bypass because an unauthorized key can remain linked and may later be trusted by a keyring consumer. There is no demonstrated memory corruption or direct network reachability. Downstream confidentiality or availability impact depends on how the affected keyring is used. Automated impact decision path. The original SimpleNet classifier selected IMPORTANT. The primary LLM estimated paranoid CVSS 5.8 and the production ActionableScore returned 5 with recommendation Actionable Moderate / Strong Important candidate requiring manual review. The production rules then evaluated CVSS thresholds and ActionableScore thresholds. Recorded rule transitions were CVSS and initial triage stage IMPORTANT to IMPORTANT because the CVSS score, vector or bug class threshold rule was applied. final reconciliation stage IMPORTANT to IMPORTANT because a specific evidence based protection or manual review veto was applied and KP specialist did not establish a qualifying panic. The legacy KP specialist produced a review artifact and its decision was processed by the applicable KP rules. The legacy FD or DH downgrade specialist produced a review artifact and its decision was processed by the applicable downgrade and preservation rules. Exact triggered rule markers were LOWERED_FROM_HIGH_BASED_ON_GUESSCVSS and INCREASED_TO_HIGH_BASED_ON_GUESSCVSS and B4_PENDING_REVIEW_AUTHORIZATION_PRESERVE and MANUAL_REVIEW_REQUIRED and KPANIC_UNSUPPORTED_REMOVED. The independent weaker Aegis shadow evaluated CVSS 2.7 and ActionableScore 4 with primitive class CLASS_A and manual review REQUIRED. Its independently reconciled impact was IMPORTANT. The shadow agreed with the final production impact and aggregation did not change that impact. The final reported impact is IMPORTANT.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate / Strong Important candidate requiring manual review (with actual score 5) MAYBE RACE IMPROVEONLY LINUS LOWERED_FROM_HIGH_BASED_ON_GUESSCVSS INCREASED_TO_HIGH_BASED_ON_GUESSCVSS B4_PENDING_REVIEW_AUTHORIZATION_PRESERVE MANUAL_REVIEW_REQUIRED KPANIC_UNSUPPORTED_REMOVED - - checked
======================================================================
ACTIONABLESCORE ANALYSIS
======================================================================
ActionableScore=5
PrimitiveClass=CLASS_A
RealUAF=NO
HostAdminRequired=NO
NamespaceScopedPrivilege=UNKNOWN
ImportantCandidate=YES
ManualReview=REQUIRED
AutoDowngradeAllowed=NO
RequiresHostUID0=NO
AuthorizationDecisionBypass=YES
ProtectedResourceImpact=CONFIRMED
B4PendingReview=YES
B4PendingConfirmed=YES
1. ActionableScore
* Raw base score: 5.
* Conservative score: 5; no floor or cap applied.
* Raw paranoid score: 5.
* Paranoid score: 5; no additional speculative impact awarded.
* Final recommended bucket: **Actionable Moderate / Strong Important candidate requiring manual review**::
2. Signal breakdown
* +2 concrete authorization decision bypass: `add_key()` uses a stale NULL `restrict_link`, changing the installed reject-all restriction’s expected `-EPERM` into a successful link.
* +1 local below-host-admin trigger: the writer needs destination-keyring write permission, not effective host-administrator power or UID 0.
* +1 integrity impact: an unauthorized key is demonstrably linked into the now-restricted keyring.
* +1 practical chain: concurrent restriction installation → stale pre-lock snapshot → restriction check skipped → key linked; reproduced 19 times.
* No race penalty: concurrency ordering is required, but supplied testing repeatedly reached it; materially narrow or uncontrollable timing is not shown.
* No confidentiality, availability, LPE, arbitrary-access, memory-corruption, or downstream trusted-consumer points were awarded.
* The authorization and integrity points are not duplicated as a second generic boundary-bypass bonus.
3. Reachability analysis
`add_key()` is the grounded attacker-invocable caller. The attacker requires write permission on the destination keyring, while a concurrent owner installs the restriction. This establishes below-host-admin reachability, but the evidence does not resolve whether any relevant privilege is user-namespace scoped. No special hardware, boot option, or host-admin setup is shown. The race is practically reproducible rather than merely theoretical.
4. Primitive and severity reading
The primitive is a TOCTOU authorization bypass over active keyring restriction state, not a UAF or memory corruption. Reading `restrict_link` before taking `keyring->sem` permits a completed reject-all policy installation to be ignored. Moving the read under the link lock cleanly restores serialization and protection.
B4-PENDING is confirmed through the concrete path: write-authorized `add_key()` caller → stale NULL restriction snapshot → reject-all guard omitted → protected restricted keyring accepts the key. The direct protected-resource impact is confirmed; whether a later consumer trusts that key for a higher-impact purpose remains unresolved. This supports CLASS_A and mandatory Important review, but not proven privilege escalation or high confidentiality impact.
5. One-sentence report phrase
A write-authorized local caller can race keyring restriction installation and link a key after a reject-all policy has taken effect.
6. Manual review advice
MANUAL CHECK REQUIRED
The confirmed below-host-admin DENY-to-ALLOW authorization bypass preserves an Important candidate, while downstream key consumers and ultimate security impact require review.
7. Call-site confidence
Call-site confidence: high
======================================================================
UPSTREAM PATCH SUMMARY
======================================================================
Patch: KEYS: Fix add_key() race with keyring restriction
Commit: 305f1828b871dd46bf41addeb6f11d2c162dcb25
Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=305f1828b871dd46bf41addeb6f11d2c162dcb25
Commit description:
__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.
Fixes: 5ac7eac ("KEYS: Add a facility to restrict new links into a keyring")
Cc: [email protected]
Signed-off-by: 성병찬 <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Changed files:
security/keys/key.c
Diff excerpt:
Not included in this email. See the upstream URL for the full patch.
Full patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=305f1828b871dd46bf41addeb6f11d2c162dcb25
======================================================================
DETAILED REPORT METHODOLOGY
======================================================================
The original Linux kernel CVE announcement for CVE-2026-99040 can be found here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-99040
The original CVE announcement normally does not include a security-level
estimate. In particular, it may not contain a CVSS assessment, an impact
level, or enough information to determine whether the reported bug is a
practically relevant security issue. One purpose of this parallel CVE list
is to provide that missing technical and prioritization information.
The original goal of the AL-KERNEL project was to prioritize Linux kernel
CVE analysis automatically before manual review. The system can also help
identify non-security issues that may be suitable for automatic closure.
This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin.
The first analysis stage combines an autonomous classifier with additional
LLM-based analysis. The autonomous classifier runs locally on a CPU and is
based on a backpropagation neural network. Together, these mechanisms
produce a technical vulnerability description, identify likely weakness
types, estimate CVSS severity, and provide input for ActionableScore.
Two CVSS estimates are retained because incomplete kernel vulnerability
information often permits more than one defensible interpretation:
Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L
The Best / paranoid CVSS score: 5.8
The conservative vector represents a lower-impact interpretation.
The Best/paranoid vector intentionally represents a plausible upper-bound
interpretation and should not automatically be treated as demonstrated
real-world impact.
CVSS may also need to be adjusted for a particular Linux deployment,
because actual reachability, privileges, enabled kernel configuration,
hardware, namespaces, exposed device nodes, and other environmental
conditions can differ significantly between systems.
A separate ActionableScore mechanism evaluates practical remediation
urgency. Its analysis may include reachability, attack prerequisites,
subsystem exposure, memory-corruption characteristics, denial-of-service
reliability, and possible confidentiality, integrity, or
privilege-escalation impact.
Conservative ActionableScore: unknown
Paranoid ActionableScore: 5
The final base severity is taken directly from the second tab-separated
field of the AL-KERNEL classification result. ActionableScore does not
replace or independently override that final AL-KERNEL decision, and
if ActionableScore adjusted impact level of ALKERNEL, then you would see
self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7.
For an AL-KERNEL result of MODERATE, this report uses the following
additional presentation split:
ActionableScore below 5 -> MODERATE REGULAR
ActionableScore 5 or more -> MODERATE 7.0
The distinction between MODERATE REGULAR and MODERATE 7.0 makes it
possible to identify Moderate issues that should receive manual analysis
and fixes before lower-priority MODERATE REGULAR issues. In many cases,
MODERATE REGULAR fixes may wait for a later rebase or routine update.
There is one override in which MODERATE REGULAR becomes MODERATE 7.0
even when the ActionableScore is below 5. When the AL-KERNEL result
contains the KPANIC flag, a MODERATE result is always presented as
MODERATE 7.0. The KPANIC flag selected with few regexps without
usage of AI at all, so it helps to detect cases when Kernel Crash happens
and similar (to filter False-Negative results from the LLM usage).
KPANIC indicates that a reliable kernel crash, kernel panic, or similarly
serious kernel availability impact was identified by the classification
workflow.
AL-KERNEL base severity for this report: IMPORTANT
KPANIC detected for this report: NO
Published priority for this report (same as in Subject): IMPORTANT
These results are intended to support engineering triage. They are
machine-generated estimates, and cases marked for manual review should
be validated by a human security engineer before final disposition.
For more info read docs linked from here: https://kernelcve.org/
(and you can submit you own patch there to generate such a report
for non-existant CVE-id yet).
Note that in many cases this AI tool selects higher severity, than
real is (means you can expect Importants instead of Moderate 7.0 or
Moderates 7.0 instead of regular Moderates). If you see such cases,
please use reply email interface to add additional manual analyses
info to this particular CVE.
And please, please, let me know when you see Lows instead of Importants
or Important instead of Low (because particular for such cases I
need to tune this AI tool to make it better for this one and next similar).
My contact email for such notifications is [email protected] (and both
send reply to CVE record itself too and see "reply" button below for howto reply).
^ permalink raw reply [relevance 21%]
Results 1-1 of 1 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2026-10-27 4:12 21% [CVE-2026-99040][IMPORTANT] KEYS: Fix add_key() race with keyring restriction AL-KERNEL
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox