From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130411202609.286802595@goodmis.org> Date: Thu, 11 Apr 2013 16:27:23 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Toralf=20F=C3=B6rster?= , , "J. Bruce Fields" Subject: [ 140/171 ] nfsd4: reject "negative" acl lengths References: <20130411202503.783159048@goodmis.org> Content-Disposition: inline; filename=0140-nfsd4-reject-negative-acl-lengths.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.2 stable review patch. If anyone has any objections, please let me know. ------------------ From: "J. Bruce Fields" [ Upstream commit 64a817cfbded8674f345d1117b117f942a351a69 ] 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 Cc: stable@kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Steven Rostedt --- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 6322df3..551b061 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -263,7 +263,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; -- 1.7.10.4