diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch b/meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch new file mode 100644 index 0000000000..52fac8a051 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-15469-4.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From f867cebaedbc9c43189f102e4cdfdff05e88df7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Prasad J Pandit <pjp@fedoraproject.org> | ||
3 | Date: Tue, 11 Aug 2020 17:11:28 +0530 | ||
4 | Subject: [PATCH] prep: add ppc-parity write method | ||
5 | |||
6 | Add ppc-parity mmio write method to avoid NULL pointer dereference | ||
7 | issue. | ||
8 | |||
9 | Reported-by: Lei Sun <slei.casper@gmail.com> | ||
10 | Acked-by: David Gibson <david@gibson.dropbear.id.au> | ||
11 | Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> | ||
12 | Reviewed-by: Li Qiang <liq3ea@gmail.com> | ||
13 | Message-Id: <20200811114133.672647-5-ppandit@redhat.com> | ||
14 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
15 | |||
16 | CVE: CVE-2020-15469 | ||
17 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/qemu/tree/debian/patches/CVE-2020-15469-4.patch?h=ubuntu/focal-security Upstream commit https://github.com/qemu/qemu/commit/f867cebaedbc9c43189f102e4cdfdff05e88df7f] | ||
18 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
19 | --- | ||
20 | hw/ppc/prep_systemio.c | 8 ++++++++ | ||
21 | 1 file changed, 8 insertions(+) | ||
22 | |||
23 | diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c | ||
24 | index 4e48ef2..b2bd783 100644 | ||
25 | --- a/hw/ppc/prep_systemio.c | ||
26 | +++ b/hw/ppc/prep_systemio.c | ||
27 | @@ -23,6 +23,7 @@ | ||
28 | */ | ||
29 | |||
30 | #include "qemu/osdep.h" | ||
31 | +#include "qemu/log.h" | ||
32 | #include "hw/irq.h" | ||
33 | #include "hw/isa/isa.h" | ||
34 | #include "hw/qdev-properties.h" | ||
35 | @@ -235,8 +236,15 @@ static uint64_t ppc_parity_error_readl(void *opaque, hwaddr addr, | ||
36 | return val; | ||
37 | } | ||
38 | |||
39 | +static void ppc_parity_error_writel(void *opaque, hwaddr addr, | ||
40 | + uint64_t data, unsigned size) | ||
41 | +{ | ||
42 | + qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid access\n", __func__); | ||
43 | +} | ||
44 | + | ||
45 | static const MemoryRegionOps ppc_parity_error_ops = { | ||
46 | .read = ppc_parity_error_readl, | ||
47 | + .write = ppc_parity_error_writel, | ||
48 | .valid = { | ||
49 | .min_access_size = 4, | ||
50 | .max_access_size = 4, | ||
51 | -- | ||
52 | 1.8.3.1 | ||
53 | |||