Blame qemu-CVE-2012-0029.patch
|
|
20c0da |
diff -rup qemu-kvm-0.15.1/hw/e1000.c me/hw/e1000.c
|
|
|
20c0da |
--- qemu-kvm-0.15.1/hw/e1000.c 2011-10-19 09:54:48.000000000 -0400
|
|
|
20c0da |
+++ me/hw/e1000.c 2012-05-29 09:28:15.832104874 -0400
|
|
|
20c0da |
@@ -472,6 +472,8 @@ process_tx_desc(E1000State *s, struct e1
|
|
|
20c0da |
bytes = split_size;
|
|
|
20c0da |
if (tp->size + bytes > msh)
|
|
|
20c0da |
bytes = msh - tp->size;
|
|
|
20c0da |
+
|
|
|
20c0da |
+ bytes = MIN(sizeof(tp->data) - tp->size, bytes);
|
|
|
20c0da |
cpu_physical_memory_read(addr, tp->data + tp->size, bytes);
|
|
|
20c0da |
if ((sz = tp->size + bytes) >= hdr && tp->size < hdr)
|
|
|
20c0da |
memmove(tp->header, tp->data, hdr);
|
|
|
20c0da |
@@ -487,6 +489,7 @@ process_tx_desc(E1000State *s, struct e1
|
|
|
20c0da |
// context descriptor TSE is not set, while data descriptor TSE is set
|
|
|
20c0da |
DBGOUT(TXERR, "TCP segmentaion Error\n");
|
|
|
20c0da |
} else {
|
|
|
20c0da |
+ split_size = MIN(sizeof(tp->data) - tp->size, split_size);
|
|
|
20c0da |
cpu_physical_memory_read(addr, tp->data + tp->size, split_size);
|
|
|
20c0da |
tp->size += split_size;
|
|
|
20c0da |
}
|