summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/CVE-2020-10756.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2020-10756.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2020-10756.patch40
1 files changed, 40 insertions, 0 deletions
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 @@
1From c7ede54cbd2e2b25385325600958ba0124e31cc0 Mon Sep 17 00:00:00 2001
2From: Ralf Haferkamp <rhafer@suse.com>
3Date: Fri, 3 Jul 2020 14:51:16 +0200
4Subject: [PATCH] Drop bogus IPv6 messages
5
6Drop IPv6 message shorter than what's mentioned in the payload
7length header (+ the size of the IPv6 header). They're invalid an could
8lead to data leakage in icmp6_send_echoreply().
9
10CVE: CVE-2020-10756
11Upstream-Status: Backport
12https://gitlab.freedesktop.org/slirp/libslirp/-/commit/c7ede54cbd2e2b25385325600958ba0124e31cc0
13
14[SG: Based on libslirp commit c7ede54cbd2e2b25385325600958ba0124e31cc0 and adjusted context]
15Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
16---
17 slirp/src/ip6_input.c | 7 +++++++
18 1 file changed, 7 insertions(+)
19
20diff --git a/slirp/src/ip6_input.c b/slirp/src/ip6_input.c
21index 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--
392.17.1
40