FlawAtlas
Search the atlas
CVE-2025-38488 Not scored

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.

Exploit probability 0.3%
Published July 28, 2025
Required by Not available
Last source change July 15, 2026

02 / AFFECTED SOFTWARE

Affected packages

Linux Kernel
Unknown Unknown

913 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

related OPENSUSE-SU-2025:20081-1
related SUSE-SU-2025:03600-1
related SUSE-SU-2025:03601-1
related SUSE-SU-2025:03602-1
related SUSE-SU-2025:03613-1
related SUSE-SU-2025:03614-1
related SUSE-SU-2025:03615-1
related SUSE-SU-2025:03626-1
related SUSE-SU-2025:03628-1
related SUSE-SU-2025:03633-1
related SUSE-SU-2025:03634-1
related SUSE-SU-2025:20851-1
related SUSE-SU-2025:20861-1
related SUSE-SU-2025:20870-1
related SUSE-SU-2025:20898-1
related SUSE-SU-2025:21074-1
related SUSE-SU-2025:21139-1
related SUSE-SU-2025:21179-1
related SUSE-SU-2025:3716-1
related SUSE-SU-2025:3725-1
related SUSE-SU-2025:3751-1
related SUSE-SU-2025:3761-1
related SUSE-SU-2026:0939-1
related SUSE-SU-2026:0940-1
related SUSE-SU-2026:0941-1
related SUSE-SU-2026:0951-1
related SUSE-SU-2026:0953-1
related SUSE-SU-2026:0954-1
related SUSE-SU-2026:0958-1
related SUSE-SU-2026:0983-1
related SUSE-SU-2026:0985-1
related SUSE-SU-2026:0992-1
related SUSE-SU-2026:1000-1
related SUSE-SU-2026:1002-1
related SUSE-SU-2026:1039-1
related SUSE-SU-2026:1044-1
related SUSE-SU-2026:1046-1
related SUSE-SU-2026:1049-1
related SUSE-SU-2026:1073-1
related SUSE-SU-2026:1083-1
related SUSE-SU-2026:1088-1
related SUSE-SU-2026:1089-1
related SUSE-SU-2026:1096-1
related SUSE-SU-2026:1101-1
related SUSE-SU-2026:1125-1
related SUSE-SU-2026:1132-1
related SUSE-SU-2026:20831-1
related SUSE-SU-2026:20841-1
related SUSE-SU-2026:20847-1
related SUSE-SU-2026:20848-1
related SUSE-SU-2026:20849-1
related SUSE-SU-2026:20850-1
related SUSE-SU-2026:20851-1
related SUSE-SU-2026:20852-1
related SUSE-SU-2026:20853-1
related SUSE-SU-2026:20854-1
related SUSE-SU-2026:20857-1
related SUSE-SU-2026:20858-1
related SUSE-SU-2026:20859-1
related SUSE-SU-2026:20860-1
related SUSE-SU-2026:20861-1
related SUSE-SU-2026:20862-1
related SUSE-SU-2026:20863-1
related SUSE-SU-2026:20880-1
related SUSE-SU-2026:20881-1
related SUSE-SU-2026:20882-1
related SUSE-SU-2026:20883-1
related SUSE-SU-2026:20884-1
related SUSE-SU-2026:20885-1
related SUSE-SU-2026:20886-1
related SUSE-SU-2026:20891-1
related SUSE-SU-2026:20892-1
related SUSE-SU-2026:20893-1
related SUSE-SU-2026:20894-1
related SUSE-SU-2026:20895-1
related SUSE-SU-2026:20896-1
related SUSE-SU-2026:20897-1
related SUSE-SU-2026:20898-1
related SUSE-SU-2026:20946-1

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2025-38488

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.

View original source

05 / REFERENCES

Further evidence