]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Fix filehandle bounds checking in nfs_fh_to_dentry()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Jul 2025 13:24:58 +0000 (09:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:09:01 +0000 (12:09 +0200)
commit12ad3def2e5e0b120e3d0cb6ce8b7b796819ad40
tree773baaf3be1c369310e1d2ecf58dc19109497d5c
parent30a739931ed808c6c3c60d6296622444af6dbf0c
NFS: Fix filehandle bounds checking in nfs_fh_to_dentry()

[ Upstream commit ef93a685e01a281b5e2a25ce4e3428cf9371a205 ]

The function needs to check the minimal filehandle length before it can
access the embedded filehandle.

Reported-by: zhangjian <zhangjian496@huawei.com>
Fixes: 20fa19027286 ("nfs: add export operations")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/export.c