summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch
new file mode 100644
index 0000000000..7055ec3d23
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch
@@ -0,0 +1,40 @@
1From 66ae37d8cc313f89272e711174a846a229bcdbd3 Mon Sep 17 00:00:00 2001
2From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
3Date: Wed, 30 Jun 2021 14:52:46 +0300
4Subject: [PATCH] pvrdma: Fix the ring init error flow (CVE-2021-3608)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Do not unmap uninitialized dma addresses.
10
11Fixes: CVE-2021-3608
12Reviewed-by: VictorV (Kunlun Lab) <vv474172261@gmail.com>
13Tested-by: VictorV (Kunlun Lab) <vv474172261@gmail.com>
14Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
15Message-Id: <20210630115246.2178219-1-marcel@redhat.com>
16Tested-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
17Reviewed-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
18Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
19Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
20
21CVE: CVE-2021-3608
22Upstream-Status: Backport [66ae37d8cc313f89272e711174a846a229bcdbd3]
23Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
24---
25 hw/rdma/vmw/pvrdma_dev_ring.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28Index: qemu-4.2.0/hw/rdma/vmw/pvrdma_dev_ring.c
29===================================================================
30--- qemu-4.2.0.orig/hw/rdma/vmw/pvrdma_dev_ring.c
31+++ qemu-4.2.0/hw/rdma/vmw/pvrdma_dev_ring.c
32@@ -41,7 +41,7 @@ int pvrdma_ring_init(PvrdmaRing *ring, c
33 atomic_set(&ring->ring_state->cons_head, 0);
34 */
35 ring->npages = npages;
36- ring->pages = g_malloc(npages * sizeof(void *));
37+ ring->pages = g_malloc0(npages * sizeof(void *));
38
39 for (i = 0; i < npages; i++) {
40 if (!tbl[i]) {