diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-03-26 14:11:13 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-03-26 16:18:27 -0400 |
commit | 64a817cfbded8674f345d1117b117f942a351a69 (patch) | |
tree | 0095ce868b0da2305045cedfdd8ead602aa12f72 /fs | |
parent | e49dbbf3e770aa590a8a464ac4978a09027060b9 (diff) | |
download | linux-stable-64a817cfbded8674f345d1117b117f942a351a69.tar.gz linux-stable-64a817cfbded8674f345d1117b117f942a351a69.tar.bz2 linux-stable-64a817cfbded8674f345d1117b117f942a351a69.zip |
nfsd4: reject "negative" acl lengths
Since we only enforce an upper bound, not a lower bound, a "negative"
length can get through here.
The symptom seen was a warning when we attempt to a kmalloc with an
excessive size.
Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 01168865dd37..a2720071f282 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -264,7 +264,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, iattr->ia_valid |= ATTR_SIZE; } if (bmval[0] & FATTR4_WORD0_ACL) { - int nace; + u32 nace; struct nfs4_ace *ace; READ_BUF(4); len += 4; |