Linux kernel buffer overflow in ksmbd stream info
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| Linux Linux | — |
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: reserve space for the UTF-16 terminator in stream info
smb_strtoUTF16() always writes a terminating zero UTF-16 unit after the converted characters, but get_file_stream_info() budgets only sizeof(struct smb2_file_stream_info) + streamlen * 2 for a stream entry and sizeof(struct smb2_file_stream_info) + 7 * 2 for the trailing "::$DATA" entry. When an entry exactly fills the 448-byte small response buffer, the terminator is written two bytes past the allocation.
Reserve one extra UTF-16 unit in both budget checks. The terminator is not part of the wire format, so the reported lengths are unchanged.
From the CVE record · Linux
The Linux kernel's ksmbd stream-info code can write a UTF-16 terminator two bytes past an allocation when a stream entry exactly fills the 448-byte small response buffer. The input does not specify what an attacker could achieve or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with ksmbd should check their vendor's advisory; affected versions are not specified.