The patch titled fs/partitions/ldm.c: fix buffer overflow again has been removed from the -mm tree. Its filename was fs-partitions-ldmc-fix-buffer-overflow-again.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: fs/partitions/ldm.c: fix buffer overflow again From: Timo Warns <Warns@xxxxxxxxxxxx> c340b1d640001 ("fs/partitions/ldm.c: fix oops caused by corrupted partition table") was incomplete and incorrect. It does not consider that for subsequent fragments, previously allocated memory is used. Signed-off-by: Timo Warns <warns@xxxxxxxxxxxx> Cc: Eugene Teo <eugeneteo@xxxxxxxxx> Cc: Harvey Harrison <harvey.harrison@xxxxxxxxx> Cc: Richard Russon <rich@xxxxxxxxxxx> Reported-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/partitions/ldm.c | 5 +++++ 1 file changed, 5 insertions(+) diff -puN fs/partitions/ldm.c~fs-partitions-ldmc-fix-buffer-overflow-again fs/partitions/ldm.c --- a/fs/partitions/ldm.c~fs-partitions-ldmc-fix-buffer-overflow-again +++ a/fs/partitions/ldm.c @@ -1335,6 +1335,11 @@ static bool ldm_frag_add (const u8 *data list_add_tail (&f->list, frags); found: + if (rec >= f->num) { + ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num); + return false; + } + if (f->map & (1 << rec)) { ldm_error ("Duplicate VBLK, part %d.", rec); f->map &= 0x7F; /* Mark the group as broken */ _ Patches currently in -mm which might be from Warns@xxxxxxxxxxxx are origin.patch fs-partitions-efic-corrupted-guid-partition-tables-can-cause-kernel-oops.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html