summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-17 17:19:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-20 10:32:15 +0000
commitceafdb6953f18d423437cdd462d6e6249a809373 (patch)
tree692b8be8e98da70e51c0948730009fe8e886622c /meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch
parent6ac57237697b4ffff86f7c843b70a05996ba51bd (diff)
downloadpoky-ceafdb6953f18d423437cdd462d6e6249a809373.tar.gz
nasm: Upgrade 2.13.03 -> 2.14
The patches are all backports or have equivalent changes in the new release so can be dropped. Upstream reworked the install handling to use DESTDIR instead of INSTALLROOT and we no longer need to create directories. (From OE-Core rev: ac9b892f06237a384a60d0404e6ed0afd63c1005) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch')
-rw-r--r--meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch50
1 files changed, 0 insertions, 50 deletions
diff --git a/meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch b/meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch
deleted file mode 100644
index 682d4c7277..0000000000
--- a/meta/recipes-devtools/nasm/nasm/0001-assemble-Check-global-line-limit.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From 7a46d6b9e3a1d8a0ab0d816ef1bf194ad285e082 Mon Sep 17 00:00:00 2001
2From: "Chang S. Bae" <chang.seok.bae@intel.com>
3Date: Fri, 17 Aug 2018 14:26:03 +0800
4Subject: [PATCH] assemble: Check global line limit
5
6Without the limit, the while loop opens to semi-infinite
7that will exhaustively consume the heap space. Also, the
8index value gets into the garbage.
9
10https://bugzilla.nasm.us/show_bug.cgi?id=3392474
11
12Reported-by : Dongliang Mu <mudongliangabcd@gmail.com>
13Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
14Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
15
16Upstream-Status: Backport from upstream [http://repo.or.cz/nasm.git]
17CVE: CVE-2018-10316
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19---
20 asm/nasm.c | 7 ++++++-
21 1 file changed, 6 insertions(+), 1 deletion(-)
22
23diff --git a/asm/nasm.c b/asm/nasm.c
24index 8497ec9..81f6cee 100644
25--- a/asm/nasm.c
26+++ b/asm/nasm.c
27@@ -99,6 +99,8 @@ static char outname[FILENAME_MAX];
28 static char listname[FILENAME_MAX];
29 static char errname[FILENAME_MAX];
30 static int globallineno; /* for forward-reference tracking */
31+#define GLOBALLINENO_MAX INT32_MAX
32+
33 /* static int pass = 0; */
34 const struct ofmt *ofmt = &OF_DEFAULT;
35 const struct ofmt_alias *ofmt_alias = NULL;
36@@ -1360,7 +1362,10 @@ static void assemble_file(char *fname, StrList **depend_ptr)
37 location.offset = offs = get_curr_offs();
38
39 while ((line = preproc->getline())) {
40- globallineno++;
41+ if (globallineno++ == GLOBALLINENO_MAX)
42+ nasm_error(ERR_FATAL,
43+ "overall line number reaches the maximum %d\n",
44+ GLOBALLINENO_MAX);
45
46 /*
47 * Here we parse our directives; this is not handled by the
48--
492.7.4
50