All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 05/41] qemu : fix CVE-2020-16092
Date: Wed, 30 Sep 2020 12:11:07 -1000	[thread overview]
Message-ID: <6007398a0ff468c0b15c4982d7f04e6186d6d700.1601502610.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1601502610.git.steve@sakoman.com>

From: Chee Yang Lee <chee.yang.lee@intel.com>

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2020-16092.patch            | 45 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-16092.patch

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 \
 	   file://CVE-2020-15863.patch \
 	   file://CVE-2020-14364.patch \
 	   file://CVE-2020-14415.patch \
+	   file://CVE-2020-16092.patch \
 	   "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
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 @@
+From 035e69b063835a5fd23cacabd63690a3d84532a8 Mon Sep 17 00:00:00 2001
+From: Mauro Matteo Cascella <mcascell@redhat.com>
+Date: Sat, 1 Aug 2020 18:42:38 +0200
+Subject: [PATCH] hw/net/net_tx_pkt: fix assertion failure in
+ net_tx_pkt_add_raw_fragment()
+
+An assertion failure issue was found in the code that processes network packets
+while adding data fragments into the packet context. It could be abused by a
+malicious guest to abort the QEMU process on the host. This patch replaces the
+affected assert() with a conditional statement, returning false if the current
+data fragment exceeds max_raw_frags.
+
+Reported-by: Alexander Bulekov <alxndr@bu.edu>
+Reported-by: Ziming Zhang <ezrakiez@gmail.com>
+Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com>
+Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
+Signed-off-by: Jason Wang <jasowang@redhat.com>
+
+
+Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=035e69b063835a5fd23cacabd63690a3d84532a8]
+CVE: CVE-2020-16092
+Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
+---
+ hw/net/net_tx_pkt.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c
+index 9560e4a..da262ed 100644
+--- a/hw/net/net_tx_pkt.c
++++ b/hw/net/net_tx_pkt.c
+@@ -379,7 +379,10 @@ bool net_tx_pkt_add_raw_fragment(struct NetTxPkt *pkt, hwaddr pa,
+     hwaddr mapped_len = 0;
+     struct iovec *ventry;
+     assert(pkt);
+-    assert(pkt->max_raw_frags > pkt->raw_frags);
++
++    if (pkt->raw_frags >= pkt->max_raw_frags) {
++        return false;
++    }
+ 
+     if (!len) {
+         return true;
+-- 
+1.8.3.1
+
-- 
2.17.1


  parent reply	other threads:[~2020-09-30 22:12 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 22:11 [OE-core][dunfell 00/41] Patch review Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 01/41] python3-markupsafe: Import from meta-oe/meta-python Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 02/41] python3-jinja2: " Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 03/41] buildtools-tarball: Add python3-jinja2 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 04/41] site: Make sys_siglist default to no Steve Sakoman
2020-09-30 22:11 ` Steve Sakoman [this message]
2020-09-30 22:11 ` [OE-core][dunfell 06/41] bash : inlcude patch 17 & 18 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 07/41] xserver-xorg: fix CVE-2020-14346/14361/14362 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 08/41] libx11: fix CVE-2020-14363 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 09/41] cve-update-db-native: be less magical about checking whether the cve-check class is enabled Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 10/41] cve-update-db-native: move -journal checking into do_fetch Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 11/41] cve-update-db-native: remove unused variable Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 12/41] alsa-plugins: improve .la removal Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 13/41] sato-screenshot: " Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 14/41] insane: Check for feature check variables not being used Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 15/41] insane: check for missing update-alternatives inherit Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 16/41] xinput-calibrator: change SRC_URI to branch with libinput support Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 17/41] dropbear/openssh: Lower priority of key generation Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 18/41] testexport: rename create_tarball method Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 19/41] packagegroups: remove strace and lttng-tools for rv32/musl Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 20/41] curl: Change SRC_URI from http to https Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 21/41] meta: add/fix invalid Upstream-Status tags Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 22/41] buildtools: Handle generic environment setup injection Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 23/41] buildtools-tarball: Fix conflicts with oe-selftest and other tooling Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 24/41] oeqa/qemurunner: Increase serial timeout Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 25/41] oeqa/selftest/incompatible_lib: Fix append usage Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 26/41] oeqa/selftest/containerimage: Update to match assumptions in configuration Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 27/41] ssh-pregen-hostkeys: Add a recipe with pregenerated ssh host keys Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 28/41] bash: fix CVE-2019-18276 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 29/41] packagegroup: rrecommend perf also for musl on ARM Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 30/41] sysvinit rc: Use PSPLASH_FIFO_DIR for progress fifo Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 31/41] openssh: Allow enable/disable of rng-tools recommendation on sshd Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 32/41] sstate.bbclass: Check file ownership before doing 'touch -a' Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 33/41] kernel-yocto: add KBUILD_DEFCONFIG search location to failure message Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 34/41] linux-yocto/config: netfilter: Enable nat for ipv4 and ipv6 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 35/41] linux-yocto/5.4: update to v5.4.64 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 36/41] linux-yocto/5.4: update to v5.4.65 Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 37/41] lttng-modules: backport writeback.h changes from 2.12.x to fix kernel 5.4.62+ Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 38/41] wic: Add --offset argument for partitions Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 39/41] wic: Fix --extra-space argument handling Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 40/41] wic: Fix error message when reporting invalid offset Steve Sakoman
2020-09-30 22:11 ` [OE-core][dunfell 41/41] wic: Add 512 Byte alignment to --offset Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6007398a0ff468c0b15c4982d7f04e6186d6d700.1601502610.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.