summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2020-25723.patch52
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 067179fdeb..7a963ad57c 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -51,6 +51,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
51 file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \ 51 file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \
52 file://CVE-2019-20175.patch \ 52 file://CVE-2019-20175.patch \
53 file://CVE-2020-24352.patch \ 53 file://CVE-2020-24352.patch \
54 file://CVE-2020-25723.patch \
54 " 55 "
55UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 56UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
56 57
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-25723.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-25723.patch
new file mode 100644
index 0000000000..e6e0f5ec30
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-25723.patch
@@ -0,0 +1,52 @@
1From 2fdb42d840400d58f2e706ecca82c142b97bcbd6 Mon Sep 17 00:00:00 2001
2From: Li Qiang <liq3ea@163.com>
3Date: Wed, 12 Aug 2020 09:17:27 -0700
4Subject: [PATCH] hw: ehci: check return value of 'usb_packet_map'
5
6If 'usb_packet_map' fails, we should stop to process the usb
7request.
8
9Signed-off-by: Li Qiang <liq3ea@163.com>
10Message-Id: <20200812161727.29412-1-liq3ea@163.com>
11Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12
13
14Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=2fdb42d840400d58f2e706ecca82c142b97bcbd6]
15CVE: CVE-2020-25723
16Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
17
18---
19 hw/usb/hcd-ehci.c | 10 ++++++++--
20 1 file changed, 8 insertions(+), 2 deletions(-)
21
22diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
23index 58cceac..4da446d 100644
24--- a/hw/usb/hcd-ehci.c
25+++ b/hw/usb/hcd-ehci.c
26@@ -1373,7 +1373,10 @@ static int ehci_execute(EHCIPacket *p, const char *action)
27 spd = (p->pid == USB_TOKEN_IN && NLPTR_TBIT(p->qtd.altnext) == 0);
28 usb_packet_setup(&p->packet, p->pid, ep, 0, p->qtdaddr, spd,
29 (p->qtd.token & QTD_TOKEN_IOC) != 0);
30- usb_packet_map(&p->packet, &p->sgl);
31+ if (usb_packet_map(&p->packet, &p->sgl)) {
32+ qemu_sglist_destroy(&p->sgl);
33+ return -1;
34+ }
35 p->async = EHCI_ASYNC_INITIALIZED;
36 }
37
38@@ -1453,7 +1456,10 @@ static int ehci_process_itd(EHCIState *ehci,
39 if (ep && ep->type == USB_ENDPOINT_XFER_ISOC) {
40 usb_packet_setup(&ehci->ipacket, pid, ep, 0, addr, false,
41 (itd->transact[i] & ITD_XACT_IOC) != 0);
42- usb_packet_map(&ehci->ipacket, &ehci->isgl);
43+ if (usb_packet_map(&ehci->ipacket, &ehci->isgl)) {
44+ qemu_sglist_destroy(&ehci->isgl);
45+ return -1;
46+ }
47 usb_handle_packet(dev, &ehci->ipacket);
48 usb_packet_unmap(&ehci->ipacket, &ehci->isgl);
49 } else {
50--
511.8.3.1
52