diff options
| author | Stefan Ghinea <stefan.ghinea@windriver.com> | 2020-08-21 22:47:47 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-10 13:21:41 +0100 |
| commit | 5ce2f71ca37512b64f14d9bcdc1ebedc24510db3 (patch) | |
| tree | a1de2ae8a4dc730ba9fcd4fce977266fd4a39dd7 /meta/recipes-devtools | |
| parent | ba9c9dc10677371c55041e4bba38350f0e777d15 (diff) | |
| download | poky-5ce2f71ca37512b64f14d9bcdc1ebedc24510db3.tar.gz | |
qemu: CVE-2020-10756
An out-of-bounds read vulnerability was found in the SLiRP networking
implementation of the QEMU emulator. This flaw occurs in the
icmp6_send_echoreply() routine while replying to an ICMP echo request,
also known as ping. This flaw allows a malicious guest to leak the
contents of the host memory, resulting in possible information disclosure.
This flaw affects versions of libslirp before 4.3.1.
References:
https://nvd.nist.gov/vuln/detail/CVE-2020-10756
https://bugzilla.redhat.com/show_bug.cgi?id=1835986
Upstream patches:
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/c7ede54cbd2e2b25385325600958ba0124e31cc0
(From OE-Core rev: b6d73f9f8c055928051dc57943baf5833568d04f)
Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.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-10756.patch | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index e686b24e80..702a817988 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
| @@ -40,6 +40,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
| 40 | file://CVE-2020-13765.patch \ | 40 | file://CVE-2020-13765.patch \ |
| 41 | file://CVE-2020-10702.patch \ | 41 | file://CVE-2020-10702.patch \ |
| 42 | file://CVE-2020-16092.patch \ | 42 | file://CVE-2020-16092.patch \ |
| 43 | file://CVE-2020-10756.patch \ | ||
| 43 | " | 44 | " |
| 44 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 45 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
| 45 | 46 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-10756.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-10756.patch new file mode 100644 index 0000000000..306aef061b --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-10756.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From c7ede54cbd2e2b25385325600958ba0124e31cc0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ralf Haferkamp <rhafer@suse.com> | ||
| 3 | Date: Fri, 3 Jul 2020 14:51:16 +0200 | ||
| 4 | Subject: [PATCH] Drop bogus IPv6 messages | ||
| 5 | |||
| 6 | Drop IPv6 message shorter than what's mentioned in the payload | ||
| 7 | length header (+ the size of the IPv6 header). They're invalid an could | ||
| 8 | lead to data leakage in icmp6_send_echoreply(). | ||
| 9 | |||
| 10 | CVE: CVE-2020-10756 | ||
| 11 | Upstream-Status: Backport | ||
| 12 | https://gitlab.freedesktop.org/slirp/libslirp/-/commit/c7ede54cbd2e2b25385325600958ba0124e31cc0 | ||
| 13 | |||
| 14 | [SG: Based on libslirp commit c7ede54cbd2e2b25385325600958ba0124e31cc0 and adjusted context] | ||
| 15 | Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com> | ||
| 16 | --- | ||
| 17 | slirp/src/ip6_input.c | 7 +++++++ | ||
| 18 | 1 file changed, 7 insertions(+) | ||
| 19 | |||
| 20 | diff --git a/slirp/src/ip6_input.c b/slirp/src/ip6_input.c | ||
| 21 | index d9d2b7e9..0f2b1785 100644 | ||
| 22 | --- a/slirp/src/ip6_input.c | ||
| 23 | +++ b/slirp/src/ip6_input.c | ||
| 24 | @@ -49,6 +49,13 @@ void ip6_input(struct mbuf *m) | ||
| 25 | goto bad; | ||
| 26 | } | ||
| 27 | |||
| 28 | + // Check if the message size is big enough to hold what's | ||
| 29 | + // set in the payload length header. If not this is an invalid | ||
| 30 | + // packet | ||
| 31 | + if (m->m_len < ntohs(ip6->ip_pl) + sizeof(struct ip6)) { | ||
| 32 | + goto bad; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | /* check ip_ttl for a correct ICMP reply */ | ||
| 36 | if (ip6->ip_hl == 0) { | ||
| 37 | icmp6_send_error(m, ICMP6_TIMXCEED, ICMP6_TIMXCEED_INTRANS); | ||
| 38 | -- | ||
| 39 | 2.17.1 | ||
| 40 | |||
