fs/partitions/ldm.c: fix oops caused by corrupted partition table, CVE-2011-1017
authorTimo Warns <Warns@pre-sense.de>
Tue, 26 Apr 2011 20:37:09 +0000 (13:37 -0700)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:40 +0000 (11:42 -0700)
commit80741ed8ce22a1b5f3265a0f82a107e3ce5730d4
tree34d8cc464979cbb80f24be035f5a568f456bd9be
parent699434ade00a1cd3dcd7f1fb102b5277bfde6551
fs/partitions/ldm.c: fix oops caused by corrupted partition table, CVE-2011-1017

BugLink: http://bugs.launchpad.net/bugs/771382

CVE-2011-1017

The kernel automatically evaluates partition tables of storage devices.
The code for evaluating LDM partitions (in fs/partitions/ldm.c) contains
a bug that causes a kernel oops on certain corrupted LDM partitions.
A kernel subsystem seems to crash, because, after the oops, the kernel no
longer recognizes newly connected storage devices.

The patch validates the value of vblk_size.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Timo Warns <warns@pre-sense.de>
Cc: Eugene Teo <eugeneteo@kernel.sg>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Richard Russon <rich@flatcap.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

(cherry-pick from commit c340b1d640001c8c9ecff74f68fd90422ae2448a)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/partitions/ldm.c