summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
authorJeremy Puhlman <jpuhlman@mvista.com>2018-06-14 08:06:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-27 13:55:21 +0100
commite1ea678e0b7c8bd963064105619dab43255b56f3 (patch)
treeab39ba40aeed42a2d95d50c95d82d53cdadc3f68 /meta/recipes-devtools/qemu
parentfaa46ac06bf1624d0120f1fcfb00b5ad31948b44 (diff)
downloadpoky-e1ea678e0b7c8bd963064105619dab43255b56f3.tar.gz
qemu: CVE-2018-11806 slirp heap buffer overflow
(From OE-Core rev: c03cef42e079e4ed3d1e4f401722778157158bd6) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch70
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.12.0.bb1
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch b/meta/recipes-devtools/qemu/qemu/0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch
new file mode 100644
index 0000000000..837b65a79a
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch
@@ -0,0 +1,70 @@
1CVE: CVE-2018-11806
2Upstream-Status: Backport
3
4https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg01012.html
5
6From dc21a9d2951f0a2a7e63633e2b5c68c54e4edc4b Mon Sep 17 00:00:00 2001
7From: Jeremy Puhlman <jpuhlman@mvista.com>
8Date: Thu, 14 Jun 2018 01:28:49 +0000
9Subject: [PATCH] CVE-2018-11806 QEMU: slirp: heap buffer overflow
10
11Subject: [Qemu-devel] [PATCH 1/2] slirp: correct size computation while concatenating mbuf
12Date: Tue, 5 Jun 2018 23:38:35 +0530
13From: Prasad J Pandit <address@hidden>
14
15While reassembling incoming fragmented datagrams, 'm_cat' routine
16extends the 'mbuf' buffer, if it has insufficient room. It computes
17a wrong buffer size, which leads to overwriting adjacent heap buffer
18area. Correct this size computation in m_cat.
19
20Reported-by: ZDI Disclosures <address@hidden>
21Signed-off-by: Prasad J Pandit <address@hidden>
22---
23 slirp/mbuf.c | 8 ++++----
24 1 file changed, 4 insertions(+), 4 deletions(-)
25
26Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
27---
28 slirp/mbuf.c | 8 ++++----
29 1 file changed, 4 insertions(+), 4 deletions(-)
30
31diff --git a/slirp/mbuf.c b/slirp/mbuf.c
32index 5ff2455..7fb4501 100644
33--- a/slirp/mbuf.c
34+++ b/slirp/mbuf.c
35@@ -138,7 +138,7 @@ m_cat(struct mbuf *m, struct mbuf *n)
36 * If there's no room, realloc
37 */
38 if (M_FREEROOM(m) < n->m_len)
39- m_inc(m,m->m_size+MINCSIZE);
40+ m_inc(m, m->m_len + n->m_len);
41
42 memcpy(m->m_data+m->m_len, n->m_data, n->m_len);
43 m->m_len += n->m_len;
44@@ -158,12 +158,12 @@ m_inc(struct mbuf *m, int size)
45
46 if (m->m_flags & M_EXT) {
47 datasize = m->m_data - m->m_ext;
48- m->m_ext = g_realloc(m->m_ext, size);
49+ m->m_ext = g_realloc(m->m_ext, size + datasize);
50 m->m_data = m->m_ext + datasize;
51 } else {
52 char *dat;
53 datasize = m->m_data - m->m_dat;
54- dat = g_malloc(size);
55+ dat = g_malloc(size + datasize);
56 memcpy(dat, m->m_dat, m->m_size);
57
58 m->m_ext = dat;
59@@ -171,7 +171,7 @@ m_inc(struct mbuf *m, int size)
60 m->m_flags |= M_EXT;
61 }
62
63- m->m_size = size;
64+ m->m_size = size + datasize;
65
66 }
67
68--
692.13.3
70
diff --git a/meta/recipes-devtools/qemu/qemu_2.12.0.bb b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
index 21796df9d7..98db44a8ef 100644
--- a/meta/recipes-devtools/qemu/qemu_2.12.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
@@ -21,6 +21,7 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
21 file://0009-apic-fixup-fallthrough-to-PIC.patch \ 21 file://0009-apic-fixup-fallthrough-to-PIC.patch \
22 file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ 22 file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
23 file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \ 23 file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
24 file://0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch \
24 " 25 "
25UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar" 26UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
26 27