mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 05:49:57 +00:00
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 1e2731fce0)
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
committed by
Anuj Mittal
parent
782c49a05a
commit
ed345fca57
@@ -0,0 +1,35 @@
|
||||
From 1126140b8f5ece18c58640725f0e4c08e5ec97b0 Mon Sep 17 00:00:00 2001
|
||||
From: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||
Date: Sat, 15 Nov 2025 13:34:15 +0100
|
||||
Subject: [PATCH] A potential null pointer difference is that the return value
|
||||
of the hash may be null. This fixes CVE-2021-33456.
|
||||
|
||||
From: lixuebing <lixuebing@cqsoftware.com.cn>
|
||||
Date: Mon, 25 Aug 2025 13:51:28 +0800
|
||||
Subject: Fix null-pointer-dereference in hash
|
||||
Bug: https://github.com/yasm/yasm/issues/175
|
||||
Origin: https://github.com/yasm/yasm/pull/290
|
||||
|
||||
CVE: CVE-2021-33456
|
||||
Upstream-Status: Submitted [https://github.com/yasm/yasm/pull/290]
|
||||
|
||||
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||
---
|
||||
modules/preprocs/nasm/nasm-pp.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c
|
||||
index f9f92dd1..473d98c1 100644
|
||||
--- a/modules/preprocs/nasm/nasm-pp.c
|
||||
+++ b/modules/preprocs/nasm/nasm-pp.c
|
||||
@@ -1102,6 +1102,10 @@ hash(char *s)
|
||||
{
|
||||
unsigned int h = 0;
|
||||
unsigned int i = 0;
|
||||
+ /* Check if the input string is NULL to avoid null pointer dereference */
|
||||
+ if (s == NULL) {
|
||||
+ return 0;
|
||||
+ }
|
||||
/*
|
||||
* Powers of three, mod 31.
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \
|
||||
file://CVE-2024-22653.patch \
|
||||
file://CVE-2023-29579.patch \
|
||||
file://CVE-2021-33464.patch \
|
||||
file://CVE-2021-33456.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Reference in New Issue
Block a user