CVE-2024-50241: NFSD: Initialize struct nfsd4_copy earlier
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
NFSD: Initialize struct nfsd4_copy earlier
Ensure the refcount and async_copies fields are initialized early. cleanup_async_copy() will reference these fields if an error occurs in nfsd4_copy(). If they are not correctly initialized, at the very least, a refcount underflow occurs.
The Linux kernel CVE team has assigned CVE-2024-50241 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.11.3 with commit 6a488ad7745b and fixed in 6.11.7 with commit e30a9a2f69c3 Issue introduced in 6.12-rc1 with commit aadc3bbea163 and fixed in 6.12-rc6 with commit 63fab04cbd0f Issue introduced in 6.10.14 with commit b4e21431a0db
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-50241
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/nfsd/nfs4proc.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/e30a9a2f69c34a00a3cb4fd45c5d231929e66fb1 https://git.kernel.org/stable/c/63fab04cbd0f96191b6e5beedc3b643b01c15889