From 914ff148fafc7df2b1c85ba176635ce58d3ebf7a Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Wed, 10 Feb 2016 12:28:22 -0800 Subject: qemu: Security fix CVE-2016-2198 CVE-2016-2198 Qemu: usb: ehci null pointer dereference in ehci_caps_write (From OE-Core rev: 33b5c3b4822b6bbb06ad5fdf7a120acd520f665d) Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- .../recipes-devtools/qemu/qemu/CVE-2016-2198.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch (limited to 'meta/recipes-devtools/qemu/qemu') diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch b/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch new file mode 100644 index 0000000000..f1201f0613 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch @@ -0,0 +1,45 @@ +From: Prasad J Pandit + +USB Ehci emulation supports host controller capability registers. +But its mmio '.write' function was missing, which lead to a null +pointer dereference issue. Add a do nothing 'ehci_caps_write' +definition to avoid it; Do nothing because capability registers +are Read Only(RO). + +Reported-by: Zuozhi Fzz +Signed-off-by: Prasad J Pandit + +Upstream-Status: Backport +https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg05899.html + +CVE: CVE-2016-2198 +Signed-off-by: Armin Kuster + +--- + hw/usb/hcd-ehci.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: qemu-2.5.0/hw/usb/hcd-ehci.c +=================================================================== +--- qemu-2.5.0.orig/hw/usb/hcd-ehci.c ++++ qemu-2.5.0/hw/usb/hcd-ehci.c +@@ -893,6 +893,11 @@ static uint64_t ehci_caps_read(void *ptr + return s->caps[addr]; + } + ++static void ehci_caps_write(void *ptr, hwaddr addr, ++ uint64_t val, unsigned size) ++{ ++} ++ + static uint64_t ehci_opreg_read(void *ptr, hwaddr addr, + unsigned size) + { +@@ -2310,6 +2315,7 @@ static void ehci_frame_timer(void *opaqu + + static const MemoryRegionOps ehci_mmio_caps_ops = { + .read = ehci_caps_read, ++ .write = ehci_caps_write, + .valid.min_access_size = 1, + .valid.max_access_size = 4, + .impl.min_access_size = 1, -- cgit v1.2.3-54-g00ecf