]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs4_setup_readdir(): insufficient locking for ->d_parent->d_inode dereferencing
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Sep 2025 16:22:45 +0000 (17:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:13 +0000 (12:45 +0100)
commit6025f641a0e30afdc5aa62017397b1860ad9f677
treebd053de79d6ab52f365d1eed87647870dfd6dcb0
parent0123f9754ba2e63111c1b5a6caf496f52a731c48
nfs4_setup_readdir(): insufficient locking for ->d_parent->d_inode dereferencing

[ Upstream commit a890a2e339b929dbd843328f9a92a1625404fe63 ]

Theoretically it's an oopsable race, but I don't believe one can manage
to hit it on real hardware; might become doable on a KVM, but it still
won't be easy to attack.

Anyway, it's easy to deal with - since xdr_encode_hyper() is just a call of
put_unaligned_be64(), we can put that under ->d_lock and be done with that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c