summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/net-CVE-2015-5278.patch40
1 files changed, 40 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