mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
NFSD: prevent underflow in nfssvc_decode_writeargs()
commit 184416d4b9
upstream.
Smatch complains:
fs/nfsd/nfsxdr.c:341 nfssvc_decode_writeargs()
warn: no lower bound on 'args->len'
Change the type to unsigned to prevent this issue.
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dd7d3a609a
commit
438068f491
2 changed files with 2 additions and 2 deletions
|
@ -227,7 +227,7 @@ nfsd_proc_write(struct svc_rqst *rqstp)
|
|||
__be32 nfserr;
|
||||
unsigned long cnt = argp->len;
|
||||
|
||||
dprintk("nfsd: WRITE %s %d bytes at %d\n",
|
||||
dprintk("nfsd: WRITE %s %u bytes at %d\n",
|
||||
SVCFH_fmt(&argp->fh),
|
||||
argp->len, argp->offset);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ struct nfsd_readargs {
|
|||
struct nfsd_writeargs {
|
||||
svc_fh fh;
|
||||
__u32 offset;
|
||||
int len;
|
||||
__u32 len;
|
||||
int vlen;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue