Files
linux-stable-mirror/fs
Dai NgoandGreg Kroah-Hartman f0b89916d2 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-28 16:28:11 +02:00
..
2024-08-19 06:04:25 +02:00
2025-08-01 09:47:32 +01:00
2024-10-22 15:46:20 +02:00
2025-08-15 12:08:40 +02:00
2024-08-19 06:04:25 +02:00
2025-03-22 12:50:41 -07:00
2024-08-19 06:04:25 +02:00
2025-06-27 11:08:57 +01:00