summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorSoumya <soumya.sambu@windriver.com>2023-08-18 14:38:04 +0000
committerKhem Raj <raj.khem@gmail.com>2023-08-19 10:46:14 -0700
commit76912f22d8c30ddfbbeb4575eb9ae8cb3d94a20a (patch)
tree7bc8eea3df205c0b66fb41449c9fcc419088a2f4 /meta-oe/recipes-devtools
parent3f9e63e4dd7c6385c1d64eaf1f58c9cb60e313e2 (diff)
downloadmeta-openembedded-76912f22d8c30ddfbbeb4575eb9ae8cb3d94a20a.tar.gz
yasm: fix CVE-2023-37732
Yasm v1.3.0.78 was found prone to NULL Pointer Dereference in /libyasm/intnum.c and /elf/elf.c, which allows the attacker to cause a denial of service via a crafted file. References: https://github.com/yasm/yasm/issues/233 https://nvd.nist.gov/vuln/detail/CVE-2023-37732 Signed-off-by: Soumya <soumya.sambu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch41
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm_git.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch
new file mode 100644
index 0000000000..1ca33f0a92
--- /dev/null
+++ b/meta-oe/recipes-devtools/yasm/yasm/CVE-2023-37732.patch
@@ -0,0 +1,41 @@
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 19686ff275..26540b4295 100644
--- a/meta-oe/recipes-devtools/yasm/yasm_git.bb
+++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb
@@ -13,6 +13,7 @@ SRCREV = "ba463d3c26c0ece2e797b8d6381b161633b5971a"
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 \ 14 file://0001-Do-not-use-AC_HEADER_STDC.patch \
15 file://CVE-2023-31975.patch \ 15 file://CVE-2023-31975.patch \
16 file://CVE-2023-37732.patch \
16" 17"
17 18
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"