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