summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJeremy Puhlman <jpuhlman@mvista.com>2018-06-14 11:04:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-02 11:41:26 +0100
commitcb3a94377306ce025b1431200f276a527ffd4e41 (patch)
treeaf97aa9ad8d9918b8ef4629d8cd63526e04764d0 /meta
parent1ae140f7be7897211f8252940a7bce99c74a7627 (diff)
downloadpoky-cb3a94377306ce025b1431200f276a527ffd4e41.tar.gz
Qemu: CVE-2018-11806 slirp-heap-buffer-overflow
(From OE-Core rev: d3d0798086177c463142e33f1493be6e34536c64) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> [Fixed up for Sumo context] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch69
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.11.1.bb1
2 files changed, 70 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..8622360114
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch
@@ -0,0 +1,69 @@
1Upstream-Status: Backport
2
3https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg01012.html
4
5From dc21a9d2951f0a2a7e63633e2b5c68c54e4edc4b Mon Sep 17 00:00:00 2001
6From: Jeremy Puhlman <jpuhlman@mvista.com>
7Date: Thu, 14 Jun 2018 01:28:49 +0000
8Subject: [PATCH] CVE-2018-11806 QEMU: slirp: heap buffer overflow
9
10Subject: [Qemu-devel] [PATCH 1/2] slirp: correct size computation while concatenating mbuf
11Date: Tue, 5 Jun 2018 23:38:35 +0530
12From: Prasad J Pandit <address@hidden>
13
14While reassembling incoming fragmented datagrams, 'm_cat' routine
15extends the 'mbuf' buffer, if it has insufficient room. It computes
16a wrong buffer size, which leads to overwriting adjacent heap buffer
17area. Correct this size computation in m_cat.
18
19Reported-by: ZDI Disclosures <address@hidden>
20Signed-off-by: Prasad J Pandit <address@hidden>
21---
22 slirp/mbuf.c | 8 ++++----
23 1 file changed, 4 insertions(+), 4 deletions(-)
24
25Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
26---
27 slirp/mbuf.c | 8 ++++----
28 1 file changed, 4 insertions(+), 4 deletions(-)
29
30diff --git a/slirp/mbuf.c b/slirp/mbuf.c
31index 5ff2455..7fb4501 100644
32--- a/slirp/mbuf.c
33+++ b/slirp/mbuf.c
34@@ -138,7 +138,7 @@ m_cat(struct mbuf *m, struct mbuf *n)
35 * If there's no room, realloc
36 */
37 if (M_FREEROOM(m) < n->m_len)
38- m_inc(m,m->m_size+MINCSIZE);
39+ m_inc(m, m->m_len + n->m_len);
40
41 memcpy(m->m_data+m->m_len, n->m_data, n->m_len);
42 m->m_len += n->m_len;
43@@ -158,12 +158,12 @@ m_inc(struct mbuf *m, int size)
44
45 if (m->m_flags & M_EXT) {
46 datasize = m->m_data - m->m_ext;
47- m->m_ext = g_realloc(m->m_ext, size);
48+ m->m_ext = g_realloc(m->m_ext, size + datasize);
49 m->m_data = m->m_ext + datasize;
50 } else {
51 char *dat;
52 datasize = m->m_data - m->m_dat;
53- dat = g_malloc(size);
54+ dat = g_malloc(size + datasize);
55 memcpy(dat, m->m_dat, m->m_size);
56
57 m->m_ext = dat;
58@@ -171,7 +171,7 @@ m_inc(struct mbuf *m, int size)
59 m->m_flags |= M_EXT;
60 }
61
62- m->m_size = size;
63+ m->m_size = size + datasize;
64
65 }
66
67--
682.13.3
69
diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/meta/recipes-devtools/qemu/qemu_2.11.1.bb
index 2314262d7a..7de21ac0fa 100644
--- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.11.1.bb
@@ -23,6 +23,7 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
23 file://0011-memfd-fix-configure-test.patch \ 23 file://0011-memfd-fix-configure-test.patch \
24 file://0012-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \ 24 file://0012-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
25 file://0013-ps2-check-PS2Queue-pointers-in-post_load-routine.patch \ 25 file://0013-ps2-check-PS2Queue-pointers-in-post_load-routine.patch \
26 file://0001-CVE-2018-11806-QEMU-slirp-heap-buffer-overflow.patch \
26 " 27 "
27UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar" 28UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
28 29