mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Xi Wang <xi.wang@gmail.com>,
	Ben Myers <bpm@sgi.com>
Subject: [20/20] xfs: fix acl count validation in xfs_acl_from_disk()
Date: Tue, 10 Jan 2012 12:07:11 -0800	[thread overview]
Message-ID: <20120110200851.542342130@clark.kroah.org> (raw)
In-Reply-To: <20120110200902.GA5674@kroah.com>

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Xi Wang <xi.wang@gmail.com>

commit 093019cf1b18dd31b2c3b77acce4e000e2cbc9ce upstream.

Commit fa8b18ed didn't prevent the integer overflow and possible
memory corruption.  "count" can go negative and bypass the check.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/xfs/linux-2.6/xfs_acl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/xfs/linux-2.6/xfs_acl.c
+++ b/fs/xfs/linux-2.6/xfs_acl.c
@@ -37,7 +37,7 @@ xfs_acl_from_disk(struct xfs_acl *aclp)
 	struct posix_acl_entry *acl_e;
 	struct posix_acl *acl;
 	struct xfs_acl_entry *ace;
-	int count, i;
+	unsigned int count, i;
 
 	count = be32_to_cpu(aclp->acl_cnt);
 	if (count > XFS_ACL_MAX_ENTRIES)



      parent reply	other threads:[~2012-01-10 20:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-10 20:09 [00/20] 2.6.32.54-longterm review Greg KH
2012-01-10 20:06 ` [01/20] MAINTAINERS: stable: Update address Greg KH
2012-01-10 20:06 ` [02/20] Documentation: Update stable address Greg KH
2012-01-10 20:06 ` [03/20] firmware: Fix an oops on reading fw_priv->fw in sysfs loading file Greg KH
2012-01-10 20:06 ` [04/20] offb: Fix setting of the pseudo-palette for >8bpp Greg KH
2012-01-10 20:06 ` [05/20] offb: Fix bug in calculating requested vram size Greg KH
2012-01-10 20:06 ` [06/20] asix: new device id Greg KH
2012-01-10 20:06 ` [07/20] reiserfs: Fix quota mount option parsing Greg KH
2012-01-10 20:06 ` [08/20] reiserfs: Force inode evictions before umount to avoid crash Greg KH
2012-01-10 20:07 ` [09/20] USB: update documentation for usbmon Greg KH
2012-01-10 20:07 ` [10/20] drivers/usb/class/cdc-acm.c: clear dangling pointer Greg KH
2012-01-10 20:07 ` [11/20] USB: isight: fix kernel bug when loading firmware Greg KH
2012-01-10 20:07 ` [12/20] usb: usb-storage doesnt support dynamic id currently, the patch disables the feature to fix an oops Greg KH
2012-01-10 20:07 ` [13/20] USB: add quirk for another camera Greg KH
2012-01-10 20:07 ` [14/20] USB: omninet: fix write_room Greg KH
2012-01-10 20:07 ` [15/20] USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c Greg KH
2012-01-10 20:07 ` [16/20] asix: fix infinite loop in rx_fixup() Greg KH
2012-01-10 20:07 ` [17/20] PM / Sleep: Fix race between CPU hotplug and freezer Greg KH
2012-01-10 20:07 ` [18/20] SCSI: scsi_dh: check queuedata pointer before proceeding further Greg KH
2012-01-10 20:07 ` [19/20] xfs: validate acl count Greg KH
2012-01-10 20:07 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120110200851.542342130@clark.kroah.org \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bpm@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=xi.wang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®