diff options
| -rw-r--r-- | meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33456.patch | 35 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/yasm/yasm_git.bb | 1 |
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 @@ | |||
| 1 | From 1126140b8f5ece18c58640725f0e4c08e5ec97b0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 3 | Date: Sat, 15 Nov 2025 13:34:15 +0100 | ||
| 4 | Subject: [PATCH] A potential null pointer difference is that the return value | ||
| 5 | of the hash may be null. This fixes CVE-2021-33456. | ||
| 6 | |||
| 7 | From: lixuebing <lixuebing@cqsoftware.com.cn> | ||
| 8 | Date: Mon, 25 Aug 2025 13:51:28 +0800 | ||
| 9 | Subject: Fix null-pointer-dereference in hash | ||
| 10 | Bug: https://github.com/yasm/yasm/issues/175 | ||
| 11 | Origin: https://github.com/yasm/yasm/pull/290 | ||
| 12 | |||
| 13 | CVE: CVE-2021-33456 | ||
| 14 | Upstream-Status: Submitted [https://github.com/yasm/yasm/pull/290] | ||
| 15 | |||
| 16 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 17 | --- | ||
| 18 | modules/preprocs/nasm/nasm-pp.c | 4 ++++ | ||
| 19 | 1 file changed, 4 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c | ||
| 22 | index 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 | ||
