summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-11-30 21:35:07 +0100
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2025-12-03 10:31:32 +0530
commited345fca57608471917fa94322e6db978a753738 (patch)
tree34c739e1fc8e839c48ceed1ee105b7d2cdd40ebf /meta-oe/recipes-devtools
parent782c49a05abddcc6d2ce2e9ce88ec68e91a2e05c (diff)
downloadmeta-openembedded-ed345fca57608471917fa94322e6db978a753738.tar.gz
yasm: patch CVE-2021-33456
Details: https://nvd.nist.gov/vuln/detail/CVE-2021-33465 The patch was taken from Debian: https://sources.debian.org/patches/yasm/1.3.0-8/1020-hash-null-CVE-2021-33456.patch/ Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 1e2731fce05d15020fddf3dca5d8ee42ec3c04e1) Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-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 304fa0b34a..5d1739ebf3 100644
--- a/meta-oe/recipes-devtools/yasm/yasm_git.bb
+++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \
19 file://CVE-2024-22653.patch \ 19 file://CVE-2024-22653.patch \
20 file://CVE-2023-29579.patch \ 20 file://CVE-2023-29579.patch \
21 file://CVE-2021-33464.patch \ 21 file://CVE-2021-33464.patch \
22 file://CVE-2021-33456.patch \
22 " 23 "
23 24
24S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"