diff --git a/CVE-2023-31972.patch b/CVE-2023-31972.patch new file mode 100644 index 0000000000000000000000000000000000000000..41e44c51b49b569396c4b73ba01c7fc12c725845 --- /dev/null +++ b/CVE-2023-31972.patch @@ -0,0 +1,28 @@ +From 5ea57b131987e5a93a9b06c69262a29f32174383 Mon Sep 17 00:00:00 2001 +From: jiangjinjian +Date: Fri, 9 Jun 2023 15:37:45 +0800 +Subject: [PATCH] CVE-2023-31972 + +--- + modules/preprocs/nasm/nasm-pp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c +index 403c065..275f4ab 100644 +--- a/modules/preprocs/nasm/nasm-pp.c ++++ b/modules/preprocs/nasm/nasm-pp.c +@@ -5103,6 +5103,11 @@ pp_getline(void) + * condition, in which case we don't want to meddle with + * anything. + */ ++ ++ if (istk == NULL) { ++ return NULL; ++ } ++ + if (!defining && !(istk->conds && !emitting(istk->conds->state))) + tline = expand_mmac_params(tline); + +-- +2.33.0 + diff --git a/yasm.spec b/yasm.spec index 497268525311984c306dc6775a9f46cde3643e84..a4a86d17477a733e0a45a11e22e02a752c57e4e9 100644 --- a/yasm.spec +++ b/yasm.spec @@ -1,11 +1,13 @@ Name: yasm Version: 1.3.0 -Release: 9 +Release: 10 Summary: NASM assembler License: BSD URL: http://yasm.tortall.net/ Source0: http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz +Patch0: CVE-2023-31972.patch + BuildRequires: gcc bison byacc gettext-devel xmlto Provides: bundled(md5-plumb) @@ -46,5 +48,8 @@ rm -rf %{buildroot} %{_mandir}/* %changelog +* Wed Jul 26 2023 liningjie - 1.3.0-10 +- Fix CVE-2023-31972 + * Mon Jan 6 2020 qinjian - 1.3.0-9 - Package init