diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch new file mode 100644 index 0000000000..93202ebcef --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2021-3416_5.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From d465dc79c9ee729d91ef086b993e956b1935be69 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wang <jasowang@redhat.com> | ||
3 | Date: Wed, 24 Feb 2021 13:14:35 +0800 | ||
4 | Subject: [PATCH 05/10] sungem: switch to use qemu_receive_packet() for | ||
5 | loopback | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | This patch switches to use qemu_receive_packet() which can detect | ||
11 | reentrancy and return early. | ||
12 | |||
13 | This is intended to address CVE-2021-3416. | ||
14 | |||
15 | Cc: Prasad J Pandit <ppandit@redhat.com> | ||
16 | Cc: qemu-stable@nongnu.org | ||
17 | Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | ||
18 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
19 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | ||
20 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
21 | |||
22 | Upstream-Status: Backport [8c92060d3c0248bd4d515719a35922cd2391b9b4] | ||
23 | CVE: CVE-2021-3416 | ||
24 | |||
25 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
26 | --- | ||
27 | hw/net/sungem.c | 2 +- | ||
28 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
29 | |||
30 | Index: qemu-4.2.0/hw/net/sungem.c | ||
31 | =================================================================== | ||
32 | --- qemu-4.2.0.orig/hw/net/sungem.c | ||
33 | +++ qemu-4.2.0/hw/net/sungem.c | ||
34 | @@ -305,7 +305,7 @@ static void sungem_send_packet(SunGEMSta | ||
35 | NetClientState *nc = qemu_get_queue(s->nic); | ||
36 | |||
37 | if (s->macregs[MAC_XIFCFG >> 2] & MAC_XIFCFG_LBCK) { | ||
38 | - nc->info->receive(nc, buf, size); | ||
39 | + qemu_receive_packet(nc, buf, size); | ||
40 | } else { | ||
41 | qemu_send_packet(nc, buf, size); | ||
42 | } | ||