diff options
4 files changed, 5 insertions, 114 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 @@ | |||
| 1 | From 6b1cbe8b4dcc45103d69bc7337e5eb33d1fd21f3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 3 Feb 2021 14:22:51 -0800 | ||
| 4 | Subject: [PATCH] Do not use AC_HEADER_STDC | ||
| 5 | |||
| 6 | This macro is removed in autotools 2.70+ and it can be expected that C90 | ||
| 7 | headers are always available [1] | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.70/autoconf.html#index-AC_005fHEADER_005fSTDC | ||
| 12 | |||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | configure.ac | 6 ------ | ||
| 16 | 1 file changed, 6 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/configure.ac b/configure.ac | ||
| 19 | index 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 | -- | ||
| 38 | 2.30.0 | ||
| 39 | |||
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 @@ | |||
| 1 | From b2cc5a1693b17ac415df76d0795b15994c106441 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Katsuhiko Gondow <gondow@cs.titech.ac.jp> | ||
| 3 | Date: Tue, 13 Jun 2023 05:00:47 +0900 | ||
| 4 | Subject: [PATCH] Fix memory leak in bin-objfmt (#231) | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/yasm/yasm/commit/b2cc5a1693b17ac415df76d0795b15994c106441] | ||
| 7 | |||
| 8 | CVE: CVE-2023-31975 | ||
| 9 | --- | ||
| 10 | modules/objfmts/bin/bin-objfmt.c | 4 ++++ | ||
| 11 | 1 file changed, 4 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c | ||
| 14 | index 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 | -- | ||
| 29 | 2.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 @@ | |||
| 1 | From 2cd3bb50e256f5ed5f611ac611d25fe673f2cec3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Johnson <johnson.peter@gmail.com> | ||
| 3 | Date: Fri, 11 Aug 2023 10:49:51 +0000 | ||
| 4 | Subject: [PATCH] elf.c: Fix NULL deref on bad xsize expression (#234) | ||
| 5 | |||
| 6 | CVE: CVE-2023-37732 | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/yasm/yasm/commit/2cd3bb50e256f5ed5f611ac611d25fe673f2cec3] | ||
| 9 | |||
| 10 | Signed-off-by: Soumya <soumya.sambu@windriver.com> | ||
| 11 | --- | ||
| 12 | modules/objfmts/elf/elf.c | 10 +++++----- | ||
| 13 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/modules/objfmts/elf/elf.c b/modules/objfmts/elf/elf.c | ||
| 16 | index 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 | -- | ||
| 41 | 2.40.0 | ||
diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb index 216b777667..e2c1a3c02b 100644 --- a/meta-oe/recipes-devtools/yasm/yasm_git.bb +++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb | |||
| @@ -8,12 +8,9 @@ DEPENDS += "flex-native bison-native" | |||
| 8 | PACKAGECONFIG[docs] = ",,xmlto-native," | 8 | PACKAGECONFIG[docs] = ",,xmlto-native," |
| 9 | 9 | ||
| 10 | PV = "1.3.0+git" | 10 | PV = "1.3.0+git" |
| 11 | # v1.3.0 | 11 | # v1.3.0-87 |
| 12 | SRCREV = "ba463d3c26c0ece2e797b8d6381b161633b5971a" | 12 | SRCREV = "121ab150b3577b666c79a79f4a511798d7ad2432" |
| 13 | SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \ | 13 | SRC_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 \ |
| 19 | " | 16 | " |
| @@ -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 | ||
| 33 | CVE_STATUS_GROUPS += "CVE_STATUS_HASH_UPDATE" | ||
| 34 | CVE_STATUS_HASH_UPDATE = "CVE-2021-33454 CVE-2023-31975 CVE-2023-37732" | ||
| 35 | CVE_STATUS_HASH_UPDATE[status] = "fixed-version: patched in current git hash" | ||
