packages: xen/qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc06624...

baggins baggins at pld-linux.org
Wed Feb 29 21:57:19 CET 2012


Author: baggins                      Date: Wed Feb 29 20:57:19 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- buffer overflow in e1000 driver (CVE-2012-0029)

---- Files affected:
packages/xen:
   qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/xen/qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch
diff -u /dev/null packages/xen/qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch:1.1
--- /dev/null	Wed Feb 29 21:57:19 2012
+++ packages/xen/qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch	Wed Feb 29 21:57:14 2012
@@ -0,0 +1,43 @@
+From 3cf61880403b4e484539596a95937cc066243388 Mon Sep 17 00:00:00 2001
+From: Ian Campbell <Ian.Campbell at citrix.com>
+Date: Thu, 2 Feb 2012 13:47:06 +0000
+Subject: [PATCH] e1000: bounds packet size against buffer size
+
+Otherwise we can write beyond the buffer and corrupt memory.  This is tracked
+as CVE-2012-0029.
+
+Signed-off-by: Anthony Liguori <aliguori at us.ibm.com>
+
+(Backported from qemu upstream 65f82df0d7a71ce1b10cd4c5ab08888d176ac840
+ by Ian Campbell.)
+
+Signed-off-by: Ian Campbell <Ian.Campbell at citrix.com>
+(cherry picked from commit ebe37b2a3f844bad02dcc30d081f39eda06118f8)
+---
+ hw/e1000.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/tools/ioemu-qemu-xen/hw/e1000.c b/tools/ioemu-qemu-xen/hw/e1000.c
+index bb3689e..97104ed 100644
+--- a/tools/ioemu-qemu-xen/hw/e1000.c
++++ b/tools/ioemu-qemu-xen/hw/e1000.c
+@@ -444,6 +444,8 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
+             bytes = split_size;
+             if (tp->size + bytes > msh)
+                 bytes = msh - tp->size;
++
++            bytes = MIN(sizeof(tp->data) - tp->size, bytes);
+             cpu_physical_memory_read(addr, tp->data + tp->size, bytes);
+             if ((sz = tp->size + bytes) >= hdr && tp->size < hdr)
+                 memmove(tp->header, tp->data, hdr);
+@@ -459,6 +461,7 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
+         // context descriptor TSE is not set, while data descriptor TSE is set
+         DBGOUT(TXERR, "TCP segmentaion Error\n");
+     } else {
++        split_size = MIN(sizeof(tp->data) - tp->size, split_size);
+         cpu_physical_memory_read(addr, tp->data + tp->size, split_size);
+         tp->size += split_size;
+     }
+-- 
+1.7.2.5
+
================================================================


More information about the pld-cvs-commit mailing list