Update to upstream version 2.13.02
This commit is contained in:
parent
e8eaa15a3c
commit
e8c4ac364b
2
.gitignore
vendored
2
.gitignore
vendored
@ -50,3 +50,5 @@ nasm-2.08.01-xdoc.tar.bz2
|
||||
/nasm-2.13-xdoc.tar.bz2
|
||||
/nasm-2.13.01.tar.bz2
|
||||
/nasm-2.13.01-xdoc.tar.bz2
|
||||
/nasm-2.13.02.tar.bz2
|
||||
/nasm-2.13.02-xdoc.tar.bz2
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From 0e8efb23bec14057b21ff7aab280e5a82e1bde30 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Majer <amajer@suse.de>
|
||||
Date: Tue, 25 Jul 2017 11:12:35 +0200
|
||||
Subject: [PATCH 1/3] preproc: Only concat tok->text if we accounted for its
|
||||
size
|
||||
|
||||
https://bugzilla.nasm.us/show_bug.cgi?id=3392415
|
||||
|
||||
Signed-off-by: Adam Majer <amajer@suse.de>
|
||||
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
||||
---
|
||||
asm/preproc.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/asm/preproc.c b/asm/preproc.c
|
||||
index 97e87d2c..22c90f2b 100644
|
||||
--- a/asm/preproc.c
|
||||
+++ b/asm/preproc.c
|
||||
@@ -3845,9 +3845,15 @@ static bool paste_tokens(Token **head, const struct tokseq_match *m,
|
||||
len += strlen(tok->text);
|
||||
p = buf = nasm_malloc(len + 1);
|
||||
|
||||
+ strcpy(p, tok->text);
|
||||
+ p = strchr(p, '\0');
|
||||
+ tok = delete_Token(tok);
|
||||
+
|
||||
while (tok != next) {
|
||||
- strcpy(p, tok->text);
|
||||
- p = strchr(p, '\0');
|
||||
+ if (PP_CONCAT_MATCH(tok, m[i].mask_tail)) {
|
||||
+ strcpy(p, tok->text);
|
||||
+ p = strchr(p, '\0');
|
||||
+ }
|
||||
tok = delete_Token(tok);
|
||||
}
|
||||
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From 35c32162338847b935bc4d2cab7378caeb48e2ca Mon Sep 17 00:00:00 2001
|
||||
From: Adam Majer <amajer@suse.de>
|
||||
Date: Tue, 25 Jul 2017 10:42:01 +0200
|
||||
Subject: [PATCH 2/3] preproc: Workaround a usage after free bug
|
||||
|
||||
In some circumstantes this free is incorrect resulting
|
||||
in usage after-free. Workaround it by not freeing memory
|
||||
here.
|
||||
|
||||
https://bugzilla.nasm.us/show_bug.cgi?id=3392414
|
||||
|
||||
gorcunov@:
|
||||
- slightly tuneup the comment
|
||||
|
||||
Signed-off-by: Adam Majer <amajer@suse.de>
|
||||
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
||||
---
|
||||
asm/preproc.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/asm/preproc.c b/asm/preproc.c
|
||||
index 22c90f2b..f6e296b4 100644
|
||||
--- a/asm/preproc.c
|
||||
+++ b/asm/preproc.c
|
||||
@@ -5101,8 +5101,18 @@ static char *pp_getline(void)
|
||||
nasm_free(m->paramlen);
|
||||
l->finishes->in_progress = 0;
|
||||
}
|
||||
- } else
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * FIXME It is incorrect to always free_mmacro here.
|
||||
+ * It leads to usage-after-free.
|
||||
+ *
|
||||
+ * https://bugzilla.nasm.us/show_bug.cgi?id=3392414
|
||||
+ */
|
||||
+#if 0
|
||||
+ else
|
||||
free_mmacro(m);
|
||||
+#endif
|
||||
}
|
||||
istk->expansion = l->next;
|
||||
nasm_free(l);
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 3018ceaacf334d0da938c9d3cd35ec8b06b4bf90 Mon Sep 17 00:00:00 2001
|
||||
From: Cyrill Gorcunov <gorcunov@gmail.com>
|
||||
Date: Wed, 26 Jul 2017 01:21:16 +0300
|
||||
Subject: [PATCH 3/3] preproc: Free token's text if only it has been modified
|
||||
|
||||
https://bugzilla.nasm.us/show_bug.cgi?id=3392414
|
||||
|
||||
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
||||
---
|
||||
asm/preproc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/asm/preproc.c b/asm/preproc.c
|
||||
index f6e296b4..0d0e1040 100644
|
||||
--- a/asm/preproc.c
|
||||
+++ b/asm/preproc.c
|
||||
@@ -1280,8 +1280,8 @@ static char *detoken(Token * tlist, bool expand_locals)
|
||||
t->text = nasm_zalloc(2);
|
||||
} else
|
||||
t->text = nasm_strdup(p);
|
||||
+ nasm_free(q);
|
||||
}
|
||||
- nasm_free(q);
|
||||
}
|
||||
|
||||
/* Expand local macros here and not during preprocessing */
|
||||
--
|
||||
2.13.3
|
||||
|
||||
18
nasm.spec
18
nasm.spec
@ -7,15 +7,13 @@
|
||||
|
||||
Summary: A portable x86 assembler which uses Intel-like syntax
|
||||
Name: nasm
|
||||
Version: 2.13.01
|
||||
Release: 4%{?dist}
|
||||
Version: 2.13.02
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
URL: http://www.nasm.us
|
||||
Source0: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/%{name}-%{version}.tar.bz2
|
||||
Source1: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/%{name}-%{version}-xdoc.tar.bz2
|
||||
Patch0: 0001-preproc-Only-concat-tok-text-if-we-accounted-for-its.patch
|
||||
Patch1: 0002-preproc-Workaround-a-usage-after-free-bug.patch
|
||||
Patch2: 0003-preproc-Free-token-s-text-if-only-it-has-been-modifi.patch
|
||||
|
||||
BuildRequires: perl(Env)
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: asciidoc
|
||||
@ -57,9 +55,7 @@ include linker, library manager, loader, and information dump.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
tar xjf %{SOURCE1} --strip-components 1
|
||||
|
||||
%build
|
||||
@ -101,6 +97,12 @@ make INSTALLROOT=$RPM_BUILD_ROOT install install_rdf
|
||||
%{_mandir}/man1/ld*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 02 2018 Michael Simacek <msimacek@redhat.com> - 2.13.02-1
|
||||
- Update to upstream version 2.13.02
|
||||
- Resolves: CVE-2017-17810, CVE-2017-17811, CVE-2017-17812, CVE-2017-17813,
|
||||
CVE-2017-17814, CVE-2017-17815, CVE-2017-17816, CVE-2017-17817,
|
||||
CVE-2017-17818, CVE-2017-17819, CVE-2017-17820
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.01-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
||||
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (nasm-2.13.01.tar.bz2) = 3caf1a3bb9c2f406adce1de37afa92fbf7d7f8d2d274baab08b0e9dc6712c09347fc57d04c3962b6820ad303040efe7e3de0b923c3010c8da00051633bf00c5b
|
||||
SHA512 (nasm-2.13.01-xdoc.tar.bz2) = b10c0a341af812019cd50fad5c11671dee31675b16e2533a2fdbebdce05532e1c79ffc0b80e3e6d3ecc286c12b12b30c2b3ba576e55c4ef7e60904a346a163d1
|
||||
SHA512 (nasm-2.13.02.tar.bz2) = 96b8d66fa15a1a6a78fc4ce88029fb406d9904d1e1b65d42b07914c3128d4dc84b4c986a866204a6f25448b0a5eeaa1d0e1147459769765343ddb6ad73edcc0e
|
||||
SHA512 (nasm-2.13.02-xdoc.tar.bz2) = 696523f1bdfa9091a80e247dd448bb42392d07dca1cb4f7c9f75cd4f68d81c811034e03b9245fe5cbde1a9947bb3deed0476a9ea4abad87ebad6b0133917ee7a
|
||||
|
||||
Loading…
Reference in New Issue
Block a user