diff options
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.patch | 40 |
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 @@ | |||
1 | From 5a1ccdfe44946e726b4c6fda8a4493b3931a68c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: P J P <pjp@fedoraproject.org> | ||
3 | Date: Tue, 15 Sep 2015 16:46:59 +0530 | ||
4 | Subject: net: avoid infinite loop when receiving packets(CVE-2015-5278) | ||
5 | |||
6 | Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152) | ||
7 | bytes to process network packets. While receiving packets | ||
8 | via ne2000_receive() routine, a local 'index' variable | ||
9 | could exceed the ring buffer size, leading to an infinite | ||
10 | loop situation. | ||
11 | |||
12 | CVE: CVE-2015-5278 | ||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Reported-by: Qinghao Tang <luodalongde@gmail.com> | ||
16 | Signed-off-by: P J P <pjp@fedoraproject.org> | ||
17 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
18 | (cherry picked from commit 737d2b3c41d59eb8f94ab7eb419b957938f24943) | ||
19 | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> | ||
20 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
21 | --- | ||
22 | hw/net/ne2000.c | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c | ||
26 | index 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 | -- | ||
39 | 1.9.1 | ||
40 | |||