summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/yasm
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/yasm')
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm/0001-Do-not-use-AC_HEADER_STDC.patch39
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch38
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch29
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch41
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm_git.bb12
5 files changed, 44 insertions, 115 deletions
diff --git a/meta-oe/recipes-devtools/yasm/yasm/0001-Do-not-use-AC_HEADER_STDC.patch b/meta-oe/recipes-devtools/yasm/yasm/0001-Do-not-use-AC_HEADER_STDC.patch
deleted file mode 100644
index bda90edb20..0000000000
--- a/meta-oe/recipes-devtools/yasm/yasm/0001-Do-not-use-AC_HEADER_STDC.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 6b1cbe8b4dcc45103d69bc7337e5eb33d1fd21f3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 3 Feb 2021 14:22:51 -0800
4Subject: [PATCH] Do not use AC_HEADER_STDC
5
6This macro is removed in autotools 2.70+ and it can be expected that C90
7headers are always available [1]
8
9Upstream-Status: Pending
10
11[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.70/autoconf.html#index-AC_005fHEADER_005fSTDC
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 configure.ac | 6 ------
16 1 file changed, 6 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19index 01b61097..2823ecd7 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -101,14 +101,8 @@ AM_WITH_DMALLOC
23 #
24 # Checks for header files.
25 #
26-AC_HEADER_STDC
27 AC_CHECK_HEADERS([strings.h libgen.h unistd.h direct.h sys/stat.h])
28
29-# REQUIRE standard C headers
30-if test "$ac_cv_header_stdc" != yes; then
31- AC_MSG_ERROR([Standard (ANSI/ISO C89) header files are required.])
32-fi
33-
34 #
35 # Checks for typedefs, structures, and compiler characteristics.
36 #
37--
382.30.0
39
diff --git a/meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch b/meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch
new file mode 100644
index 0000000000..f3f2c431d5
--- /dev/null
+++ b/meta-oe/recipes-devtools/yasm/yasm/0001-bitvect-fix-build-with-gcc-15.patch
@@ -0,0 +1,38 @@
1From 64ef740eb262f329e55eebadf2ce276b146d44e9 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Tue, 22 Apr 2025 19:06:24 +0200
4Subject: [PATCH] bitvect: fix build with gcc-15
5
6* fixes:
7libyasm/bitvect.h:86:32: error: cannot use keyword 'false' as enumeration constant
8 86 | typedef enum boolean { false = FALSE, true = TRUE } boolean;
9 | ^~~~~
10../git/libyasm/bitvect.h:86:32: note: 'false' is a keyword with '-std=c23' onwards
11
12as suggested in:
13https://github.com/yasm/yasm/issues/283#issuecomment-2661108816
14
15Upstream-Status: Submitted [https://github.com/yasm/yasm/pull/287]
16
17Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
18---
19 libyasm/bitvect.h | 6 +++++-
20 1 file changed, 5 insertions(+), 1 deletion(-)
21
22diff --git a/libyasm/bitvect.h b/libyasm/bitvect.h
23index 3aee3a53..a13470ad 100644
24--- a/libyasm/bitvect.h
25+++ b/libyasm/bitvect.h
26@@ -83,7 +83,11 @@ typedef Z_longword *Z_longwordptr;
27 #ifdef MACOS_TRADITIONAL
28 #define boolean Boolean
29 #else
30- typedef enum boolean { false = FALSE, true = TRUE } boolean;
31+ #if __STDC_VERSION__ < 202311L
32+ typedef enum boolean { false = FALSE, true = TRUE } boolean;
33+ #else
34+ typedef bool boolean;
35+ #endif
36 #endif
37 #endif
38
diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch
deleted file mode 100644
index ae10e99c2f..0000000000
--- a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-31975.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From b2cc5a1693b17ac415df76d0795b15994c106441 Mon Sep 17 00:00:00 2001
2From: Katsuhiko Gondow <gondow@cs.titech.ac.jp>
3Date: Tue, 13 Jun 2023 05:00:47 +0900
4Subject: [PATCH] Fix memory leak in bin-objfmt (#231)
5
6Upstream-Status: Backport [https://github.com/yasm/yasm/commit/b2cc5a1693b17ac415df76d0795b15994c106441]
7
8CVE: CVE-2023-31975
9---
10 modules/objfmts/bin/bin-objfmt.c | 4 ++++
11 1 file changed, 4 insertions(+)
12
13diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c
14index 18026750..a38c3422 100644
15--- a/modules/objfmts/bin/bin-objfmt.c
16+++ b/modules/objfmts/bin/bin-objfmt.c
17@@ -1680,6 +1680,10 @@ static void
18 bin_section_data_destroy(void *data)
19 {
20 bin_section_data *bsd = (bin_section_data *)data;
21+ if (bsd->align)
22+ yasm_xfree(bsd->align);
23+ if (bsd->valign)
24+ yasm_xfree(bsd->valign);
25 if (bsd->start)
26 yasm_expr_destroy(bsd->start);
27 if (bsd->vstart)
28--
292.40.0
diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch
deleted file mode 100644
index 1ca33f0a92..0000000000
--- a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 2cd3bb50e256f5ed5f611ac611d25fe673f2cec3 Mon Sep 17 00:00:00 2001
2From: Peter Johnson <johnson.peter@gmail.com>
3Date: Fri, 11 Aug 2023 10:49:51 +0000
4Subject: [PATCH] elf.c: Fix NULL deref on bad xsize expression (#234)
5
6CVE: CVE-2023-37732
7
8Upstream-Status: Backport [https://github.com/yasm/yasm/commit/2cd3bb50e256f5ed5f611ac611d25fe673f2cec3]
9
10Signed-off-by: Soumya <soumya.sambu@windriver.com>
11---
12 modules/objfmts/elf/elf.c | 10 +++++-----
13 1 file changed, 5 insertions(+), 5 deletions(-)
14
15diff --git a/modules/objfmts/elf/elf.c b/modules/objfmts/elf/elf.c
16index 2486bba8..bab4c9ca 100644
17--- a/modules/objfmts/elf/elf.c
18+++ b/modules/objfmts/elf/elf.c
19@@ -482,15 +482,15 @@ elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab,
20
21 /* get size (if specified); expr overrides stored integer */
22 if (entry->xsize) {
23- size_intn = yasm_intnum_copy(
24- yasm_expr_get_intnum(&entry->xsize, 1));
25- if (!size_intn) {
26+ yasm_intnum *intn = yasm_expr_get_intnum(&entry->xsize, 1);
27+ if (!intn) {
28 yasm_error_set(YASM_ERROR_VALUE,
29 N_("size specifier not an integer expression"));
30 yasm_errwarn_propagate(errwarns, entry->xsize->line);
31- }
32+ } else
33+ size_intn = yasm_intnum_copy(intn);
34 }
35- else
36+ if (!size_intn)
37 size_intn = yasm_intnum_create_uint(entry->size);
38
39 /* get EQU value for constants */
40--
412.40.0
diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb
index 216b777667..68895a1697 100644
--- a/meta-oe/recipes-devtools/yasm/yasm_git.bb
+++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb
@@ -8,17 +8,14 @@ DEPENDS += "flex-native bison-native"
8PACKAGECONFIG[docs] = ",,xmlto-native," 8PACKAGECONFIG[docs] = ",,xmlto-native,"
9 9
10PV = "1.3.0+git" 10PV = "1.3.0+git"
11# v1.3.0 11# v1.3.0-87
12SRCREV = "ba463d3c26c0ece2e797b8d6381b161633b5971a" 12SRCREV = "121ab150b3577b666c79a79f4a511798d7ad2432"
13SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \ 13SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \
14 file://0001-Do-not-use-AC_HEADER_STDC.patch \
15 file://CVE-2023-31975.patch \
16 file://CVE-2023-37732.patch \
17 file://0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch \ 14 file://0001-yasm-Set-build-date-to-SOURCE_DATE_EPOCH.patch \
18 file://0002-yasm-Use-BUILD_DATE-for-reproducibility.patch \ 15 file://0002-yasm-Use-BUILD_DATE-for-reproducibility.patch \
16 file://0001-bitvect-fix-build-with-gcc-15.patch \
19" 17"
20 18
21S = "${WORKDIR}/git"
22 19
23inherit autotools gettext python3native 20inherit autotools gettext python3native
24 21
@@ -33,3 +30,6 @@ do_configure:prepend() {
33 sed -i -e "s/^echo \"\/\* generated \$ac_cv_stdint_message \*\/\" >>\$ac_stdint$"// ${S}/m4/ax_create_stdint_h.m4 30 sed -i -e "s/^echo \"\/\* generated \$ac_cv_stdint_message \*\/\" >>\$ac_stdint$"// ${S}/m4/ax_create_stdint_h.m4
34} 31}
35 32
33CVE_STATUS_GROUPS += "CVE_STATUS_HASH_UPDATE"
34CVE_STATUS_HASH_UPDATE = "CVE-2021-33454 CVE-2023-31975 CVE-2023-37732"
35CVE_STATUS_HASH_UPDATE[status] = "fixed-version: patched in current git hash"