CVE-2023-3865 in Linuxinfo

Summary

by MITRE • 08/16/2025

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

ksmbd: fix out-of-bound read in smb2_write

ksmbd_smb2_check_message doesn't validate hdr->NextCommand. If ->NextCommand is bigger than Offset + Length of smb2 write, It will allow oversized smb2 write length. It will cause OOB read in smb2_write.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 01/30/2026

The vulnerability identified as CVE-2023-3865 resides within the Linux kernel's ksmbd implementation, specifically affecting the SMB2 protocol handling mechanisms. This issue manifests as an out-of-bounds read condition that occurs during the processing of SMB2 write operations, representing a critical security flaw that could potentially be exploited by malicious actors to gain unauthorized access to system resources or compromise the integrity of networked file services.

The technical root cause of this vulnerability stems from inadequate input validation within the ksmbd_smb2_check_message function which fails to properly validate the hdr->NextCommand field. When this field contains a value exceeding the bounds defined by the Offset plus Length parameters of the smb2 write operation, the system permits an oversized write length to proceed. This validation gap creates a scenario where the smb2_write function attempts to read data beyond the allocated buffer boundaries, resulting in an out-of-bounds read condition that can potentially expose sensitive memory contents or cause system instability.

The operational impact of CVE-2023-3865 extends beyond simple data corruption, as it represents a fundamental flaw in the kernel's security model for handling SMB2 protocol communications. Attackers could exploit this vulnerability to extract confidential information from kernel memory, potentially gaining access to credentials, encryption keys, or other sensitive data stored in memory regions. The vulnerability particularly affects systems running Linux kernels with ksmbd support enabled, making it a significant concern for networked environments where SMB2 file sharing services are actively utilized. This flaw directly relates to CWE-129, which addresses improper validation of input boundaries, and aligns with ATT&CK technique T1071.004 for application layer protocol usage in SMB communications.

Mitigation strategies for this vulnerability should prioritize immediate kernel updates from trusted sources, as the primary fix involves correcting the validation logic within the ksmbd implementation to properly enforce bounds checking on the NextCommand field. System administrators should also implement network segmentation and access controls to limit exposure of affected services, while monitoring for anomalous SMB2 traffic patterns that might indicate exploitation attempts. Additionally, organizations should conduct thorough vulnerability assessments to identify all systems running affected kernel versions and establish incident response procedures to address potential exploitation attempts. The fix typically involves implementing proper boundary checks before processing NextCommand values and ensuring that all SMB2 write operations validate their parameters against the actual buffer dimensions to prevent the out-of-bounds memory access condition that characterizes this vulnerability.

Reservation

07/24/2023

Disclosure

08/16/2025

Moderation

accepted

CPE

ready

EPSS

0.00514

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!