qemu: fix multple CVEs
PATCH v2 1/1 qemu: fix multple CVEs
From: Chee Yang Lee <[email protected]>
import patches from ubuntu to fix
CVE-2020-15469
CVE-2020-15859
CVE-2020-17380
CVE-2020-35504
CVE-2020-35505
CVE-2021-3409
CVE-2022-26354
https://git.launchpad.net/ubuntu/+source/qemu/tree/debian/patches?h=ubuntu/focal-security
Combine patches for both CVE-2020-25085 and CVE-2021-3409 also fix CVE-2020-17380. so mark CVE-2020-17380 fixed by CVE-2021-3409 patches. CVE-2020-17380 patch backported since oecore rev 6b4c58a31ec11e557d40c31f2532985dd53e61eb.
---
v2: patch file included link to both upstream qemu and ubuntu qemu
meta/recipes-devtools/qemu/qemu.inc | 17 +++ .../qemu/qemu/CVE-2020-15469-1.patch | 50 +++++++++ .../qemu/qemu/CVE-2020-15469-2.patch | 69 ++++++++++++ .../qemu/qemu/CVE-2020-15469-3.patch | 49 +++++++++ .../qemu/qemu/CVE-2020-15469-4.patch | 53 +++++++++ .../qemu/qemu/CVE-2020-15469-5.patch | 53 +++++++++ .../qemu/qemu/CVE-2020-15469-6.patch | 61 +++++++++++ .../qemu/qemu/CVE-2020-15469-7.patch | 50 +++++++++ .../qemu/qemu/CVE-2020-15469-8.patch | 44 ++++++++ .../qemu/qemu/CVE-2020-15859.patch | 39 +++++++ .../qemu/qemu/CVE-2020-35504.patch | 51 +++++++++ .../qemu/qemu/CVE-2020-35505.patch | 42 +++++++ .../qemu/qemu/CVE-2021-3409-1.patch | 85 +++++++++++++++ .../qemu/qemu/CVE-2021-3409-2.patch | 103 ++++++++++++++++++ .../qemu/qemu/CVE-2021-3409-3.patch | 71 ++++++++++++ .../qemu/qemu/CVE-2021-3409-4.patch | 52 +++++++++ .../qemu/qemu/CVE-2021-3409-5.patch | 93 ++++++++++++++++ .../qemu/qemu/CVE-2022-26354.patch | 57 ++++++++++ 18 files changed, 1039 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-1.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-2.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-3.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-5.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-6.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-7.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15469-8.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-15859.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-35504.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3409-1.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3409-2.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3409-3.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3409-4.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3409-5.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2022-26354.patch
meta/recipes-devtools/qemu/qemu.inc +17 -0
@@ -116,6 +116,23 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-20196.patch \ file://CVE-2021-3507.patch \ file://CVE-2021-3929.patch \ + file://CVE-2020-15859.patch \ + file://CVE-2020-15469-1.patch \ + file://CVE-2020-15469-2.patch \ + file://CVE-2020-15469-3.patch \ + file://CVE-2020-15469-4.patch \ + file://CVE-2020-15469-5.patch \ + file://CVE-2020-15469-6.patch \ + file://CVE-2020-15469-7.patch \ + file://CVE-2020-15469-8.patch \ + file://CVE-2020-35504.patch \ + file://CVE-2020-35505.patch \ + file://CVE-2022-26354.patch \ + file://CVE-2021-3409-1.patch \ + file://CVE-2021-3409-2.patch \ + file://CVE-2021-3409-3.patch \ + file://CVE-2021-3409-4.patch \ + file://CVE-2021-3409-5.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-1.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-2.patch new file +69 -0
69 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-3.patch new file +49 -0
49 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-5.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-6.patch new file +61 -0
61 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-7.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15469-8.patch new file +44 -0
44 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-15859.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 22dc8663d9fc7baa22100544c600b6285a63c7a3 Mon Sep 17 00:00:00 2001 +From: Jason Wang <[email protected]> +Date: Wed, 22 Jul 2020 16:57:46 +0800 +Subject: [PATCH] net: forbid the reentrant RX + +The memory API allows DMA into NIC's MMIO area. This means the NIC's +RX routine must be reentrant. Instead of auditing all the NIC, we can +simply detect the reentrancy and return early. The queue->delivering +is set and cleared by qemu_net_queue_deliver() for other queue helpers +to know whether the delivering in on going (NIC's receive is being +called). We can check it and return early in qemu_net_queue_flush() to +forbid reentrant RX. + +Signed-off-by: Jason Wang <[email protected]> + +CVE: CVE-2020-15859 +Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/qemu/tree/debian/patches/ubuntu/CVE-2020-15859.patch?h=ubuntu/focal-security Upstream commit https://github.com/qemu/qemu/commit/22dc8663d9fc7baa22100544c600b6285a63c7a3 ] +Signed-off-by: Chee Yang Lee <[email protected]> +--- + net/queue.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/net/queue.c b/net/queue.c +index 0164727..19e32c8 100644 +--- a/net/queue.c ++++ b/net/queue.c +@@ -250,6 +250,9 @@ void qemu_net_queue_purge(NetQueue *queue, NetClientState *from) + + bool qemu_net_queue_flush(NetQueue *queue) + { ++ if (queue->delivering) ++ return false; ++ + while (!QTAILQ_EMPTY(&queue->packets)) { + NetPacket *packet; + int ret; +-- +1.8.3.1 +
meta/recipes-devtools/qemu/qemu/CVE-2020-35504.patch new file +51 -0
51 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3409-1.patch new file +85 -0
85 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3409-2.patch new file +103 -0
103 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3409-3.patch new file +71 -0
71 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3409-4.patch new file +52 -0
52 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2021-3409-5.patch new file +93 -0
93 lines not on this page · raw message
meta/recipes-devtools/qemu/qemu/CVE-2022-26354.patch new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
2.37.3