summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-10-14 02:45:59 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-18 11:08:53 +0100
commit255160b689fdfb782e0f04abb4b5538a9eb28b5b (patch)
treee6a2ef07a087db9ae5c36093b5b2ddf31d97dff8 /meta/recipes-devtools
parent842dc807b7a11c75e2be95a66e13b8e87605f639 (diff)
downloadpoky-255160b689fdfb782e0f04abb4b5538a9eb28b5b.tar.gz
nasm: fix CVE-2018-10016
Previously fix of CVE-2018-10016 caused ovmf build failure, I reported the failure to upstream and it replied with this V2 fix. Details at: https://bugzilla.nasm.us/show_bug.cgi?id=3392473 (From OE-Core rev: e2fa6bc137faebba3c440cac93c88092421e8e82) (From OE-Core rev: 19138a21aabe60b67015e3383f4030db0d4d37a4) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/nasm/nasm/0001-eval-Eliminate-division-by-zero.patch40
-rw-r--r--meta/recipes-devtools/nasm/nasm_2.13.03.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/nasm/nasm/0001-eval-Eliminate-division-by-zero.patch b/meta/recipes-devtools/nasm/nasm/0001-eval-Eliminate-division-by-zero.patch
new file mode 100644
index 0000000000..6c332497c9
--- /dev/null
+++ b/meta/recipes-devtools/nasm/nasm/0001-eval-Eliminate-division-by-zero.patch
@@ -0,0 +1,40 @@
1From ceec0d818798aeaa75ed4907e6135b0247ed46b2 Mon Sep 17 00:00:00 2001
2From: Cyrill Gorcunov <gorcunov@gmail.com>
3Date: Sun, 14 Oct 2018 01:26:19 +0300
4Subject: [PATCH] eval: Eliminate division by zero
5
6When doing division we should detect if the value we're
7divided by is not zero. Instead of is_unknown() helper
8we should use is_just_unknown().
9
10https://bugzilla.nasm.us/show_bug.cgi?id=3392515
11https://bugzilla.nasm.us/show_bug.cgi?id=3392473
12
13Reported-by: Jun <jxx13@psu.edu>
14Reported-by: stuartly <situlingyun@gmail.com>
15Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
16
17Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/ceec0d818798aeaa75ed4907e6135b0247ed46b2.patch]
18CVE: CVE-2018-10016
19Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
20
21---
22 asm/eval.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/asm/eval.c b/asm/eval.c
26index 1a6680f..7e727a4 100644
27--- a/asm/eval.c
28+++ b/asm/eval.c
29@@ -580,7 +580,7 @@ static expr *expr5(int critical)
30 " scalar values");
31 return NULL;
32 }
33- if (j != '*' && !is_unknown(f) && reloc_value(f) == 0) {
34+ if (j != '*' && !is_just_unknown(f) && reloc_value(f) == 0) {
35 nasm_error(ERR_NONFATAL, "division by zero");
36 return NULL;
37 }
38--
392.10.2
40
diff --git a/meta/recipes-devtools/nasm/nasm_2.13.03.bb b/meta/recipes-devtools/nasm/nasm_2.13.03.bb
index 6a02df4854..730db1d8c2 100644
--- a/meta/recipes-devtools/nasm/nasm_2.13.03.bb
+++ b/meta/recipes-devtools/nasm/nasm_2.13.03.bb
@@ -8,6 +8,7 @@ SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
8 file://0001-assemble-Check-global-line-limit.patch \ 8 file://0001-assemble-Check-global-line-limit.patch \
9 file://0001-fix-CVE-2018-8882.patch \ 9 file://0001-fix-CVE-2018-8882.patch \
10 file://0001-Verify-that-we-are-not-reading-past-end-of-a-buffer.patch \ 10 file://0001-Verify-that-we-are-not-reading-past-end-of-a-buffer.patch \
11 file://0001-eval-Eliminate-division-by-zero.patch \
11 " 12 "
12 13
13SRC_URI[md5sum] = "0c581d482f39d5111879ca9601938f74" 14SRC_URI[md5sum] = "0c581d482f39d5111879ca9601938f74"