summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2016-05-02 09:33:25 +0200
committerTudor Florea <tudor.florea@enea.com>2016-05-03 16:06:04 +0200
commit128060b9853174f93dd4c45d4dc1b0acbe08388f (patch)
tree4a667da4ea4a2c8167a12d790cfcaccf73100895
parent3291d1de776eb008e665746f93a65aa90f8750ce (diff)
downloadpoky-128060b9853174f93dd4c45d4dc1b0acbe08388f.tar.gz
qemu: net: CVE-2015-5278
Avoid infinite loop when receiving packets. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-5278 Reference to upstream patch: http://git.qemu.org/?p=qemu.git;a=commit;h=5a1ccdfe44946e726b4c6fda8a4493b3931a68c1 Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-rw-r--r--meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch40
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.4.0.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch b/meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch
new file mode 100644
index 0000000000..5b22a23c18
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch
@@ -0,0 +1,40 @@
1From 5a1ccdfe44946e726b4c6fda8a4493b3931a68c1 Mon Sep 17 00:00:00 2001
2From: P J P <pjp@fedoraproject.org>
3Date: Tue, 15 Sep 2015 16:46:59 +0530
4Subject: net: avoid infinite loop when receiving packets(CVE-2015-5278)
5
6Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152)
7bytes to process network packets. While receiving packets
8via ne2000_receive() routine, a local 'index' variable
9could exceed the ring buffer size, leading to an infinite
10loop situation.
11
12CVE: CVE-2015-5278
13Upstream-Status: Backport
14
15Reported-by: Qinghao Tang <luodalongde@gmail.com>
16Signed-off-by: P J P <pjp@fedoraproject.org>
17Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
18(cherry picked from commit 737d2b3c41d59eb8f94ab7eb419b957938f24943)
19Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
20Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
21---
22 hw/net/ne2000.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
26index 9278571..2bdb4c9 100644
27--- a/hw/net/ne2000.c
28+++ b/hw/net/ne2000.c
29@@ -256,7 +256,7 @@ ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_)
30 if (index <= s->stop)
31 avail = s->stop - index;
32 else
33- avail = 0;
34+ break;
35 len = size;
36 if (len > avail)
37 len = avail;
38--
391.9.1
40
diff --git a/meta/recipes-devtools/qemu/qemu_2.4.0.bb b/meta/recipes-devtools/qemu/qemu_2.4.0.bb
index 444fb02e47..9435d969f5 100644
--- a/meta/recipes-devtools/qemu/qemu_2.4.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.4.0.bb
@@ -21,6 +21,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
21 file://CVE-2016-2197.patch \ 21 file://CVE-2016-2197.patch \
22 file://CVE-2016-2198.patch \ 22 file://CVE-2016-2198.patch \
23 file://vnc-CVE-2015-5225.patch \ 23 file://vnc-CVE-2015-5225.patch \
24 file://net-CVE-2015-5278.patch \
24 " 25 "
25SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" 26SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
26SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4" 27SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4"