aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Bruce Fields2013-03-26 13:11:13 -0500
committerGreg Kroah-Hartman2013-04-05 11:26:15 -0500
commit4717a20b67dfc024c6ee90c968889068b5e4b3aa (patch)
treedf97fe194047ede96a7a9b060d07dd2321dbbb36
parentd9d3fba85c14cef1dbdace865d7825c01839c941 (diff)
downloadkernel-omap-4717a20b67dfc024c6ee90c968889068b5e4b3aa.tar.gz
kernel-omap-4717a20b67dfc024c6ee90c968889068b5e4b3aa.tar.xz
kernel-omap-4717a20b67dfc024c6ee90c968889068b5e4b3aa.zip
nfsd4: reject "negative" acl lengths
commit 64a817cfbded8674f345d1117b117f942a351a69 upstream. 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> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/nfsd/nfs4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 0dc11586682f..d1dd7100a556 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -264,7 +264,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
264 iattr->ia_valid |= ATTR_SIZE; 264 iattr->ia_valid |= ATTR_SIZE;
265 } 265 }
266 if (bmval[0] & FATTR4_WORD0_ACL) { 266 if (bmval[0] & FATTR4_WORD0_ACL) {
267 int nace; 267 u32 nace;
268 struct nfs4_ace *ace; 268 struct nfs4_ace *ace;
269 269
270 READ_BUF(4); len += 4; 270 READ_BUF(4); len += 4;