CVE-2026-31433: ksmbd: fix potencial OOB in get_file_all_info() for compound requests
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix potencial OOB in getfileallinfo() for compound requests
When a compound request consists of QUERYDIRECTORY + QUERYINFO (FILEALLINFORMATION) and the first command consumes nearly the entire maxtranssize, getfileallinfo() would blindly call smbConvertToUTF16() with PATHMAX, causing out-of-bounds write beyond the response buffer. In getfileallinfo(), there was a missing validation check for the client-provided OutputBufferLength before copying the filename into FileName field of the smb2fileallinfo 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 smb2calcmaxoutbuflen() and returning -EINVAL if the buffer is insufficient and updating smbConvertToUTF16 to use the actual filename length (clamped by PATHMAX) to ensure a safe copy operation.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernel ksmbdto a version that resolves this vulnerability.Patch ksmbd: fix potencial OOB in get_file_all_info() for compound requests
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31433?
CVE-2026-31433 is categorized with a medium severity level due to its potential to cause an out-of-bounds access.
How do I fix CVE-2026-31433?
To fix CVE-2026-31433, update your Linux kernel to the latest version where this vulnerability has been addressed.
What impact does CVE-2026-31433 have on systems?
CVE-2026-31433 could allow remote attackers to exploit out-of-bounds access, potentially leading to denial of service or information disclosure.
Which versions of ksmbd are affected by CVE-2026-31433?
CVE-2026-31433 affects ksmbd implemented in the Linux kernel prior to the patch release that addresses this vulnerability.
Is CVE-2026-31433 exploitable in a production environment?
Yes, if not mitigated, CVE-2026-31433 could be exploited in a production environment, posing a security risk.