[oe-commits] [openembedded-core] 22/28: qemu: display: CVE-2016-9908

git at git.openembedded.org git at git.openembedded.org
Tue Mar 7 22:15:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

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

commit 0815406f115d4b1d6185175259f13d3ee4ad2abc
Author: Sona Sarmadi <sona.sarmadi at enea.com>
AuthorDate: Fri Mar 3 12:51:41 2017 +0100

    qemu: display: CVE-2016-9908
    
    virtio-gpu: information leakage in virgl_cmd_get_capset
    
    References:
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9908
    
    Signed-off-by: Sona Sarmadi <sona.sarmadi at enea.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 .../recipes-devtools/qemu/qemu/CVE-2016-9908.patch | 44 ++++++++++++++++++++++
 meta/recipes-devtools/qemu/qemu_2.8.0.bb           |  1 +
 2 files changed, 45 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch b/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch
new file mode 100644
index 0000000..e0f7a1a
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch
@@ -0,0 +1,44 @@
+From 7139ccbc907441337b4b59cde2c5b5a54cb5b2cc Mon Sep 17 00:00:00 2001
+From: Sona Sarmadi <sona.sarmadi at enea.com>
+
+virtio-gpu: fix information leak in capset get dispatch
+
+In virgl_cmd_get_capset function, it uses g_malloc to allocate
+a response struct to the guest. As the 'resp'struct hasn't been full
+initialized it will lead the 'resp->padding' field to the guest.
+Use g_malloc0 to avoid this.
+
+Signed-off-by: Li Qiang <liqiang6-s at 360.cn>
+Reviewed-by: Marc-André Lureau <marcandre.lureau at redhat.com>
+Message-id: 58188cae.4a6ec20a.3d2d1.aff2 at mx.google.com
+
+[Sona: backported from master to v2.8.0 and resolved conflict]
+
+Reference to upstream patch:
+http://git.qemu-project.org/?p=qemu.git;a=commit;h=85d9d044471f93c48c5c396f7e217b4ef12f69f8
+
+CVE: CVE-2016-9908
+Upstream-Status: Backport
+
+Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
+Signed-off-by: Sona Sarmadi <sona.sarmadi at enea.com>
+---
+ hw/display/virtio-gpu-3d.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
+index 23f39de..d98b140 100644
+--- a/hw/display/virtio-gpu-3d.c
++++ b/hw/display/virtio-gpu-3d.c
+@@ -371,7 +371,7 @@ static void virgl_cmd_get_capset(VirtIOGPU *g,
+ 
+     virgl_renderer_get_cap_set(gc.capset_id, &max_ver,
+                                &max_size);
+-    resp = g_malloc(sizeof(*resp) + max_size);
++    resp = g_malloc0(sizeof(*resp) + max_size);
+ 
+     resp->hdr.type = VIRTIO_GPU_RESP_OK_CAPSET;
+     virgl_renderer_fill_caps(gc.capset_id,
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.0.bb b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
index 7bb4d06..b8799d5 100644
--- a/meta/recipes-devtools/qemu/qemu_2.8.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
@@ -28,6 +28,7 @@ SRC_URI += " \
             file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
             file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
             file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \
+            file://CVE-2016-9908.patch \
 "
 
 SRC_URI_append_class-native = " \

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


More information about the Openembedded-commits mailing list