summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33456.patch35
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm_git.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33456.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33456.patch
new file mode 100644
index 0000000000..2340d8ed75
--- /dev/null
+++ b/meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33456.patch
@@ -0,0 +1,35 @@
1From 1126140b8f5ece18c58640725f0e4c08e5ec97b0 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Sat, 15 Nov 2025 13:34:15 +0100
4Subject: [PATCH] A potential null pointer difference is that the return value
5 of the hash may be null. This fixes CVE-2021-33456.
6
7From: lixuebing <lixuebing@cqsoftware.com.cn>
8Date: Mon, 25 Aug 2025 13:51:28 +0800
9Subject: Fix null-pointer-dereference in hash
10Bug: https://github.com/yasm/yasm/issues/175
11Origin: https://github.com/yasm/yasm/pull/290
12
13CVE: CVE-2021-33456
14Upstream-Status: Submitted [https://github.com/yasm/yasm/pull/290]
15
16Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
17---
18 modules/preprocs/nasm/nasm-pp.c | 4 ++++
19 1 file changed, 4 insertions(+)
20
21diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c
22index f9f92dd1..473d98c1 100644
23--- a/modules/preprocs/nasm/nasm-pp.c
24+++ b/modules/preprocs/nasm/nasm-pp.c
25@@ -1102,6 +1102,10 @@ hash(char *s)
26 {
27 unsigned int h = 0;
28 unsigned int i = 0;
29+ /* Check if the input string is NULL to avoid null pointer dereference */
30+ if (s == NULL) {
31+ return 0;
32+ }
33 /*
34 * Powers of three, mod 31.
35 */
diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb
index 9bd81c1dfd..6ddd94621a 100644
--- a/meta-oe/recipes-devtools/yasm/yasm_git.bb
+++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \
16 file://0001-bitvect-fix-build-with-gcc-15.patch \ 16 file://0001-bitvect-fix-build-with-gcc-15.patch \
17 file://CVE-2023-29579.patch \ 17 file://CVE-2023-29579.patch \
18 file://CVE-2021-33464.patch \ 18 file://CVE-2021-33464.patch \
19 file://CVE-2021-33456.patch \
19 " 20 "
20 21
21 22