CVE-2024-35865 in Linuxinfo

Summary

by MITRE • 05/19/2024

In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix potential UAF in smb2_is_valid_oplock_break()

Skip sessions that are being teared down (status == SES_EXITING) to avoid UAF.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 06/01/2026

The vulnerability identified as CVE-2024-35865 affects the Linux kernel's SMB client implementation and represents a potential use-after-free condition within the smb2_is_valid_oplock_break() function. This issue specifically arises in the context of Server Message Block protocol handling where the kernel processes oplock break notifications from SMB servers. The flaw occurs when the system attempts to validate oplock breaks while sessions are in the process of termination, creating a scenario where freed memory locations may still be accessed by subsequent operations. Such a condition can lead to unpredictable behavior including system crashes, data corruption, or potential privilege escalation depending on exploitation vectors.

The technical root cause of this vulnerability lies in inadequate session state validation within the SMB client subsystem. When a session enters the SES_EXITING status, indicating that it is in the process of being terminated, the smb2_is_valid_oplock_break() function fails to properly skip these sessions before attempting to access their associated data structures. This oversight creates a window where memory that has been freed as part of the session cleanup process may still be referenced by the oplock validation logic. The use-after-free condition manifests because the function does not check the session status before proceeding with operations that assume the session data structures remain valid, violating fundamental memory safety principles that are critical in kernel-level code execution.

The operational impact of this vulnerability extends beyond simple system instability to potentially compromise system integrity and security. An attacker who can manipulate SMB session termination sequences or trigger specific oplock break scenarios may exploit this condition to cause denial of service attacks that crash the kernel or potentially escalate privileges. The vulnerability affects systems running Linux kernels that implement SMB client functionality, particularly those that frequently negotiate oplocks with SMB servers. Given that SMB is widely used for file sharing and network access in enterprise environments, the potential attack surface is significant, especially in scenarios where untrusted network entities can initiate SMB connections or where session management is not properly secured.

Mitigation strategies for CVE-2024-35865 primarily focus on applying the kernel patch that implements proper session state checking before attempting oplock validation operations. The fix involves adding a simple but critical condition to skip sessions in the SES_EXITING state, ensuring that no operations are performed on memory that has already been freed. System administrators should prioritize updating their Linux kernel versions to include this patch, particularly in environments where SMB client functionality is actively used. Additional defensive measures include network segmentation to limit SMB access from untrusted sources, implementing proper session management policies, and monitoring for unusual SMB session termination patterns that might indicate exploitation attempts. This vulnerability aligns with CWE-416, which specifically addresses use-after-free errors, and may be relevant to ATT&CK techniques related to privilege escalation and denial of service through kernel exploitation. Organizations should also consider implementing automated patch management processes to ensure timely deployment of security fixes and maintain comprehensive monitoring of system stability metrics to detect potential exploitation attempts.

Reservation

05/17/2024

Disclosure

05/19/2024

Moderation

accepted

CPE

ready

EPSS

0.00018

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!