X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fnfsd%2Fnfsxdr.c;fp=fs%2Fnfsd%2Fnfsxdr.c;h=b86e3658a0af10ebce825e260ee1fc5fd879f367;hb=ba67a39efde8312e386c6f603054f8945433d91f;hp=986f9b32083c655f792ada9476d3658a71bb37d7;hpb=84427eaef1fb91704c7112bdb598c810003b99f3;p=~andy%2Flinux diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c index 986f9b32083..b86e3658a0a 100644 --- a/fs/nfsd/nfsxdr.c +++ b/fs/nfsd/nfsxdr.c @@ -313,8 +313,11 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p, * Round the length of the data which was specified up to * the next multiple of XDR units and then compare that * against the length which was actually received. + * Note that when RPCSEC/GSS (for example) is used, the + * data buffer can be padded so dlen might be larger + * than required. It must never be smaller. */ - if (dlen != XDR_QUADLEN(len)*4) + if (dlen < XDR_QUADLEN(len)*4) return 0; rqstp->rq_vec[0].iov_base = (void*)p;