CVE-2026-31533
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
23/04/2026
Last modified:
29/04/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/tls: fix use-after-free in -EBUSY error path of tls_do_encryption<br />
<br />
The -EBUSY handling in tls_do_encryption(), introduced by commit<br />
859054147318 ("net: tls: handle backlogging of crypto requests"), has<br />
a use-after-free due to double cleanup of encrypt_pending and the<br />
scatterlist entry.<br />
<br />
When crypto_aead_encrypt() returns -EBUSY, the request is enqueued to<br />
the cryptd backlog and the async callback tls_encrypt_done() will be<br />
invoked upon completion. That callback unconditionally restores the<br />
scatterlist entry (sge->offset, sge->length) and decrements<br />
ctx->encrypt_pending. However, if tls_encrypt_async_wait() returns an<br />
error, the synchronous error path in tls_do_encryption() performs the<br />
same cleanup again, double-decrementing encrypt_pending and<br />
double-restoring the scatterlist.<br />
<br />
The double-decrement corrupts the encrypt_pending sentinel (initialized<br />
to 1), making tls_encrypt_async_wait() permanently skip the wait for<br />
pending async callbacks. A subsequent sendmsg can then free the<br />
tls_rec via bpf_exec_tx_verdict() while a cryptd callback is still<br />
pending, resulting in a use-after-free when the callback fires on the<br />
freed record.<br />
<br />
Fix this by skipping the synchronous cleanup when the -EBUSY async<br />
wait returns an error, since the callback has already handled<br />
encrypt_pending and sge restoration.
Impact
Base Score 3.x
9.80
Severity 3.x
CRITICAL
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.160 (including) | 5.15.203 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.84 (including) | 6.1.169 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6.18 (including) | 6.6.135 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7.6 (including) | 6.8 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.8.1 (including) | 6.12.82 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.18.23 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.19 (including) | 6.19.13 (excluding) |
| cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/02f3ecadb23558bbe068e6504118f1b712d4ece0
- https://git.kernel.org/stable/c/0e43e0a3c94044acc74b8e0927c27972eb5a59e8
- https://git.kernel.org/stable/c/2694d408b0e595024e0fc1d64ff9db0358580f74
- https://git.kernel.org/stable/c/414fc5e5a5aff776c150f1b86770e0a25a35df3a
- https://git.kernel.org/stable/c/5d70eb25b41e9b010828cd12818b06a0c3b04412
- https://git.kernel.org/stable/c/a9b8b18364fffce4c451e6f6fd218fa4ab646705
- https://git.kernel.org/stable/c/aa9facde6c5005205874c37db3fd25799d741baf



