Skip to contentSkip to conversation

CVE-2022-49316: NFSv4: Don't hold the layoutget locks across multiple RPC calls

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

NFSv4: Don't hold the layoutget locks across multiple RPC calls

When doing layoutget as part of the open() compound, we have to be careful to release the layout locks before we can call any further RPC calls, such as setattr(). The reason is that those calls could trigger a recall, which could deadlock.

The Linux kernel CVE team has assigned CVE-2022-49316 to this issue.

Affected and fixed versions
===========================

	Fixed in 4.19.247 with commit 6b3fc1496e7227cd6a39a80bbfb7588ef7c7a010
	Fixed in 5.4.198 with commit a2b3be930e79cc5d9d829f158e31172b2043f0cd
	Fixed in 5.10.122 with commit 0ee5b9644f06b4d3cdcd9544f43f63312e425a4c
	Fixed in 5.15.47 with commit d4c2a041ed3ba114502d5ed6ace5b1a48d637a8e
	Fixed in 5.17.15 with commit 08d7a26d115cc7892668baa9750f64bd8baca29b
	Fixed in 5.18.4 with commit ea759ae0a9ae5acee677d722129710ac89cc59c1
	Fixed in 5.19 with commit 6949493884fe88500de4af182588e071cf1544ee

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-49316

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/nfs/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/6b3fc1496e7227cd6a39a80bbfb7588ef7c7a010
	https://git.kernel.org/stable/c/a2b3be930e79cc5d9d829f158e31172b2043f0cd
	https://git.kernel.org/stable/c/0ee5b9644f06b4d3cdcd9544f43f63312e425a4c
	https://git.kernel.org/stable/c/d4c2a041ed3ba114502d5ed6ace5b1a48d637a8e
	https://git.kernel.org/stable/c/08d7a26d115cc7892668baa9750f64bd8baca29b
	https://git.kernel.org/stable/c/ea759ae0a9ae5acee677d722129710ac89cc59c1
	https://git.kernel.org/stable/c/6949493884fe88500de4af182588e071cf1544ee