ksmbd: fix buffer validation by including null terminator size in EA length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
bb5bf157b5be1643cccc7cbbe57fcdef9ae52c2c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix buffer validation by including null terminator size in EA length
The smb2_set_ea function, which handles Extended Attributes (EA), was performing buffer validation checks that incorrectly omitted the size of the null terminating character (+1 byte) for EA Name. This patch fixes the issue by explicitly adding '+ 1' to EaNameLength where the null terminator is expected to be present in the buffer, ensuring the validation accurately reflects the total required buffer size.
From the CVE record · Linux
The Linux kernel's ksmbd smb2_set_ea function failed to include the EA name's null terminator when validating buffer length. This can allow an undersized buffer to pass validation. The input does not specify attacker capabilities, authentication requirements, or user interaction.
Engineers running Linux kernels with ksmbd should check their versions; affected versions were not provided.