# CVE-2026-99040: KEYS: Fix add_key() race with keyring restriction

CVE-2026-99040 is fixed in 19 products on 1 platform, first by DEBIAN-CVE-2026-99040, released October 24, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-99040
- Priority: Routine
- CVSS: 4.7 (Moderate)
- EPSS: 0.0019
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Oct 23, 2026
- Vendor advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-99040

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | bpftool6.12 amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | bpftool6.12-debuginfo amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel-livepatch-6.12.113-138.209 amzn 2023 | 1:1.0-0.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12 amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-debuginfo amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-debuginfo-common-aarch64 amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-debuginfo-common-x86_64 amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-devel amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-headers amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-modules-extra amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-modules-extra-common amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-tools amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-tools-debuginfo amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | kernel6.12-tools-devel amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | linux Debian 13.5 (trixie) | 6.12.113-1 | [DEBIAN-CVE-2026-99040](https://patchblox.com/security/data/fix/linux/debian-cve-2026-99040.md) | Oct 24, 2026 |
| Linux | linux Debian 14 | 7.2.11-1 | [DEBIAN-CVE-2026-99040](https://patchblox.com/security/data/fix/linux/debian-cve-2026-99040.md) | Oct 24, 2026 |
| Linux | perf6.12 amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | perf6.12-debuginfo amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | python3-perf6.12 amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |
| Linux | python3-perf6.12-debuginfo amzn 2023 | 1:6.12.113-138.209.amzn2023 | [ALAS2023-2026-3335](https://patchblox.com/security/data/fix/linux/alas2023-2026-3335.md) | Nov 7, 2026 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
