CVE-2024-56626: ksmbd: fix Out-of-Bounds Write in ksmbd_vfs_stream_write
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix Out-of-Bounds Write in ksmbd_vfs_stream_write
An offset from client could be a negative value, It could allows to write data outside the bounds of the allocated buffer. Note that this issue is coming when setting
'vfs objects = streams_xattr parameter' in ksmbd.conf.
The Linux kernel CVE team has assigned CVE-2024-56626 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.120 with commit 8cd7490fc0f268883e86e840cda5311257af69ca Fixed in 6.6.66 with commit 164d3597d26d9acff5d5b8bc3208bdcca942dd6a Fixed in 6.12.5 with commit c5797f195c67132d061d29c57a7c6d30530686f0 Fixed in 6.13-rc2 with commit 313dab082289e460391c82d855430ec8a28ddf81
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-56626
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/smb/server/smb2pdu.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8cd7490fc0f268883e86e840cda5311257af69ca https://git.kernel.org/stable/c/164d3597d26d9acff5d5b8bc3208bdcca942dd6a https://git.kernel.org/stable/c/c5797f195c67132d061d29c57a7c6d30530686f0 https://git.kernel.org/stable/c/313dab082289e460391c82d855430ec8a28ddf81