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: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
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. This flaw corresponds to classic out‑of‑bounds writes (CWE-120) and also to off‑by‑one read/write errors (CWE-125).

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. The CVSS score is 8.8 and the EPSS score indicates a very low exploitation probability (<1%), with no listing 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 May 26, 2026 at 15:37 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 May 26, 2026 at 15:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4561-1 linux-6.1 security update
Debian DSA Debian DSA DSA-6238-1 linux security update
Debian DSA Debian DSA DSA-6243-1 linux security update
History

Tue, 26 May 2026 13:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-125
CPEs cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*

Tue, 28 Apr 2026 16:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Mon, 27 Apr 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


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-05-23T16:05:00.764Z

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

Link: CVE-2026-31433

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

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

Modified: 2026-05-22T12:08:44.650

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-05-26T15:45:08Z

Weaknesses