CVE-2025-38488
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-07-28

Last updated on: 2025-11-03

Assigner: kernel.org

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-28
Last Modified
2025-11-03
Generated
2026-05-27
AI Q&A
2025-07-28
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a use-after-free bug in the Linux kernel's SMB client code, specifically in the crypt_message() function when using asynchronous cryptographic operations. When hardware crypto accelerators perform encryption or decryption asynchronously, the code incorrectly frees the request buffer before the operation completes. This leads to the hardware driver accessing freed memory, causing kernel crashes due to NULL pointer dereferences.


How can this vulnerability impact me? :

This vulnerability can cause kernel crashes on systems using hardware crypto accelerators with the affected Linux kernel SMB client code. Such crashes can lead to system instability, denial of service, or unexpected reboots, impacting system availability and reliability.


What immediate steps should I take to mitigate this vulnerability?

Apply the patch that restores proper asynchronous crypto handling in the Linux kernel smb client code. This includes using DECLARE_CRYPTO_WAIT for completion tracking, setting aead_request_set_callback for async completion notification, and calling crypto_wait_req to wait for operation completion. These changes ensure the request buffer is not freed until the crypto operation completes, preventing use-after-free crashes. Until patched, avoid using hardware crypto accelerators that perform asynchronous AEAD operations with the affected smb client code.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart