diff --git a/Drop-bogus-IPv6-messages.patch b/Drop-bogus-IPv6-messages.patch new file mode 100644 index 0000000000000000000000000000000000000000..2fc1e0e780e34b1570fbcfcc4581138c79e7fa46 --- /dev/null +++ b/Drop-bogus-IPv6-messages.patch @@ -0,0 +1,30 @@ +From e8b555c08061ad78920611a5e98ee14fcd967692 Mon Sep 17 00:00:00 2001 +From: Ralf Haferkamp +Date: Fri, 11 Sep 2020 10:55:49 +0800 +Subject: [PATCH] Drop bogus IPv6 messages + +Drop IPv6 message shorter than what's mentioned in the playload +length header (+the size of IPv6 header). They're invalid and could +lead to data leakage in icmp6_send_echoreply(). + +diff --git a/slirp/src/ip6_input.c b/slirp/src/ip6_input.c +index d9d2b7e..c2dce52 100644 +--- a/slirp/src/ip6_input.c ++++ b/slirp/src/ip6_input.c +@@ -49,6 +49,13 @@ void ip6_input(struct mbuf *m) + goto bad; + } + ++ // Check if the message size is big enough to hold what's ++ // set in the payload length header. If not this is an invalid ++ // packet ++ if (m->m_len < ntohs(ip6->ip_pl) + sizeof(struct ip6)) { ++ goto bad; ++ } ++ + /* check ip_ttl for a correct ICMP reply */ + if (ip6->ip_hl == 0) { + icmp6_send_error(m, ICMP6_TIMXCEED, ICMP6_TIMXCEED_INTRANS); +-- +1.8.3.1 + diff --git a/qemu.spec b/qemu.spec index 5fc44c400bf61469f788b70c2812ef0defdf1f6a..a6a76a55d88e499c0396bd3155dabadd4806e898 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,6 +1,6 @@ Name: qemu Version: 4.1.0 -Release: 26 +Release: 27 Epoch: 2 Summary: QEMU is a generic and open source machine emulator and virtualizer License: GPLv2 and BSD and MIT and CC-BY @@ -279,6 +279,7 @@ Patch0266: migration-multifd-not-use-multifd-during-postcopy.patch Patch0267: migration-Define-VMSTATE_INSTANCE_ID_ANY.patch Patch0268: migration-Change-SaveStateEntry.instance_id-into-uin.patch Patch0269: apic-Use-32bit-APIC-ID-for-migration-instance-ID.patch +Patch0270: Drop-bogus-IPv6-messages.patch BuildRequires: flex BuildRequires: bison @@ -625,6 +626,9 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Fri sep 11 2020 Huawei Technologies Co., Ltd +- slir/src/ip6_input.c: fix out-of-bounds read information vulnerablity + * Thu sep 10 2020 Huawei Technologies Co., Ltd - apic-Use-32bit-APIC-ID-for-migration-instance-ID.patch - audio-fix-integer-overflow.patch