The patch titled
     ldm: corrupted partition table can cause kernel oops
has been removed from the -mm tree.  Its filename was
     ldm-corrupted-partition-table-can-cause-kernel-oops.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ldm: corrupted partition table can cause kernel oops
From: Timo Warns <[email protected]>

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 changes ldm_parse_vmdb() to Validate the value of vblk_size.

Signed-off-by: Timo Warns <[email protected]>
Cc: Eugene Teo <[email protected]>
Acked-by: Richard Russon <[email protected]>
Cc: Harvey Harrison <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 fs/partitions/ldm.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -puN 
fs/partitions/ldm.c~ldm-corrupted-partition-table-can-cause-kernel-oops 
fs/partitions/ldm.c
--- a/fs/partitions/ldm.c~ldm-corrupted-partition-table-can-cause-kernel-oops
+++ a/fs/partitions/ldm.c
@@ -251,6 +251,11 @@ static bool ldm_parse_vmdb (const u8 *da
        }
 
        vm->vblk_size     = get_unaligned_be32(data + 0x08);
+       if (vm->vblk_size == 0) {
+               ldm_error ("Illegal VBLK size");
+               return false;
+       }
+
        vm->vblk_offset   = get_unaligned_be32(data + 0x0C);
        vm->last_vblk_seq = get_unaligned_be32(data + 0x04);
 
_

Patches currently in -mm which might be from [email protected] are

origin.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to