linux-yocto/fs/nfsd
Dai Ngo 1ef6a2deda NFSD: detect mismatch of file handle and delegation stateid in OPEN op
commit 9c65001c57 upstream.

When the client sends an OPEN with claim type CLAIM_DELEG_CUR_FH or
CLAIM_DELEGATION_CUR, the delegation stateid and the file handle
must belong to the same file, otherwise return NFS4ERR_INVAL.

Note that RFC8881, section 8.2.4, mandates the server to return
NFS4ERR_BAD_STATEID if the selected table entry does not match the
current filehandle. However returning NFS4ERR_BAD_STATEID in the
OPEN causes the client to retry the operation and therefor get the
client into a loop. To avoid this situation we return NFS4ERR_INVAL
instead.

Reported-by: Petro Pavlov <petro.pavlov@vastdata.com>
Fixes: c44c5eeb2c ("[PATCH] nfsd4: add open state code for CLAIM_DELEGATE_CUR")
Cc: stable@vger.kernel.org
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-20 18:40:47 +02:00
..
acl.h
auth.c nfsd: avoid pointless cred reference count bump 2024-12-02 11:25:14 +01:00
auth.h
blocklayout.c
blocklayoutxdr.c
blocklayoutxdr.h
cache.h
current_stateid.h
debugfs.c NFSD: Add experimental setting to disable the use of splice read 2025-05-11 19:48:24 -04:00
export.c nfsd: fix access checking for NLM under XPRTSEC policies 2025-05-11 19:48:25 -04:00
export.h nfsd: Revert "nfsd: release svc_expkey/svc_export with rcu_work" 2024-12-17 09:45:23 -05:00
filecache.c nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer 2025-05-28 17:17:14 -04:00
filecache.h nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer 2025-05-28 17:17:14 -04:00
flexfilelayout.c
flexfilelayoutxdr.c
flexfilelayoutxdr.h
idmap.h
Kconfig nfsd: use SHA-256 library API instead of crypto_shash API 2025-05-11 19:48:29 -04:00
localio.c nfsd: avoid ref leak in nfsd_open_local_fh() 2025-08-15 16:39:30 +02:00
lockd.c
Makefile NFSD: Add /sys/kernel/debug/nfsd 2025-05-11 19:48:23 -04:00
netlink.c
netlink.h
netns.h NFS Client Updates for Linux 6.14 2025-01-28 14:23:46 -08:00
nfs2acl.c nfsd: clear acl_access/acl_default after releasing them 2025-02-02 11:31:45 -05:00
nfs3acl.c nfsd: clear acl_access/acl_default after releasing them 2025-02-02 11:31:45 -05:00
nfs3proc.c NFSD 6.16 Release Notes 2025-05-28 12:21:12 -07:00
nfs3xdr.c nfsd: Use lookup_one() rather than lookup_one_len() 2025-04-07 09:25:32 +02:00
nfs4acl.c
nfs4callback.c NFSD: Avoid corruption of a referring call list 2025-06-12 20:37:32 -04:00
nfs4idmap.c
nfs4layouts.c nfsd: prevent callback tasks running concurrently 2025-03-10 09:11:09 -04:00
nfs4proc.c NFSD 6.16 Release Notes 2025-05-28 12:21:12 -07:00
nfs4recover.c NFSD 6.16 Release Notes 2025-05-28 12:21:12 -07:00
nfs4state.c NFSD: detect mismatch of file handle and delegation stateid in OPEN op 2025-08-20 18:40:47 +02:00
nfs4xdr_gen.c nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
nfs4xdr_gen.h nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
nfs4xdr.c NFSD 6.16 Release Notes 2025-05-28 12:21:12 -07:00
nfscache.c
nfsctl.c nfsd: use threads array as-is in netlink interface 2025-06-19 09:35:38 -04:00
nfsd.h NFSD: Add a "default" block size 2025-05-15 16:16:28 -04:00
nfsfh.c nfsd-6.14 fixes: 2025-02-10 13:11:24 -08:00
nfsfh.h nfs: add missing selections of CONFIG_CRC32 2025-04-13 16:39:42 -04:00
nfsproc.c NFSD 6.16 Release Notes 2025-05-28 12:21:12 -07:00
nfssvc.c NFSD: Add a "default" block size 2025-05-15 16:16:28 -04:00
nfsxdr.c NFSD: Remove NFSSVC_MAXBLKSIZE_V2 macro 2025-05-15 16:16:28 -04:00
pnfs.h
state.h NFSD: Implement CB_SEQUENCE referring call lists 2025-05-11 19:48:21 -04:00
stats.c nfsd: don't ignore the return code of svc_proc_register() 2025-03-10 09:10:59 -04:00
stats.h nfsd: don't ignore the return code of svc_proc_register() 2025-03-10 09:10:59 -04:00
trace.c
trace.h nfsd: add tracepoint for getattr and statfs events 2025-05-11 19:48:34 -04:00
vfs.c nfsd: don't set the ctime on delegated atime updates 2025-08-15 16:39:30 +02:00
vfs.h NFSD: De-duplicate the svc_fill_write_vector() call sites 2025-05-15 16:16:23 -04:00
xdr.h
xdr3.h
xdr4.h NFSD: Record each NFSv4 call's session slot index 2025-05-11 19:48:21 -04:00
xdr4cb.h NFSD: Implement CB_SEQUENCE referring call lists 2025-05-11 19:48:20 -04:00