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

ksmbd: fix potencial OOB in get_file_all_info() for compound requests

When a compound request consists of QUERY_DIRECTORY + QUERY_INFO
(FILE_ALL_INFORMATION) and the first command consumes nearly the entire
max_trans_size, get_file_all_info() would blindly call smbConvertToUTF16()
with PATH_MAX, causing out-of-bounds write beyond the response buffer.
In get_file_all_info(), there was a missing validation check for
the client-provided OutputBufferLength before copying the filename into
FileName field of the smb2_file_all_info structure.
If the filename length exceeds the available buffer space, it could lead to
potential buffer overflows or memory corruption during smbConvertToUTF16
conversion. This calculating the actual free buffer size using
smb2_calc_max_out_buf_len() and returning -EINVAL if the buffer is
insufficient and updating smbConvertToUTF16 to use the actual filename
length (clamped by PATH_MAX) to ensure a safe copy operation.
Published: 2026-04-22
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: Buffer Overflow
Action: Apply Patch
AI Analysis

Impact

A vulnerability in the Linux kernel’s ksmbd SMB server allows an attacker to overflow a kernel buffer when processing a compound request that combines a directory query with a file information request. The get_file_all_info() routine fails to validate the client‑supplied OutputBufferLength before copying the filename into the FileName field, and smbConvertToUTF16() then writes up to a fixed PATH_MAX length. A crafted request with an oversized filename can therefore write beyond the allocated response buffer, corrupting kernel memory and potentially causing a system crash or, depending on an attacker’s technique, enabling execution of code with kernel privilege.

Affected Systems

All Linux kernel implementations that include the ksmbd service before the fix are affected. This encompasses any distribution using an unpatched kernel where the committed patch for buffer size validation and safe conversion has not been applied. The vulnerability resides in the ksmbd module, which handles SMB2/SMB3 traffic, so hosts that expose SMB services to external networks are at risk.

Risk and Exploitability

The issue presents a classic out‑of‑bounds write that can corrupt kernel memory. No CVSS score or EPSS value is included in the CVE data, and the vulnerability is not listed in CISA's KEV catalog. Exploitation requires a remote attacker to send a specially crafted compound SMB request. While no public exploits have been documented, the theoretical impact is significant for environments that accept SMB traffic.

Generated by OpenCVE AI on April 22, 2026 at 09:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch that adds buffer size validation and safe filename conversion in ksmbd’s get_file_all_info() function.
  • Reboot the system to ensure the patched kernel is loaded.
  • Restrict or filter SMB traffic from untrusted networks with firewall rules until the patch is deployed.

Generated by OpenCVE AI on April 22, 2026 at 09:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 22 Apr 2026 12:15:00 +0000


Wed, 22 Apr 2026 10:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-120
CWE-20

Wed, 22 Apr 2026 08:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix potencial OOB in get_file_all_info() for compound requests When a compound request consists of QUERY_DIRECTORY + QUERY_INFO (FILE_ALL_INFORMATION) and the first command consumes nearly the entire max_trans_size, get_file_all_info() would blindly call smbConvertToUTF16() with PATH_MAX, causing out-of-bounds write beyond the response buffer. In get_file_all_info(), there was a missing validation check for the client-provided OutputBufferLength before copying the filename into FileName field of the smb2_file_all_info structure. If the filename length exceeds the available buffer space, it could lead to potential buffer overflows or memory corruption during smbConvertToUTF16 conversion. This calculating the actual free buffer size using smb2_calc_max_out_buf_len() and returning -EINVAL if the buffer is insufficient and updating smbConvertToUTF16 to use the actual filename length (clamped by PATH_MAX) to ensure a safe copy operation.
Title ksmbd: fix potencial OOB in get_file_all_info() for compound requests
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-04-22T08:15:11.719Z

Reserved: 2026-03-09T15:48:24.089Z

Link: CVE-2026-31433

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-04-22T09:16:21.573

Modified: 2026-04-23T16:17:41.280

Link: CVE-2026-31433

cve-icon Redhat

Severity :

Publid Date: 2026-04-22T00:00:00Z

Links: CVE-2026-31433 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-22T15:00:05Z

Weaknesses