Skip to content

Commit 61c8c52

Browse files
J. Bruce Fieldssashalevin
authored andcommitted
nfsd4: disallow SEEK with special stateids
[ Upstream commit 980608f ] If the client uses a special stateid then we'll pass a NULL file to vfs_llseek. Fixes: 24bab49 " NFSD: Implement SEEK" Cc: Anna Schumaker <Anna.Schumaker@Netapp.com> Cc: stable@vger.kernel.org Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
1 parent 5a9fb83 commit 61c8c52

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/nfsd/nfs4proc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,8 @@ nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
10281028
dprintk("NFSD: nfsd4_seek: couldn't process stateid!\n");
10291029
return status;
10301030
}
1031+
if (!file)
1032+
return nfserr_bad_stateid;
10311033

10321034
switch (seek->seek_whence) {
10331035
case NFS4_CONTENT_DATA:

0 commit comments

Comments
 (0)