Skip to contentSkip to conversation

qemu: Security fix CVE-2020-25085

PATCH New Armin Kuster 1 participant 7 messages Aug 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 qemu: Security fix CVE-2020-25085

From: Armin Kuster <[email protected]>

Source: qemu.org
MR: 105773
Type: Security Fix
Disposition: Backport from https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg00733.html
ChangeID: 77c8a9e75b94da3c03c64c95d9e6ab9d45037572
Description:

---
 meta/recipes-devtools/qemu/qemu.inc           | 41 +++++++++--------
 .../qemu/qemu/CVE-2020-25085.patch            | 46 +++++++++++++++++++
 2 files changed, 67 insertions(+), 20 deletions(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-25085.patch
meta/recipes-devtools/qemu/qemu.inc +21 -20
index e25c2524aa..a33008670b 100644
@@ -35,27 +35,28 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-7039-2.patch \
            file://CVE-2020-7039-3.patch \
            file://0001-Add-enable-disable-udev.patch \
-	   file://CVE-2020-7211.patch \
-	   file://0001-qemu-Do-not-include-file-if-not-exists.patch \
+           file://CVE-2020-7211.patch \
+           file://0001-qemu-Do-not-include-file-if-not-exists.patch \
            file://CVE-2020-11102.patch \
-	   file://CVE-2020-11869.patch \
-	   file://CVE-2020-13361.patch \
-	   file://CVE-2020-10761.patch \
-	   file://CVE-2020-10702.patch \
-	   file://CVE-2020-13659.patch \
-	   file://CVE-2020-13800.patch \
-	   file://CVE-2020-13362.patch \
-	   file://CVE-2020-15863.patch \
-	   file://CVE-2020-14364.patch \
-	   file://CVE-2020-14415.patch \
-	   file://CVE-2020-16092.patch \
-	   file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \
-	   file://CVE-2019-20175.patch \
-	   file://CVE-2020-24352.patch \
-	   file://CVE-2020-25723.patch \
-	   file://CVE-2021-20203.patch \
-	   file://CVE-2021-3392.patch \
-	   "
+           file://CVE-2020-11869.patch \
+           file://CVE-2020-13361.patch \
+           file://CVE-2020-10761.patch \
+           file://CVE-2020-10702.patch \
+           file://CVE-2020-13659.patch \
+           file://CVE-2020-13800.patch \
+           file://CVE-2020-13362.patch \
+           file://CVE-2020-15863.patch \
+           file://CVE-2020-14364.patch \
+           file://CVE-2020-14415.patch \
+           file://CVE-2020-16092.patch \
+           file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \
+           file://CVE-2019-20175.patch \
+           file://CVE-2020-24352.patch \
+           file://CVE-2020-25723.patch \
+           file://CVE-2021-20203.patch \
+           file://CVE-2021-3392.patch \
+           file://CVE-2020-25085.patch \
+           "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
 SRC_URI[md5sum] = "278eeb294e4b497e79af7a57e660cb9a"
meta/recipes-devtools/qemu/qemu/CVE-2020-25085.patch new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/7 qemu: Security fix CVE-2020-25624

From: Armin Kuster <[email protected]>

Source: qemu.org
MR: 106958
Type: Security Fix
Disposition: Backport from qemu.org
ChangeID: 9d0c21c4ff5dc12ba623685cd7ae4d4bc294f519 Description:

---
 meta/recipes-devtools/qemu/qemu.inc           |   2 +
 .../qemu/qemu/CVE-2020-25624_1.patch          |  87 +++++++++++++++
 .../qemu/qemu/CVE-2020-25624_2.patch          | 101 ++++++++++++++++++
 3 files changed, 190 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-25624_2.patch
meta/recipes-devtools/qemu/qemu.inc +2 -0
index a33008670b..6978be951e 100644
@@ -56,6 +56,8 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2021-20203.patch \
            file://CVE-2021-3392.patch \
            file://CVE-2020-25085.patch \
+           file://CVE-2020-25624_1.patch \
+           file://CVE-2020-25624_2.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2020-25624_1.patch new file +87 -0

87 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2020-25624_2.patch new file +101 -0

101 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/7 Qemu: Security fix for CVE-2020-25625/2021-3409/2020-17380

In reply to Armin Kuster

From: Armin Kuster <[email protected]>

Source: Qemu.org
MR: 105781, 109964, 108621
Type: Security Fix
Disposition: Backport from https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg05905.html
ChangeID: 0acf082885e7ab3ac2fb41d6e503449869dd46a8
Description:

This address:
CVE-2020-25625
and its two fixes address an incomplete fix for CVE-2020-25625 CVE-2021-3409
CVE-2020-17380

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2020-25625.patch            | 42 +++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-25625.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 6978be951e..76bfb4fcf9 100644
@@ -58,6 +58,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-25085.patch \
            file://CVE-2020-25624_1.patch \
            file://CVE-2020-25624_2.patch \
+           file://CVE-2020-25625.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2020-25625.patch new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

PATCH 4/7 qemu: Security fix for CVE-2020-29443

In reply to Armin Kuster

From: Armin Kuster <[email protected]>

Source: Qemu.org
MR: 109315
Type: Security Fix
Disposition: Backport from https://git.qemu.org/?p=qemu.git;a=commit;h=813212288970c39b1800f63e83ac6e96588095c6
ChangeID: c0296e285169cc937cc9758c9d84ac690297ee54
Description:

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2020-29443.patch            | 45 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-29443.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 76bfb4fcf9..bd1a83955f 100644
@@ -59,6 +59,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-25624_1.patch \
            file://CVE-2020-25624_2.patch \
            file://CVE-2020-25625.patch \
+           file://CVE-2020-29443.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2020-29443.patch new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.25.1
#4 lore raw

PATCH 5/7 qemu: Security fix CVE-2021-20221

In reply to Armin Kuster

From: Armin Kuster <[email protected]>

Source: Qemu.org
MR: 111643
Type: Security Fix
Disposition: Backport from https://gitlab.com/qemu-project/qemu/-/commit/edfe2eb4360cde4ed5d95bda7777edcb3510f76a
ChangeID: b3ca1aa4b772a5f27f327250c5b0b988375c86a9
Description:

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2021-20221.patch            | 67 +++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-20221.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index bd1a83955f..ea654e0008 100644
@@ -60,6 +60,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-25624_2.patch \
            file://CVE-2020-25625.patch \
            file://CVE-2020-29443.patch \
+           file://CVE-2021-20221.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2021-20221.patch new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.25.1
#5 lore raw

PATCH 6/7 qemu: fix CVE-2021-20181

In reply to Armin Kuster

From: Sakib Sajal <[email protected]>

Source: Poky.org
MR: 111631
Type: Security Fix
Disposition: Backport from http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-devtools/qemu?h=hardknott&id=53390d2261d2d35cdd637cf12a0fb4dc63f0f88c
ChangeID: 0c660a9ef3637d847c0880283df05d8696221308
Description:

(From OE-Core rev: a993a379bb490efbbf507f5dccda5ab358e8afea)

(cherry picked from commit c2f79065ef0684f2c0bdb92f1b03e690ab730b8c)
(cherry picked from commit 53390d2261d2d35cdd637cf12a0fb4dc63f0f88c)
---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2021-20181.patch            | 81 +++++++++++++++++++
 2 files changed, 82 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-20181.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index ea654e0008..a61f69ba49 100644
@@ -61,6 +61,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-25625.patch \
            file://CVE-2020-29443.patch \
            file://CVE-2021-20221.patch \
+           file://CVE-2021-20181.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2021-20181.patch new file +81 -0

81 lines not on this page · raw message

Signature · 1 line
2.25.1
#6 lore raw

PATCH 7/7 qemu: fix CVE-2021-3416

In reply to Armin Kuster

From: Sakib Sajal <[email protected]>

Source: poky.org
MR: 109686
Type: Security Fix
Disposition: Backport from http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-devtools/qemu?h=hardknott&id=381aebe82f1f6fcc26b47966bc8520dbb1476961
ChangeID: 50b1589249cc3c595d224e3a8347da2b54339ef8
Description:

Drop CVE-2021-3416_4.patch as hw/net/msf2-emac.c does not exist in 4.2.0

(From OE-Core rev: 7a3ce8a79a6c682e1b38f757eb68534e0ce5589d)

(cherry picked from commit e2b5bc11d1b26b73b62e1a63cb75572793282dcb)
(cherry picked from commit 381aebe82f1f6fcc26b47966bc8520dbb1476961)
[Drop CVE-2021-3416_4.patch, affected file does not exist in 4.2.0]
---
 meta/recipes-devtools/qemu/qemu.inc           |   9 +
 .../qemu/qemu/CVE-2021-3416_1.patch           | 177 ++++++++++++++++++
 .../qemu/qemu/CVE-2021-3416_10.patch          |  41 ++++
 .../qemu/qemu/CVE-2021-3416_2.patch           |  42 +++++
 .../qemu/qemu/CVE-2021-3416_3.patch           |  43 +++++
 .../qemu/qemu/CVE-2021-3416_5.patch           |  42 +++++
 .../qemu/qemu/CVE-2021-3416_6.patch           |  40 ++++
 .../qemu/qemu/CVE-2021-3416_7.patch           |  42 +++++
 .../qemu/qemu/CVE-2021-3416_8.patch           |  44 +++++
 .../qemu/qemu/CVE-2021-3416_9.patch           |  41 ++++
 10 files changed, 521 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_1.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_10.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_2.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_3.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_6.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_7.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_8.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch
meta/recipes-devtools/qemu/qemu.inc +9 -0
index a61f69ba49..e64a6b2cb2 100644
@@ -62,6 +62,15 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2020-29443.patch \
            file://CVE-2021-20221.patch \
            file://CVE-2021-20181.patch \
+           file://CVE-2021-3416_1.patch \
+           file://CVE-2021-3416_2.patch \
+           file://CVE-2021-3416_3.patch \
+           file://CVE-2021-3416_5.patch \
+           file://CVE-2021-3416_6.patch \
+           file://CVE-2021-3416_7.patch \
+           file://CVE-2021-3416_8.patch \
+           file://CVE-2021-3416_9.patch \
+           file://CVE-2021-3416_10.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2021-3416_1.patch new file +177 -0

177 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_10.patch new file +41 -0

41 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_2.patch new file +42 -0

42 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_3.patch new file +43 -0

43 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch new file +42 -0

42 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_6.patch new file +40 -0
new file mode 100644
index 0000000000..40b4bd96e7
@@ -0,0 +1,40 @@
+From c0010f9b2bafe866fe32e3c2688454bc24147136 Mon Sep 17 00:00:00 2001
+From: Jason Wang <[email protected]>
+Date: Wed, 24 Feb 2021 13:27:52 +0800
+Subject: [PATCH 06/10] tx_pkt: switch to use qemu_receive_packet_iov() for
+ loopback
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch switches to use qemu_receive_receive_iov() which can detect
+reentrancy and return early.
+
+This is intended to address CVE-2021-3416.
+
+Cc: Prasad J Pandit <[email protected]>
+Cc: [email protected]
+Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
+Signed-off-by: Jason Wang <[email protected]>
+
+Upstream-Status: Backport [8c552542b81e56ff532dd27ec6e5328954bdda73]
+CVE: CVE-2021-3416
+
+Signed-off-by: Sakib Sajal <[email protected]>
+---
+ hw/net/net_tx_pkt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: qemu-4.2.0/hw/net/net_tx_pkt.c
+===================================================================
+--- qemu-4.2.0.orig/hw/net/net_tx_pkt.c
++++ qemu-4.2.0/hw/net/net_tx_pkt.c
+@@ -544,7 +544,7 @@ static inline void net_tx_pkt_sendv(stru
+     NetClientState *nc, const struct iovec *iov, int iov_cnt)
+ {
+     if (pkt->is_loopback) {
+-        nc->info->receive_iov(nc, iov, iov_cnt);
++        qemu_receive_packet_iov(nc, iov, iov_cnt);
+     } else {
+         qemu_sendv_packet(nc, iov, iov_cnt);
+     }
meta/recipes-devtools/qemu/qemu/CVE-2021-3416_7.patch new file +42 -0

42 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_8.patch new file +44 -0

44 lines not on this page · raw message

meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
2.25.1