CVE-2024-56627: ksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read
An offset from client could be a negative value, It could lead to an out-of-bounds read from the stream_buf.
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-56627 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.120 with commit de4d790dcf53be41736239d7ee63849a16ff5d10 Fixed in 6.6.66 with commit 27de4295522e9a33e4a3fc72f7b8193df9eebe41 Fixed in 6.12.5 with commit 81eed631935f2c52cdaf6691c6d48e0b06e8ad73 Fixed in 6.13-rc2 with commit fc342cf86e2dc4d2edb0fc2ff5e28b6c7845adb9
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-56627
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/de4d790dcf53be41736239d7ee63849a16ff5d10 https://git.kernel.org/stable/c/27de4295522e9a33e4a3fc72f7b8193df9eebe41 https://git.kernel.org/stable/c/81eed631935f2c52cdaf6691c6d48e0b06e8ad73 https://git.kernel.org/stable/c/fc342cf86e2dc4d2edb0fc2ff5e28b6c7845adb9