CVE-2025-38488: smb: client: fix use-after-free in crypt_message when using async crypto
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.
Security readout for executives and security teams
Plain-English summary
A Linux system using the SMB client can free a cryptographic request before hardware-assisted encryption finishes. The hardware driver may later access that freed memory and crash the kernel, disrupting file access and dependent services. The supplied evidence confirms availability risk but does not demonstrate data theft, modification, or code execution.
Executive priority
Treat this as urgent for systems supporting critical SMB-dependent workloads, especially those using hardware crypto acceleration. Inventory exposure and deploy vendor-fixed kernels promptly. The critical score supports rapid handling, but fleet-wide emergency action should be based on confirmed SMB client usage and vendor package applicability.
Technical view
The Linux SMB client’s crypt_message() omitted asynchronous completion handling after the CVE-2024-50047 fix. An AEAD operation returning -EINPROGRESS could leave work active while its request buffer was freed, causing a use-after-free and NULL-pointer kernel crashes. The cited correction restores completion callbacks and waits before freeing the buffer.
Likely exposure
Exposure is highest on affected Linux kernels acting as SMB clients where the selected AEAD implementation completes asynchronously, particularly with hardware crypto accelerators. Systems not using the SMB client or affected crypto path are less likely to trigger it. Distribution backports and the supplied version metadata require vendor-specific verification.
Exploitation context
The bundle marks this CVE as absent from KEV and provides no evidence of active or public exploitation. It describes a kernel-crash condition involving asynchronous crypto. Although the supplied CVSS is 9.8 with a network vector, the available technical description does not establish attacker-controlled code execution or confidentiality and integrity impact.
Researcher notes
This is a regression associated with the CVE-2024-50047 correction. Selecting AEAD with mask zero did not guarantee synchronous execution, so removing crypto_wait_req() created the lifetime error. The fix restores DECLARE_CRYPTO_WAIT, an asynchronous completion callback, and waiting before request-buffer release. Package-level affectedness remains distribution-specific.
Mitigation direction
Apply the vendor kernel update containing a cited upstream stable fix for your supported branch.
Use distribution advisories to map fixed package versions; upstream kernel numbers may not reflect backports.
Prioritize SMB clients using encrypted sessions and hardware crypto acceleration.
If immediate updating is impossible, consult vendor guidance for supported temporary risk reduction.
Validation and detection
Record running kernel and distribution package versions across Linux systems.
Identify systems using Linux SMB clients, encrypted SMB sessions, and hardware crypto acceleration.
Confirm installed packages contain the applicable upstream stable correction or vendor backport.
Review kernel logs for SMB crypto crashes, NULL-pointer dereferences, or use-after-free reports.
After updating, reboot affected systems and verify the fixed kernel is running.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38488 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
10Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.