CVE-2025-40176
Description
In the Linux kernel, the following vulnerability has been resolved:
tls: wait for pending async decryptions if tls_strp_msg_hold fails
Async decryption calls tls_strp_msg_hold to create a clone of the input skb to hold references to the memory it uses. If we fail to allocate that clone, proceeding with async decryption can lead to various issues (UAF on the skb, writing into userspace memory after the recv() call has returned).
In this case, wait for all pending decryption requests.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel TLS subsystem, a race condition during async decryption can cause use-after-free if the skb clone allocation fails; the fix waits for pending decryptions before proceeding.
Vulnerability
Overview
CVE-2025-40176 is a vulnerability in the Linux kernel's TLS (Transport Layer Security) subsystem. During asynchronous decryption, the function tls_strp_msg_hold is called to create a clone of the input skb (socket buffer) to hold references to the memory used by the decryption operation. If this memory allocation fails, the system may proceed with the async decryption using the original skb, which can be freed or reused before the decryption completes, leading to a use-after-free (UAF) condition.
Root
Cause and Impact
The root cause is a missing check on the return value of tls_strp_msg_hold. If the allocation fails, the kernel does not wait for pending async decryption requests before continuing. This can result in the skb being freed while still in use by the decryption operation, or writing decrypted data into userspace memory after the recv() system call has already returned. An attacker who can trigger this race condition could potentially exploit the UAF to corrupt kernel memory or leak sensitive information [1][2].
Mitigation
The fix, already applied to the Linux kernel stable tree, ensures that when tls_strp_msg_hold fails, the kernel waits for all pending async decryption requests to complete before proceeding. This prevents the race condition from being exploited. The patch is available in multiple stable kernel commits [3][4]. Users should update their kernel to the latest stable version that includes this fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
59f83fd0c179ec61d4368197d39dec4ea3daf4fc109d0ab19b8a6ff84abbcVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/39dec4ea3daf77f684308576baf483b55ca7f160nvd
- git.kernel.org/stable/c/4fc109d0ab196bd943b7451276690fb6bb48c2e0nvd
- git.kernel.org/stable/c/9f83fd0c179e0f458e824e417f9d5ad53443f685nvd
- git.kernel.org/stable/c/b8a6ff84abbcbbc445463de58704686011edc8e1nvd
- git.kernel.org/stable/c/c61d4368197d65c4809d9271f3b85325a600586anvd
News mentions
0No linked articles in our index yet.