]> git.baikalelectronics.ru Git - kernel.git/commit
xen/blkback: Check device permissions before allowing OP_DISCARD
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 16 Jan 2013 16:33:52 +0000 (11:33 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 7 Jun 2013 21:05:55 +0000 (17:05 -0400)
commit9062718886269992de8925a05bc9fff88f461b23
treeab604a42d397957a3aeb55c343d59648d6332c30
parent74f7f5ed272d8be366c6027526783ffd1ad5b620
xen/blkback: Check device permissions before allowing OP_DISCARD

We need to make sure that the device is not RO or that
the request is not past the number of sectors we want to
issue the DISCARD operation for.

This fixes CVE-2013-2140.

Cc: stable@vger.kernel.org
Acked-by: Jan Beulich <JBeulich@suse.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
[v1: Made it pr_warn instead of pr_debug]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c