CVE-2026-89763
High · 7.8CVSS
7.8
EPSS
0.1%
Published
Sep 11, 2026
CISA due date
—
Cloudanix analysis
A timing error in how the Linux kernel cleans up TPM-based key handling can let a local user crash the system or potentially gain higher privileges.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in the trusted TPM key backend: trusted_tpm_exit releases the TPM chip reference and kfree's the digest array before unregister_key_type completes, allowing concurrent key_type_lookup callers to invoke tpm_pcr_extend on freed memory.
Why it matters to the business
Local users can trigger kernel crashes or memory corruption on systems that load and unload the trusted key module while performing TPM-backed key operations, potentially leading to denial of service or local privilege escalation.
How an attack unfolds
An attacker with local access loads the trusted module, starts a key creation or sealing operation that holds key_types_sem, then forces module unload so trusted_tpm_exit frees the digests array; the in-flight operation then dereferences the freed memory inside tpm_pcr_extend.
How to fix it
Apply the upstream fix that moves unregister_key_type before put_device and kfree of the digest array; rebuild and boot the patched kernel. Disable or avoid use of the trusted TPM key type until updated kernels are deployed.
How to confirm the fix worked
Confirm the patch is present by inspecting the trusted.c source for unregister_key_type preceding resource release; verify no KASAN reports occur during module unload while key operations are active; test on a non-production system with the reproducer sequence.
Typical attack path
- Obtain local shell on target Linux system
- Trigger loading of the trusted key module and perform a key operation that reaches trusted_tpm_seal
- Concurrently unload the module to execute trusted_tpm_exit
- Continue the key operation so it calls tpm_pcr_extend on the now-freed digest array
- Observe KASAN use-after-free or trigger kernel panic / memory corruption
How to detect it
Search kernel logs and KASAN reports for slab-use-after-free involving tpm_pcr_extend, pcrlock, or trusted_tpm_seal during module unload; inspect crash dumps for freed digest arrays referenced after trusted_tpm_exit; correlate with keyctl or add_key syscalls occurring near module deletion.
- BUG: KASAN: slab-use-after-free in tpm_pcr_extend
- trusted_tpm_exit
- kfree(digests)
- unregister_key_type
- poc/.*tpm_pcr_extend
What your security team should do
- Prioritize kernel updates containing the teardown ordering fix on all systems that compile or load the trusted key module
- Restrict local user access to keyctl and module loading until patches are applied
- Monitor for KASAN or slab-use-after-free reports mentioning tpm_pcr_extend or trusted_tpm_exit
- Review any custom initramfs or early-boot scripts that load/unload the trusted module
The record
In the Linux kernel, the following vulnerability has been resolved: KEYS: trusted: Fix TPM teardown ordering trusted_tpm_exit() drops the TPM chip reference and frees the digest array before unregistering the trusted key type. key_type_lookup() holds key_types_sem for reading until the key operation finishes, while unregister_key_type() takes it for writing. It therefore provides the synchronization point that must precede backend teardown. The current order permits this interleaving: CPU 0 CPU 1 trusted_tpm_exit() key_type_lookup("trusted") put_device(&chip->dev) trusted_tpm_seal() kfree(digests) pcrlock() unregister_key_type() tpm_pcr_extend(..., digests) CPU 1 can consequently dereference the freed digest array. The chip can also be released before callbacks stop using it. KASAN reported: BUG: KASAN: slab-use-after-free in tpm_pcr_extend+0x1f0/0x200 Read of size 2 at addr ffff88810872d000 by task poc/89 Call Trace: tpm_pcr_extend+0x1f0/0x200 pcrlock+0x42/0x70 [trusted] trusted_tpm_seal+0x1b6/0x570 [trusted] trusted_instantiate+0x293/0x340 [trusted] __key_instantiate_and_link+0xb2/0x2b0 __key_create_or_update+0x61e/0xb50 __do_sys_add_key+0x1b8/0x310 Allocated by task 88: __kmalloc_noprof+0x1a7/0x490 do_one_initcall+0xa1/0x390 do_init_module+0x2df/0x840 Freed by task 90: kfree+0x131/0x3c0 trusted_tpm_exit+0x59/0xa0 [trusted] __do_sys_delete_module+0x346/0x510 Move unregister_key_type() before releasing either resource. This stops new lookups and waits for in-flight key operations to finish before the backend state is destroyed.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|