]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: fix acl count validation in xfs_acl_from_disk()
authorXi Wang <xi.wang@gmail.com>
Mon, 12 Dec 2011 21:55:52 +0000 (21:55 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 16 Jan 2013 21:44:56 +0000 (16:44 -0500)
commit3dd0cf08574f755be39ad6e17201be070b0887af
treed0e1e798b1e1d520fa84b820b7f610070f8f8306
parent840d7af7a660547e5f73bdd9c1353cc2d9a271d6
xfs: fix acl count validation in xfs_acl_from_disk()

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>
[PG: in 2.6.34, xfs still had "linux-2.6" as a path component.]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/xfs/linux-2.6/xfs_acl.c