aboutsummaryrefslogtreecommitdiff
path: root/system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2012-02-17 22:16:26 -0600
committerRobby Workman <rworkman@slackbuilds.org>2012-02-20 12:59:56 -0600
commit25eb494eb9ccf9b04d925616d6c32a560ffe7cb4 (patch)
treeda684a88193ea51549a57a62a76f00f1a4831835 /system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch
parent5e3879e3e31df6a1f78d6f33cc2210137b6e52fe (diff)
system/qemu-kvm: Rename binary to "qemu-kvm" and other changes
* Default group is now "users" * Option to build for all targets is now gone; this is only for KVM-enabled stuff now * Include a patch for a CVE Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch')
-rw-r--r--system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch b/system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch
new file mode 100644
index 0000000000000..bd2bdc7425df2
--- /dev/null
+++ b/system/qemu-kvm/patches/qemu-kvm-1.0-CVE-2012-029.patch
@@ -0,0 +1,37 @@
+From d0ed2d2e8e863a9a64c9fc9c08fa68bee546ad00 Mon Sep 17 00:00:00 2001
+From: Anthony Liguori <aliguori@us.ibm.com>
+Date: Mon, 23 Jan 2012 07:30:43 -0600
+Subject: [PATCH 26/26] 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@us.ibm.com>
+---
+ hw/e1000.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hw/e1000.c b/hw/e1000.c
+index 986ed9c..e164d79 100644
+--- a/hw/e1000.c
++++ b/hw/e1000.c
+@@ -466,6 +466,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);
+ pci_dma_read(&s->dev, addr, tp->data + tp->size, bytes);
+ if ((sz = tp->size + bytes) >= hdr && tp->size < hdr)
+ memmove(tp->header, tp->data, hdr);
+@@ -481,6 +483,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);
+ pci_dma_read(&s->dev, addr, tp->data + tp->size, split_size);
+ tp->size += split_size;
+ }
+--
+1.7.7.6
+