CVE-2025-38488
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
28/07/2025
Last modified:
07/01/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
smb: client: fix use-after-free in crypt_message when using async crypto<br />
<br />
The CVE-2024-50047 fix removed asynchronous crypto handling from<br />
crypt_message(), assuming all crypto operations are synchronous.<br />
However, when hardware crypto accelerators are used, this can cause<br />
use-after-free crashes:<br />
<br />
crypt_message()<br />
// Allocate the creq buffer containing the req<br />
creq = smb2_get_aead_req(..., &req);<br />
<br />
// Async encryption returns -EINPROGRESS immediately<br />
rc = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req);<br />
<br />
// Free creq while async operation is still in progress<br />
kvfree_sensitive(creq, ...);<br />
<br />
Hardware crypto modules often implement async AEAD operations for<br />
performance. When crypto_aead_encrypt/decrypt() returns -EINPROGRESS,<br />
the operation completes asynchronously. Without crypto_wait_req(),<br />
the function immediately frees the request buffer, leading to crashes<br />
when the driver later accesses the freed memory.<br />
<br />
This results in a use-after-free condition when the hardware crypto<br />
driver later accesses the freed request structure, leading to kernel<br />
crashes with NULL pointer dereferences.<br />
<br />
The issue occurs because crypto_alloc_aead() with mask=0 doesn&#39;t<br />
guarantee synchronous operation. Even without CRYPTO_ALG_ASYNC in<br />
the mask, async implementations can be selected.<br />
<br />
Fix by restoring the async crypto handling:<br />
- DECLARE_CRYPTO_WAIT(wait) for completion tracking<br />
- aead_request_set_callback() for async completion notification<br />
- crypto_wait_req() to wait for operation completion<br />
<br />
This ensures the request buffer isn&#39;t freed until the crypto operation<br />
completes, whether synchronous or asynchronous, while preserving the<br />
CVE-2024-50047 fix.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.10.237 (including) | 5.10.241 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.181 (including) | 5.15.190 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.128 (including) | 6.1.147 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6.57 (including) | 6.6.100 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.11.4 (including) | 6.12.40 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.15.8 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.16:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.16:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* |
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/15a0a5de49507062bc3be4014a403d8cea5533de
- https://git.kernel.org/stable/c/2a76bc2b24ed889a689fb1c9015307bf16aafb5b
- https://git.kernel.org/stable/c/5d047b12f86cc3b9fde1171c02d9bccf4dba0632
- https://git.kernel.org/stable/c/6550b2bef095d0dd2d2c8390d2ea4c3837028833
- https://git.kernel.org/stable/c/8ac90f6824fc44d2e55a82503ddfc95defb19ae0
- https://git.kernel.org/stable/c/9a1d3e8d40f151c2d5a5f40c410e6e433f62f438
- https://git.kernel.org/stable/c/b220bed63330c0e1733dc06ea8e75d5b9962b6b6
- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html



