[oe-commits] [openembedded-core] 51/61: qemu: Security fix for CVE-2016-4002

git at git.openembedded.org git at git.openembedded.org
Fri Sep 23 14:28:58 UTC 2016


rpurdie pushed a commit to branch krogoth
in repository openembedded-core.

commit 4c6493e90c7102a5bfa8aba4c00b112d083e91b8
Author: Armin Kuster <akuster at mvista.com>
AuthorDate: Mon Sep 19 19:56:19 2016 -0700

    qemu: Security fix for CVE-2016-4002
    
    affects qemu < 2.6.0
    
    Signed-off-by: Armin Kuster <akuster at mvista.com>
---
 .../recipes-devtools/qemu/qemu/CVE-2016-4002.patch | 39 ++++++++++++++++++++++
 meta/recipes-devtools/qemu/qemu_2.5.0.bb           |  1 +
 2 files changed, 40 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch b/meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch
new file mode 100644
index 0000000..69c11e2
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch
@@ -0,0 +1,39 @@
+From 7a2c32ec06533c54ddaf70136bfbd89eeaf6db16 Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp at fedoraproject.org>
+Date: Thu, 7 Apr 2016 15:56:02 +0530
+Subject: [PATCH] net: mipsnet: check packet length against buffer
+
+When receiving packets over MIPSnet network device, it uses
+receive buffer of size 1514 bytes. In case the controller
+accepts large(MTU) packets, it could lead to memory corruption.
+Add check to avoid it.
+
+Reported by: Oleksandr Bazhaniuk <oleksandr.bazhaniuk at intel.com>
+Signed-off-by: Prasad J Pandit <pjp at fedoraproject.org>
+Signed-off-by: Jason Wang <jasowang at redhat.com>
+
+(cherry picked from commit 3af9187fc6caaf415ab9c0c6d92c9678f65cb17f)
+Signed-off-by: Michael Roth <mdroth at linux.vnet.ibm.com>
+
+Upstream-Status: Backport
+CVE: CVE-2016-4002
+Signed-off-by: Armin Kuster <akuster at mvista.com>
+
+---
+ hw/net/mipsnet.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: qemu-2.4.0/hw/net/mipsnet.c
+===================================================================
+--- qemu-2.4.0.orig/hw/net/mipsnet.c
++++ qemu-2.4.0/hw/net/mipsnet.c
+@@ -82,6 +82,9 @@ static ssize_t mipsnet_receive(NetClient
+     if (!mipsnet_can_receive(nc))
+         return 0;
+ 
++    if (size >= sizeof(s->rx_buffer)) {
++        return 0;
++    }
+     s->busy = 1;
+ 
+     /* Just accept everything. */
diff --git a/meta/recipes-devtools/qemu/qemu_2.5.0.bb b/meta/recipes-devtools/qemu/qemu_2.5.0.bb
index feb6352..0ffec98 100644
--- a/meta/recipes-devtools/qemu/qemu_2.5.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.5.0.bb
@@ -24,6 +24,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
             file://CVE-2016-4439.patch \
             file://CVE-2016-6351_p1.patch \
             file://CVE-2016-6351_p2.patch \
+            file://CVE-2016-4002.patch \
            "
 SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
 SRC_URI[md5sum] = "f469f2330bbe76e3e39db10e9ac4f8db"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list