CVE-2025-38488
smb: client: fix use-after-free in crypt_message when using async crypto
Reported by linux · Published July 28, 2025
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix use-after-free in crypt_message when using async crypto The CVE-2024-50047 fix removed asynchronous crypto handling from crypt_message(), assuming all crypto operations are synchronous. However, when hardware crypto accelerators are used, this can cause use-after-free crashes: crypt_message() // Allocate the creq buffer containing the req creq = smb2_get_aead_req(..., &req); // Async encryption returns -EINPROGRESS immediately rc = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); // Free creq while async operation is still in progress kvfree_sensitive(creq, ...); Hardware crypto modules often implement async AEAD operations for performance. When crypto_aead_encrypt/decrypt() returns -EINPROGRESS, the operation completes asynchronously. Without crypto_wait_req(), the function immediately frees the request buffer, leading to crashes when the driver later accesses the freed memory. This results in a use-after-free condition when the hardware crypto driver later accesses the freed request structure, leading to kernel crashes with NULL pointer dereferences. The issue occurs because crypto_alloc_aead() with mask=0 doesn't guarantee synchronous operation. Even without CRYPTO_ALG_ASYNC in the mask, async implementations can be selected. Fix by restoring the async crypto handling: - DECLARE_CRYPTO_WAIT(wait) for completion tracking - aead_request_set_callback() for async completion notification - crypto_wait_req() to wait for operation completion This ensures the request buffer isn't freed until the crypto operation completes, whether synchronous or asynchronous, while preserving the CVE-2024-50047 fix.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-devel | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
| kernel6.12-tools-devel | Amazon Linux | 1:6.12.40-63.114.amzn2023 |
| perf | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
| bpftool6.12 | Amazon Linux | 1:6.12.40-63.114.amzn2023 |
| kernel-tools | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.40-63.114.amzn2023 |
| python3-perf6.12 | Amazon Linux | 1:6.12.40-63.114.amzn2023 |
| kernel6.12-modules-extra-common | Amazon Linux | 1:6.12.40-63.114.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
| kernel-libbpf | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
| kernel-headers | Amazon Linux | 1:6.1.147-172.266.amzn2023 |
9 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 8f14a476abba13144df5434871a7225fd29af633, ef51c0d544b1518b35364480317ab6d3468f205d, bce966530fd5542bbb422cb45ecb775f7a1a6bc3 |
| Linux | Linux | 6.12, 0, 5.10.241 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel6.12-libbpf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | bpftool | 0 |
…and 12 more
Timeline
- Jul 28, 2025 EPSS Score (30 in total, the first dated here)
- Jul 28, 2025 CVE Published
- Oct 12, 2025 PoC Published (11 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (159 in total, the first dated here)
- Mar 29, 2026 Security Advisory (205 in total, the first dated here)
- Jun 9, 2026 Coalition ESS Score
- Oct 7, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-38488
vulnetix vdb fixes CVE-2025-38488
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-38488/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart