ksmbd: prevent out-of-bounds stream writes by validating *pos
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: prevent out-of-bounds stream writes by validating *pos
ksmbd_vfs_stream_write() did not validate whether the write offset (*pos) was within the bounds of the existing stream data length (v_len). If *pos was greater than or equal to v_len, this could lead to an out-of-bounds memory write.
This patch adds a check to ensure *pos is less than v_len before proceeding. If the condition fails, -EINVAL is returned.
From the CVE record · Linux
The Linux kernel's ksmbd_vfs_stream_write() did not check whether a write offset was within the existing stream data. A write with an offset greater than or equal to the stream length could cause an out-of-bounds memory write. The input does not specify whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels with ksmbd should check their versions; affected versions were not specified.