CVE-2022-50235: NFSD: Protect against send buffer overflow in NFSv2 READDIR
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
NFSD: Protect against send buffer overflow in NFSv2 READDIR
Restore the previous limit on the @count argument to prevent a buffer overflow attack.
The Linux kernel CVE team has assigned CVE-2022-50235 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15.12 with commit eabc0aab98e5218ceecd82069b0d6fdfff5ee885 and fixed in 5.15.75 with commit dc7f225090c29a5f3b9419b1af32846a201555e7 Issue introduced in 5.16 with commit 53b1119a6e5028b125f431a0116ba73510d82a72 and fixed in 5.19.17 with commit c2a878095b5c6f04f90553a3c45872f990dab14e Issue introduced in 5.16 with commit 53b1119a6e5028b125f431a0116ba73510d82a72 and fixed in 6.0.3 with commit f59c74df82f6ac9d2ea4e01aa3ae7c6c4481652d Issue introduced in 5.16 with commit 53b1119a6e5028b125f431a0116ba73510d82a72 and fixed in 6.1 with commit 00b4492686e0497fdb924a9d4c8f6f99377e176c
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-2022-50235
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/nfsproc.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/0e57d696f60dee6117a8ace0cac7c5761d375277 https://git.kernel.org/stable/c/dc7f225090c29a5f3b9419b1af32846a201555e7 https://git.kernel.org/stable/c/c2a878095b5c6f04f90553a3c45872f990dab14e https://git.kernel.org/stable/c/f59c74df82f6ac9d2ea4e01aa3ae7c6c4481652d https://git.kernel.org/stable/c/00b4492686e0497fdb924a9d4c8f6f99377e176c