CVE-2026-72151 in Linuxinfo

Summary

by MITRE • 08/15/2026

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

tpm: tpm2-sessions: wait for async KPP completion in tpm_buf_append_salt

tpm_buf_append_salt() in drivers/char/tpm/tpm2-sessions.c calls crypto_kpp_generate_public_key() and crypto_kpp_compute_shared_secret() without installing a completion callback, discards both return values, and immediately frees the kpp_request via kpp_request_free(). When the resolved ecdh-nist-p256 KPP backend is asynchronous (atmel-ecc, HPRE, keembay-ocs), either operation returns -EINPROGRESS and the deferred completion worker dereferences the freed request.

The path fires automatically from the hwrng_fillfn kernel thread via tpm_get_random -> tpm2_get_random -> tpm2_start_auth_session -> tpm_buf_append_salt on every entropy poll, without any userland action.

Install crypto_req_done as the completion callback, wrap both KPP operations in crypto_wait_req(), and propagate errors to the caller. The wait is a no-op for synchronous backends.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 08/15/2026

The vulnerability resides in the Linux kernel's Trusted Platform Module implementation, specifically within the tpm2-sessions subsystem that handles TPM 2.0 session management. This flaw represents a classic race condition and use-after-free scenario that occurs during cryptographic key agreement operations. The issue manifests when the kernel attempts to generate public keys and compute shared secrets using elliptic curve cryptography through the Kernel Crypto API. When asynchronous KPP (Key Agreement) backends such as atmel-ecc, HPRE, or keembay-ocs are active, the cryptographic operations do not complete immediately but instead return -EINPROGRESS to indicate that completion will occur asynchronously.

The technical flaw stems from improper handling of asynchronous kernel crypto operations within the tpm_buf_append_salt function located in drivers/char/tpm/tpm2-sessions.c. The function invokes crypto_kpp_generate_public_key() and crypto_kpp_compute_shared_secret() without establishing proper completion callbacks to track operation status, immediately discards their return values, and proceeds to free the kpp_request structure via kpp_request_free(). This sequence creates a critical timing window where the asynchronous completion worker attempts to access memory that has already been freed, leading to potential kernel crashes or arbitrary code execution. The vulnerability is classified as a use-after-free condition and maps directly to CWE-416, representing improper cleanup of dynamically allocated memory.

The operational impact of this vulnerability extends far beyond typical cryptographic operations since it affects the hardware random number generator functionality that underpins many security-critical systems. The path that triggers this vulnerability occurs automatically through the hwrng_fillfn kernel thread during entropy polling cycles, meaning any system utilizing TPM 2.0 functionality with asynchronous KPP backends becomes immediately vulnerable without requiring user interaction or specific malicious input. This automatic triggering mechanism makes the vulnerability particularly dangerous as it can be exploited continuously and systematically. The attack surface includes systems using hardware accelerators for cryptographic operations where asynchronous processing is enabled.

The fix implements proper completion handling by installing crypto_req_done as the completion callback, wrapping both KPP operations with crypto_wait_req() to ensure synchronous behavior when needed, and propagating errors back to callers. This approach aligns with recommended practices for handling asynchronous kernel crypto operations and directly addresses the root cause identified in the ATT&CK framework under technique T1059.006 for kernel-level code execution. The solution ensures that the kpp_request structure remains valid until all cryptographic operations complete, preventing the use-after-free condition while maintaining backward compatibility with synchronous KPP backends where the wait operation becomes a no-op. This remediation follows established security guidelines for kernel development and addresses the specific vulnerability pattern that could allow privilege escalation or denial of service attacks against systems relying on TPM 2.0 functionality with asynchronous cryptographic accelerators.

Responsible

Linux

Reservation

08/09/2026

Disclosure

08/15/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!