summaryrefslogtreecommitdiff
path: root/system/qemu/qemu_pcnet.patch
diff options
context:
space:
mode:
authormelikamp <melikamp@melikamp.net>2015-07-13 07:54:06 +0700
committerRobby Workman <rworkman@slackbuilds.org>2015-07-16 10:57:18 -0500
commit1e5b1227cfc474a609f00f4a19e798c4e31cbf97 (patch)
treedd2cf47deba4c2687a21b4cfb063f952b8c5e81a /system/qemu/qemu_pcnet.patch
parent9f2d4d7a39b90f503a7a905ed8bb964defc38676 (diff)
downloadslackbuilds-1e5b1227cfc474a609f00f4a19e798c4e31cbf97.tar.gz
system/qemu: Patched to fix CVE-2015-3209.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/qemu/qemu_pcnet.patch')
-rw-r--r--system/qemu/qemu_pcnet.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/qemu/qemu_pcnet.patch b/system/qemu/qemu_pcnet.patch
new file mode 100644
index 0000000000..5fc27c6069
--- /dev/null
+++ b/system/qemu/qemu_pcnet.patch
@@ -0,0 +1,18 @@
+index bdfd38f..68b9981 100644 (file)
+--- a/hw/net/pcnet.c
++++ b/hw/net/pcnet.c
+@@ -1241,6 +1241,14 @@ static void pcnet_transmit(PCNetState *s)
+ }
+
+ bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT);
++
++ /* if multi-tmd packet outsizes s->buffer then skip it silently.
++ Note: this is not what real hw does */
++ if (s->xmit_pos + bcnt > sizeof(s->buffer)) {
++ s->xmit_pos = -1;
++ goto txdone;
++ }
++
+ s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr),
+ s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s));
+ s->xmit_pos += bcnt; \ No newline at end of file