CVE-2026-99389: smb: server: size directory name conversion buffer correctly
In the Linux kernel, the following vulnerability has been resolved:
smb: server: size directory name conversion buffer correctly
A 2048-byte ASCII directory name needs 4098 bytes when converted to UTF-16, including the terminator. ksmbdconvertdirinfoname() caps its allocation at PATHMAX and writes past the end of that buffer.
Allocate space for one UTF-16 code unit per input byte plus the terminator. Use kmallocarray() to check the size calculation.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1 - Compensating control
In Linux kernel ksmbd_convert_dir_info_name(), allocate space for one UTF-16 code unit per input byte plus the terminator, and use kmalloc_array() to check the size calculation instead of capping the buffer at PATH_MAX.