diff options
author | Armin Kuster <akuster@mvista.com> | 2016-02-06 15:14:55 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-07 17:20:58 +0000 |
commit | 3a7c84952d40f95b0f34bc35eef4490ecc8da07e (patch) | |
tree | e108d59d054049e71047ffc2a0b6cfecff9b7f76 /meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch | |
parent | c2361dd9bb663b00dd194cb7fdb0e07d7e1ab5e1 (diff) | |
download | openembedded-core-contrib-3a7c84952d40f95b0f34bc35eef4490ecc8da07e.tar.gz |
qemu: Security fix CVE-2015-7295
CVE-2015-7295 Qemu: net: virtio-net possible remote DoS
(From OE-Core rev: 74771f8c41aaede0ddfb86983c6841bd1f1c1f0f)
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch b/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch new file mode 100644 index 0000000000..0f69e9c41e --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch @@ -0,0 +1,52 @@ +From 0cf33fb6b49a19de32859e2cdc6021334f448fb3 Mon Sep 17 00:00:00 2001 +From: Jason Wang <jasowang@redhat.com> +Date: Fri, 25 Sep 2015 13:21:30 +0800 +Subject: [PATCH] virtio-net: correctly drop truncated packets + +When packet is truncated during receiving, we drop the packets but +neither discard the descriptor nor add and signal used +descriptor. This will lead several issues: + +- sg mappings are leaked +- rx will be stalled if a lots of packets were truncated + +In order to be consistent with vhost, fix by discarding the descriptor +in this case. + +Cc: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Jason Wang <jasowang@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> + +Upstream-Status: Backport + +git.qemu.org/?p=qemu.git;a=commit;h=0cf33fb6b49a19de32859e2cdc6021334f448fb3 + +CVE: CVE-2015-7295 patch #3 +[Yocto # 9013] + +Signed-off-by: Armin Kuster <akuster@mvista.com> + +--- + hw/net/virtio-net.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +Index: qemu-2.2.0/hw/net/virtio-net.c +=================================================================== +--- qemu-2.2.0.orig/hw/net/virtio-net.c ++++ qemu-2.2.0/hw/net/virtio-net.c +@@ -1070,13 +1070,7 @@ static ssize_t virtio_net_receive(NetCli + * must have consumed the complete packet. + * Otherwise, drop it. */ + if (!n->mergeable_rx_bufs && offset < size) { +-#if 0 +- error_report("virtio-net truncated non-mergeable packet: " +- "i %zd mergeable %d offset %zd, size %zd, " +- "guest hdr len %zd, host hdr len %zd", +- i, n->mergeable_rx_bufs, +- offset, size, n->guest_hdr_len, n->host_hdr_len); +-#endif ++ virtqueue_discard(q->rx_vq, &elem, total); + return size; + } + |