diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2021-3545.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2021-3545.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3545.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3545.patch new file mode 100644 index 0000000000..fcdda64437 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2021-3545.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 121841b25d72d13f8cad554363138c360f1250ea Mon Sep 17 00:00:00 2001 | ||
2 | From: Li Qiang <liq3ea@163.com> | ||
3 | Date: Sat, 15 May 2021 20:03:56 -0700 | ||
4 | Subject: [PATCH] vhost-user-gpu: fix memory disclosure in | ||
5 | virgl_cmd_get_capset_info (CVE-2021-3545) | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | Otherwise some of the 'resp' will be leaked to guest. | ||
11 | |||
12 | Fixes: CVE-2021-3545 | ||
13 | Reported-by: Li Qiang <liq3ea@163.com> | ||
14 | virtio-gpu fix: 42a8dadc74 ("virtio-gpu: fix information leak | ||
15 | in getting capset info dispatch") | ||
16 | |||
17 | Signed-off-by: Li Qiang <liq3ea@163.com> | ||
18 | Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
19 | Message-Id: <20210516030403.107723-2-liq3ea@163.com> | ||
20 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
21 | |||
22 | Upstream-Status: Backport | ||
23 | CVE: CVE-2021-3545 | ||
24 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
25 | |||
26 | --- | ||
27 | contrib/vhost-user-gpu/virgl.c | 1 + | ||
28 | 1 file changed, 1 insertion(+) | ||
29 | |||
30 | Index: qemu-4.2.0/contrib/vhost-user-gpu/virgl.c | ||
31 | =================================================================== | ||
32 | --- qemu-4.2.0.orig/contrib/vhost-user-gpu/virgl.c | ||
33 | +++ qemu-4.2.0/contrib/vhost-user-gpu/virgl.c | ||
34 | @@ -132,6 +132,7 @@ virgl_cmd_get_capset_info(VuGpu *g, | ||
35 | |||
36 | VUGPU_FILL_CMD(info); | ||
37 | |||
38 | + memset(&resp, 0, sizeof(resp)); | ||
39 | if (info.capset_index == 0) { | ||
40 | resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL; | ||
41 | virgl_renderer_get_cap_set(resp.capset_id, | ||