Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-37750

CVE-2025-37750: Linux Kernel Use-After-Free Vulnerability

CVE-2025-37750 is a use-after-free vulnerability in the Linux Kernel SMB client affecting multichannel decryption. This flaw allows simultaneous access to shared cryptographic resources. Learn about technical details, impact, and mitigation.

Published:

CVE-2025-37750 Overview

CVE-2025-37750 is a use-after-free vulnerability [CWE-416] in the Linux kernel's SMB client implementation. The flaw affects the decryption path when SMB multichannel and encryption (seal) are enabled simultaneously. Multiple cifsd kernel threads, one per channel, concurrently access an AEAD transformation object (TFM) that was shared from the primary server after prior fixes consolidated crypto allocation.

The race condition triggers memory corruption during synchronous decryption of SMB3.1.1 traffic, detected by KASAN as a slab use-after-free in gf128mul_4k_lle. The bug was introduced by commits f7025d861694 and b0abcd65ec54, which optimized crypto allocation but did not account for concurrent access across channels.

Critical Impact

Local attackers with the ability to mount SMB shares using multichannel and encryption can trigger kernel memory corruption, leading to denial of service or potential privilege escalation.

Affected Products

  • Linux Kernel versions containing commits f7025d861694 and b0abcd65ec54
  • Linux Kernel 6.15-rc1 (confirmed reproducer)
  • Systems using the cifs.ko client with vers=3.1.1,multichannel,seal mount options

Discovery Timeline

  • 2025-05-01 - CVE-2025-37750 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-37750

Vulnerability Analysis

The vulnerability resides in the Linux kernel SMB client's encrypted-traffic handling path. When SMB multichannel is negotiated with encryption, each channel spawns a dedicated cifsd kernel thread to demultiplex incoming frames. Following the referenced optimization commits, secondary channels reused the AEAD TFM allocated for the primary server rather than allocating their own.

Synchronous AEAD decryption maintains per-request state within the TFM context, including GHASH tables consumed by gf128mul_4k_lle. Concurrent cifsd threads calling decrypt_raw_data and crypt_message on the same TFM race in ghash_update and shash_ahash_update, corrupting internal state. KASAN reports a slab-use-after-free when one thread frees or repurposes state that another thread is actively reading.

Root Cause

The root cause is unsynchronized sharing of a stateful cryptographic transformation object across multiple kernel threads. AEAD TFMs in synchronous mode are not designed for concurrent access, and the SMB client did not add locking or per-channel allocation when consolidating crypto to the primary server.

Attack Vector

Exploitation requires local access with permissions to mount SMB shares using multichannel and encryption. An adversary controlling an SMB server, or influencing traffic on a legitimate connection, can trigger the race by inducing simultaneous encrypted responses across channels. The fstests generic/249 workload against a Windows Server 2022 target reliably reproduces the condition.

The kernel patches allocate a dedicated AEAD TFM for each channel or introduce serialization, preventing concurrent access to shared crypto state. See the upstream fixes referenced in the kernel commit e859b21 and related backports.

Detection Methods for CVE-2025-37750

Indicators of Compromise

  • KASAN reports referencing gf128mul_4k_lle, ghash_update, or crypt_message from the cifs module
  • Kernel oops or panic traces originating in cifs_demultiplex_thread on hosts using SMB multichannel with encryption
  • Unexpected cifsd thread crashes coinciding with active SMB3.1.1 sessions

Detection Strategies

  • Audit mount tables for cifs mounts using multichannel and seal options via mount | grep cifs or /proc/mounts
  • Monitor dmesg and journalctl -k for KASAN slab-use-after-free reports referencing the cifs module
  • Inventory running kernels against the fixed versions listed in the vendor advisories

Monitoring Recommendations

  • Enable persistent kernel log collection and forward dmesg output to a centralized log store for anomaly review
  • Track SMB client mount events and correlate with subsequent kernel error messages
  • Alert on repeated cifsd thread terminations or kernel warnings on systems interacting with SMB shares

How to Mitigate CVE-2025-37750

Immediate Actions Required

  • Apply the upstream kernel patches referenced in the vendor advisories or update to a distribution kernel that includes the fix
  • Identify hosts using SMB multichannel with encryption and prioritize them for patching
  • Restrict which users and containers can invoke mount.cifs with encryption and multichannel options

Patch Information

The fix is available in four upstream commits: 9502dd5, 9505579, aa5a1e4, and e859b21. These patches ensure that each channel has its own AEAD TFM or serializes access to shared crypto state, closing the race condition.

Workarounds

  • Disable SMB multichannel by mounting with max_channels=1 until the kernel patch can be applied
  • Remove the seal mount option where encryption is not mandated by policy
  • Downgrade the SMB dialect to vers=3.0 on affected mounts to bypass the vulnerable code path
bash
# Mount SMB share without multichannel to avoid the race condition
mount -t cifs //server/share /mnt/share \
  -o vers=3.1.1,seal,max_channels=1,username=user

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.