]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: fix acl count validation in xfs_acl_from_disk()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 Jan 2012 13:55:16 +0000 (16:55 +0300)
committerGuru Anbalagane <guru.anbalagane@oracle.com>
Wed, 1 Feb 2012 07:26:37 +0000 (23:26 -0800)
commit31498a2430b153f12776b51c7b37e95e08834834
treecb048ce84cc25e66615b2620f3cf2700941ce8c2
parent48009387402b8b4a4306cb49bf149c2b93f8f775
xfs: fix acl count validation in xfs_acl_from_disk()

We applied a fix for CVE-2012-0038 fa8b18edd7 "xfs: validate acl count",
but there was a follow on patch which is not in our kernel.  If count
was a negative then we could get by the new check.

From 093019cf1b18dd31b2c3b77acce4e000e2cbc9ce Mon Sep 17 00:00:00 2001
From: Xi Wang <xi.wang@gmail.com>
Date: Mon, 12 Dec 2011 21:55:52 +0000
Subject: [PATCH] xfs: fix acl count validation in xfs_acl_from_disk()

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: Dan Carpenter <dan.carpenter@oracle.com>
fs/xfs/linux-2.6/xfs_acl.c