summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/CVE-2018-17958.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/CVE-2018-17958.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2018-17958.patch52
1 files changed, 0 insertions, 52 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2018-17958.patch b/meta/recipes-devtools/qemu/qemu/CVE-2018-17958.patch
deleted file mode 100644
index af40ff275a..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2018-17958.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 06e88ca78d056ea4de885e3a1496805179dc47bc Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 15 Oct 2018 16:33:04 +0800
4Subject: [PATCH] ne2000: fix possible out of bound access in ne2000_receive
5
6In ne2000_receive(), we try to assign size_ to size which converts
7from size_t to integer. This will cause troubles when size_ is greater
8INT_MAX, this will lead a negative value in size and it can then pass
9the check of size < MIN_BUF_SIZE which may lead out of bound access of
10for both buf and buf1.
11
12Fixing by converting the type of size to size_t.
13
14CC: address@hidden
15Reported-by: Daniel Shapira <address@hidden>
16Reviewed-by: Michael S. Tsirkin <address@hidden>
17Signed-off-by: Jason Wang <address@hidden>
18
19Upstream-Status: Backport [https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg03273.html]
20
21CVE: CVE-2018-17958
22
23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24---
25 hw/net/ne2000.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
29index 07d79e3..869518e 100644
30--- a/hw/net/ne2000.c
31+++ b/hw/net/ne2000.c
32@@ -174,7 +174,7 @@ static int ne2000_buffer_full(NE2000State *s)
33 ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_)
34 {
35 NE2000State *s = qemu_get_nic_opaque(nc);
36- int size = size_;
37+ size_t size = size_;
38 uint8_t *p;
39 unsigned int total_len, next, avail, len, index, mcast_idx;
40 uint8_t buf1[60];
41@@ -182,7 +182,7 @@ ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_)
42 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
43
44 #if defined(DEBUG_NE2000)
45- printf("NE2000: received len=%d\n", size);
46+ printf("NE2000: received len=%zu\n", size);
47 #endif
48
49 if (s->cmd & E8390_STOP || ne2000_buffer_full(s))
50--
512.7.4
52