diff options
| author | Armin Kuster <akuster@mvista.com> | 2016-09-19 19:56:19 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-23 23:22:04 +0100 |
| commit | 6057d0aa47c9c72e506403ad0b646a1c0e53190d (patch) | |
| tree | 43241193f61b009583626d047b718184357312bf /meta | |
| parent | 48048dcaa26b7ad97c4b2e10c06b86bd5cba761f (diff) | |
| download | poky-6057d0aa47c9c72e506403ad0b646a1c0e53190d.tar.gz | |
qemu: Security fix for CVE-2016-4002
affects qemu < 2.6.0
(From OE-Core rev: 6d7c10eae8b23a71eee6d59baab42d98d8fb7ff8)
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch | 39 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu_2.4.0.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch b/meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch new file mode 100644 index 0000000000..69c11e27d9 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/CVE-2016-4002.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From 7a2c32ec06533c54ddaf70136bfbd89eeaf6db16 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Prasad J Pandit <pjp@fedoraproject.org> | ||
| 3 | Date: Thu, 7 Apr 2016 15:56:02 +0530 | ||
| 4 | Subject: [PATCH] net: mipsnet: check packet length against buffer | ||
| 5 | |||
| 6 | When receiving packets over MIPSnet network device, it uses | ||
| 7 | receive buffer of size 1514 bytes. In case the controller | ||
| 8 | accepts large(MTU) packets, it could lead to memory corruption. | ||
| 9 | Add check to avoid it. | ||
| 10 | |||
| 11 | Reported by: Oleksandr Bazhaniuk <oleksandr.bazhaniuk@intel.com> | ||
| 12 | Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> | ||
| 13 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
| 14 | |||
| 15 | (cherry picked from commit 3af9187fc6caaf415ab9c0c6d92c9678f65cb17f) | ||
| 16 | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> | ||
| 17 | |||
| 18 | Upstream-Status: Backport | ||
| 19 | CVE: CVE-2016-4002 | ||
| 20 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
| 21 | |||
| 22 | --- | ||
| 23 | hw/net/mipsnet.c | 3 +++ | ||
| 24 | 1 file changed, 3 insertions(+) | ||
| 25 | |||
| 26 | Index: qemu-2.4.0/hw/net/mipsnet.c | ||
| 27 | =================================================================== | ||
| 28 | --- qemu-2.4.0.orig/hw/net/mipsnet.c | ||
| 29 | +++ qemu-2.4.0/hw/net/mipsnet.c | ||
| 30 | @@ -82,6 +82,9 @@ static ssize_t mipsnet_receive(NetClient | ||
| 31 | if (!mipsnet_can_receive(nc)) | ||
| 32 | return 0; | ||
| 33 | |||
| 34 | + if (size >= sizeof(s->rx_buffer)) { | ||
| 35 | + return 0; | ||
| 36 | + } | ||
| 37 | s->busy = 1; | ||
| 38 | |||
| 39 | /* Just accept everything. */ | ||
diff --git a/meta/recipes-devtools/qemu/qemu_2.4.0.bb b/meta/recipes-devtools/qemu/qemu_2.4.0.bb index 901a05737f..c33eb66c89 100644 --- a/meta/recipes-devtools/qemu/qemu_2.4.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.4.0.bb | |||
| @@ -28,6 +28,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ | |||
| 28 | file://CVE-2016-4439.patch \ | 28 | file://CVE-2016-4439.patch \ |
| 29 | file://CVE-2016-6351_p1.patch \ | 29 | file://CVE-2016-6351_p1.patch \ |
| 30 | file://CVE-2016-6351_p2.patch \ | 30 | file://CVE-2016-6351_p2.patch \ |
| 31 | file://CVE-2016-4002.patch \ | ||
| 31 | " | 32 | " |
| 32 | SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" | 33 | SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" |
| 33 | SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4" | 34 | SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4" |
