diff options
author | Sakib Sajal <sakib.sajal@windriver.com> | 2021-08-24 11:18:30 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-01 16:27:09 +0100 |
commit | 4d8b5c4d70db2e193044874382e78294ba289bd7 (patch) | |
tree | 11114ea04952ad55994daa1c35059ef21dd1ca51 /meta | |
parent | f63635a30da4b8e91efa5fc9cdbe85c902dce269 (diff) | |
download | poky-4d8b5c4d70db2e193044874382e78294ba289bd7.tar.gz |
qemu: fix CVE-2021-3607
Source: http://git.yoctoproject.org/cgit/poky.git
MR: 112749
Type: Security Fix
Disposition: Backport from http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-devtools/qemu?h=hardknott&id=460485d774480cd89cadf3b068f5197f44d86f25
ChangeID: 4e40dee2e6ce0b5b4de971f2c2b336929e7f22c3
Description:
(From OE-Core rev: 764bca67650da9df439527796879dda767c8c008)
(From OE-Core rev: cc541da4d67a9afa86a6ac37d5470d4dc77ea922)
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 460485d774480cd89cadf3b068f5197f44d86f25)
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 854a907216..6066418a7b 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -82,6 +82,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
82 | file://CVE-2021-3527-1.patch \ | 82 | file://CVE-2021-3527-1.patch \ |
83 | file://CVE-2021-3527-2.patch \ | 83 | file://CVE-2021-3527-2.patch \ |
84 | file://CVE-2021-3582.patch \ | 84 | file://CVE-2021-3582.patch \ |
85 | file://CVE-2021-3607.patch \ | ||
85 | " | 86 | " |
86 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 87 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
87 | 88 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch new file mode 100644 index 0000000000..0547c74484 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 32e5703cfea07c91e6e84bcb0313f633bb146534 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> | ||
3 | Date: Wed, 30 Jun 2021 14:46:34 +0300 | ||
4 | Subject: [PATCH] pvrdma: Ensure correct input on ring init (CVE-2021-3607) | ||
5 | |||
6 | Check the guest passed a non zero page count | ||
7 | for pvrdma device ring buffers. | ||
8 | |||
9 | Fixes: CVE-2021-3607 | ||
10 | Reported-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> | ||
11 | Reviewed-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> | ||
12 | Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> | ||
13 | Message-Id: <20210630114634.2168872-1-marcel@redhat.com> | ||
14 | Reviewed-by: Yuval Shaia <yuval.shaia.ml@gmail.com> | ||
15 | Tested-by: Yuval Shaia <yuval.shaia.ml@gmail.com> | ||
16 | Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> | ||
17 | |||
18 | CVE: CVE-2021-3607 | ||
19 | Upstream-Status: Backport [32e5703cfea07c91e6e84bcb0313f633bb146534] | ||
20 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
21 | --- | ||
22 | hw/rdma/vmw/pvrdma_main.c | 5 +++++ | ||
23 | 1 file changed, 5 insertions(+) | ||
24 | |||
25 | diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c | ||
26 | index 84ae8024fc..7c0c3551a8 100644 | ||
27 | --- a/hw/rdma/vmw/pvrdma_main.c | ||
28 | +++ b/hw/rdma/vmw/pvrdma_main.c | ||
29 | @@ -92,6 +92,11 @@ static int init_dev_ring(PvrdmaRing *ring, PvrdmaRingState **ring_state, | ||
30 | uint64_t *dir, *tbl; | ||
31 | int rc = 0; | ||
32 | |||
33 | + if (!num_pages) { | ||
34 | + rdma_error_report("Ring pages count must be strictly positive"); | ||
35 | + return -EINVAL; | ||
36 | + } | ||
37 | + | ||
38 | dir = rdma_pci_dma_map(pci_dev, dir_addr, TARGET_PAGE_SIZE); | ||
39 | if (!dir) { | ||
40 | rdma_error_report("Failed to map to page directory (ring %s)", name); | ||
41 | -- | ||
42 | 2.25.1 | ||
43 | |||