knfsd: nfs3svc_decode_writeargs assumes data follows header
Subsystems (2)
RFC PATCH 6/15 knfsd: nfs3svc_decode_writeargs assumes data follows header
The nfs3svc_decode_writeargs routine assumes that the data for an NFS write comes inline with the header when it verifies the message. Since the data for the write does not appear immediately following the header when RDMA is the transport, this check had to be modified.
---
fs/nfsd/nfs3xdr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfsd/nfs3xdr.c +1 -1
@@ -400,7 +400,7 @@ nfs3svc_decode_writeargs(struct svc_rqst rqstp->rq_vec[v].iov_len = len; args->vlen = v+1 ; -return args->count == args->len && rqstp->rq_vec[0 ].iov_len >0 ; +return args->count == args->len && rqstp->rq_arg.len > hdr; }int
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 17 lines · Tom Tucker
The
nfs3svc_decode_writeargsroutine assumes that the data for an NFS write comes inline with the header when it verifies the message. Since the data for the write does not appear immediately following the header when RDMA is the transport, this check had to be modified.Signed-off-by Tom Tucker <[email protected]>---
fs/nfsd/nfs3xdr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nfsd/nfs3xdr.c +0
-0
fs/nfsd/nfs3xdr.c nfs3svc_decode_writeargs(struct svc_rqst · line 404
Quoted 6 lines
fs/nfsd/nfs3xdr.c +1
-1@@ -400,7 +400,7 @@ nfs3svc_decode_writeargs(struct svc_rqst rqstp->rq_vec[v].iov_len = len; args->vlen = v+1 ; -return args->count == args->len && rqstp->rq_vec[0 ].iov_len >0 ; +return args->count == args->len && rqstp->rq_arg.len > hdr; }
You'll want to rebase against at least v2.6.22-rc1; see f34b9568.
--b.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs