diff options
| author | Chee Yang Lee <chee.yang.lee@intel.com> | 2020-09-18 17:37:01 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-06 14:15:21 +0100 |
| commit | d51df4da286b1f3bb74d134066c2ccd905d0c5e3 (patch) | |
| tree | af0bfa7ebd5ff0975322fae0b7c1f3b2497b9a18 /meta/recipes-devtools | |
| parent | e3a656137398528e0e445c3f31aa0aa6c7c8a8ac (diff) | |
| download | poky-d51df4da286b1f3bb74d134066c2ccd905d0c5e3.tar.gz | |
qemu : fix CVE-2020-16092
(From OE-Core rev: 6007398a0ff468c0b15c4982d7f04e6186d6d700)
Signed-off-by: Chee Yang Lee <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-16092.patch | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index e0ea5ad477..7ce89c0023 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
| @@ -47,6 +47,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
| 47 | file://CVE-2020-15863.patch \ | 47 | file://CVE-2020-15863.patch \ |
| 48 | file://CVE-2020-14364.patch \ | 48 | file://CVE-2020-14364.patch \ |
| 49 | file://CVE-2020-14415.patch \ | 49 | file://CVE-2020-14415.patch \ |
| 50 | file://CVE-2020-16092.patch \ | ||
| 50 | " | 51 | " |
| 51 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 52 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
| 52 | 53 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-16092.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-16092.patch new file mode 100644 index 0000000000..5085a28a4f --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-16092.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From 035e69b063835a5fd23cacabd63690a3d84532a8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mauro Matteo Cascella <mcascell@redhat.com> | ||
| 3 | Date: Sat, 1 Aug 2020 18:42:38 +0200 | ||
| 4 | Subject: [PATCH] hw/net/net_tx_pkt: fix assertion failure in | ||
| 5 | net_tx_pkt_add_raw_fragment() | ||
| 6 | |||
| 7 | An assertion failure issue was found in the code that processes network packets | ||
| 8 | while adding data fragments into the packet context. It could be abused by a | ||
| 9 | malicious guest to abort the QEMU process on the host. This patch replaces the | ||
| 10 | affected assert() with a conditional statement, returning false if the current | ||
| 11 | data fragment exceeds max_raw_frags. | ||
| 12 | |||
| 13 | Reported-by: Alexander Bulekov <alxndr@bu.edu> | ||
| 14 | Reported-by: Ziming Zhang <ezrakiez@gmail.com> | ||
| 15 | Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com> | ||
| 16 | Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com> | ||
| 17 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
| 18 | |||
| 19 | |||
| 20 | Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=035e69b063835a5fd23cacabd63690a3d84532a8] | ||
| 21 | CVE: CVE-2020-16092 | ||
| 22 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
| 23 | --- | ||
| 24 | hw/net/net_tx_pkt.c | 5 ++++- | ||
| 25 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 26 | |||
| 27 | diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c | ||
| 28 | index 9560e4a..da262ed 100644 | ||
| 29 | --- a/hw/net/net_tx_pkt.c | ||
| 30 | +++ b/hw/net/net_tx_pkt.c | ||
| 31 | @@ -379,7 +379,10 @@ bool net_tx_pkt_add_raw_fragment(struct NetTxPkt *pkt, hwaddr pa, | ||
| 32 | hwaddr mapped_len = 0; | ||
| 33 | struct iovec *ventry; | ||
| 34 | assert(pkt); | ||
| 35 | - assert(pkt->max_raw_frags > pkt->raw_frags); | ||
| 36 | + | ||
| 37 | + if (pkt->raw_frags >= pkt->max_raw_frags) { | ||
| 38 | + return false; | ||
| 39 | + } | ||
| 40 | |||
| 41 | if (!len) { | ||
| 42 | return true; | ||
| 43 | -- | ||
| 44 | 1.8.3.1 | ||
| 45 | |||
