diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch new file mode 100644 index 0000000000..f4a985604e --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2021-3416_9.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From ecf7e62bb2cb02c9bd40082504ae376f3e19ffd2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Bulekov <alxndr@bu.edu> | ||
3 | Date: Mon, 1 Mar 2021 14:33:43 -0500 | ||
4 | Subject: [PATCH 09/10] cadence_gem: 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: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
18 | Signed-off-by: Alexander Bulekov <alxndr@bu.edu> | ||
19 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
20 | |||
21 | Upstream-Status: Backport [e73adfbeec9d4e008630c814759052ed945c3fed] | ||
22 | CVE: CVE-2021-3416 | ||
23 | |||
24 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
25 | --- | ||
26 | hw/net/cadence_gem.c | 4 ++-- | ||
27 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
28 | |||
29 | Index: qemu-4.2.0/hw/net/cadence_gem.c | ||
30 | =================================================================== | ||
31 | --- qemu-4.2.0.orig/hw/net/cadence_gem.c | ||
32 | +++ qemu-4.2.0/hw/net/cadence_gem.c | ||
33 | @@ -1225,7 +1225,7 @@ static void gem_transmit(CadenceGEMState | ||
34 | /* Send the packet somewhere */ | ||
35 | if (s->phy_loop || (s->regs[GEM_NWCTRL] & | ||
36 | GEM_NWCTRL_LOCALLOOP)) { | ||
37 | - gem_receive(qemu_get_queue(s->nic), tx_packet, | ||
38 | + qemu_receive_packet(qemu_get_queue(s->nic), tx_packet, | ||
39 | total_bytes); | ||
40 | } else { | ||
41 | qemu_send_packet(qemu_get_queue(s->nic), tx_packet, | ||