[kernel] r17646 - in dists/squeeze/linux-2.6/debian: . patches/bugfix/all patches/series

Dann Frazier dannf at alioth.debian.org
Sat Jun 11 14:23:13 UTC 2011


Author: dannf
Date: Sat Jun 11 14:23:12 2011
New Revision: 17646

Log:
fs/partitions/ldm.c: fix oops caused by corrupted partition table (CVE-2011-1017)

Added:
   dists/squeeze/linux-2.6/debian/patches/bugfix/all/fix-for-buffer-overflow-in-ldm_frag_add-not-sufficient.patch
Modified:
   dists/squeeze/linux-2.6/debian/changelog
   dists/squeeze/linux-2.6/debian/patches/series/35

Modified: dists/squeeze/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze/linux-2.6/debian/changelog	Sat Jun 11 14:23:08 2011	(r17645)
+++ dists/squeeze/linux-2.6/debian/changelog	Sat Jun 11 14:23:12 2011	(r17646)
@@ -37,6 +37,8 @@
   [ dann frazier ]
   * efi: corrupted GUID partition tables can cause kernel oops (CVE-2011-1577)
   * tunnels: fix netns vs proto registration ordering (CVE-2011-1768)
+  * fs/partitions/ldm.c: fix oops caused by corrupted partition table
+    (CVE-2011-1017)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Wed, 04 May 2011 01:44:34 +0100
 

Added: dists/squeeze/linux-2.6/debian/patches/bugfix/all/fix-for-buffer-overflow-in-ldm_frag_add-not-sufficient.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/bugfix/all/fix-for-buffer-overflow-in-ldm_frag_add-not-sufficient.patch	Sat Jun 11 14:23:12 2011	(r17646)
@@ -0,0 +1,34 @@
+commit cae13fe4cc3f24820ffb990c09110626837e85d4
+Author: Timo Warns <Warns at pre-sense.de>
+Date:   Thu May 19 09:24:17 2011 +0200
+
+    Fix for buffer overflow in ldm_frag_add not sufficient
+    
+    As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer
+    overflow in ldm_frag_add) is not sufficient.  The original patch in
+    commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted
+    partition table") does not consider that, for subsequent fragments,
+    previously allocated memory is used.
+    
+    [1] http://lkml.org/lkml/2011/5/6/407
+    
+    Reported-by: Ben Hutchings <ben at decadent.org.uk>
+    Signed-off-by: Timo Warns <warns at pre-sense.de>
+    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c
+index ce4f624..a29d5cc 100644
+--- a/fs/partitions/ldm.c
++++ b/fs/partitions/ldm.c
+@@ -1335,6 +1335,11 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
+ 
+ 	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 */

Modified: dists/squeeze/linux-2.6/debian/patches/series/35
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/series/35	Sat Jun 11 14:23:08 2011	(r17645)
+++ dists/squeeze/linux-2.6/debian/patches/series/35	Sat Jun 11 14:23:12 2011	(r17646)
@@ -266,3 +266,4 @@
 + bugfix/all/efi-corrupted-GUID-partition-tables-can-cause-kernel-oops.patch
 + bugfix/all/xfrm6_tunnel-join-error-paths-using-goto.patch
 + bugfix/all/tunnels-fix-netns-vs-proto-registration-ordering.patch
++ bugfix/all/fix-for-buffer-overflow-in-ldm_frag_add-not-sufficient.patch



More information about the Kernel-svn-changes mailing list