CVE-2024-50284: ksmbd: Fix the missing xa_store error check
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: Fix the missing xa_store error check
xa_store() can fail, it return xa_err(-EINVAL) if the entry cannot be stored in an XArray, or xa_err(-ENOMEM) if memory allocation failed, so check error for xa_store() to fix it.
The Linux kernel CVE team has assigned CVE-2024-50284 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.1.71 with commit 052b41ef2abe and fixed in 6.1.117 with commit d8664ce789bd Issue introduced in 6.3 with commit b685757c7b08 and fixed in 6.6.61 with commit 726c1568b914 Issue introduced in 6.3 with commit b685757c7b08 and fixed in 6.11.8 with commit c2a232c4f790 Issue introduced in 6.3 with commit b685757c7b08 and fixed in 6.12 with commit 3abab905b14f Issue introduced in 5.15.145 with commit 1f485b54d04a
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-50284
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/mgmt/user_session.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/d8664ce789bd46290c59a00da6897252f92c237d https://git.kernel.org/stable/c/726c1568b9145fa13ee248df184b186c382a7ff8 https://git.kernel.org/stable/c/c2a232c4f790f4bcd4d218904c56ac7a39a448f5 https://git.kernel.org/stable/c/3abab905b14f4ba756d413f37f1fb02b708eee93