diff options
| author | Lee Chee Yang <chee.yang.lee@intel.com> | 2020-12-14 18:52:53 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-18 14:20:19 +0000 |
| commit | 2ccfb319b5e019d7c5f8283bcd0e40805ff27abb (patch) | |
| tree | a8fb907779b1187ed40ca74b7fe85397f9893508 /meta/recipes-devtools | |
| parent | 93b729ea91c5470451271d4246183d21f2bca6e9 (diff) | |
| download | poky-2ccfb319b5e019d7c5f8283bcd0e40805ff27abb.tar.gz | |
qemu: fix CVE-2020-25723
(From OE-Core rev: 3c85df8f4bcbdb75c3258a76402dd6039fbc73ca)
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2020-25723.patch | 52 |
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 | " |
| 55 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 56 | UPSTREAM_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 @@ | |||
| 1 | From 2fdb42d840400d58f2e706ecca82c142b97bcbd6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li Qiang <liq3ea@163.com> | ||
| 3 | Date: Wed, 12 Aug 2020 09:17:27 -0700 | ||
| 4 | Subject: [PATCH] hw: ehci: check return value of 'usb_packet_map' | ||
| 5 | |||
| 6 | If 'usb_packet_map' fails, we should stop to process the usb | ||
| 7 | request. | ||
| 8 | |||
| 9 | Signed-off-by: Li Qiang <liq3ea@163.com> | ||
| 10 | Message-Id: <20200812161727.29412-1-liq3ea@163.com> | ||
| 11 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
| 12 | |||
| 13 | |||
| 14 | Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=2fdb42d840400d58f2e706ecca82c142b97bcbd6] | ||
| 15 | CVE: CVE-2020-25723 | ||
| 16 | Signed-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 | |||
| 22 | diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c | ||
| 23 | index 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 | -- | ||
| 51 | 1.8.3.1 | ||
| 52 | |||
