diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-11-30 21:35:06 +0100 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@oss.qualcomm.com> | 2025-12-03 10:31:32 +0530 |
| commit | 782c49a05abddcc6d2ce2e9ce88ec68e91a2e05c (patch) | |
| tree | 389ac2c1f106342c032bd9ff3b245f13a25ddf5e | |
| parent | 138ac945d9bec1b2f375f8c19eb91205c7d8bc7e (diff) | |
| download | meta-openembedded-782c49a05abddcc6d2ce2e9ce88ec68e91a2e05c.tar.gz | |
yasm: patch CVE-2021-33464
Details: https://nvd.nist.gov/vuln/detail/CVE-2021-33464
The patch was taken from Debian:
https://sources.debian.org/patches/yasm/1.3.0-8/1010-nasm-pp-no-env-CVE-2021-33464.patch/
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 66a0b01b52e5d1cd2af4c41ae0b67541464874e6)
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
| -rw-r--r-- | meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33464.patch | 34 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/yasm/yasm_git.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33464.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33464.patch new file mode 100644 index 0000000000..ebae250ff9 --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/CVE-2021-33464.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From 3c3f968d48d768c1e355199d4067d99cb72abc26 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 3 | Date: Sat, 15 Nov 2025 13:30:12 +0100 | ||
| 4 | Subject: [PATCH] Handle file descriptors with nonexisting env names better. | ||
| 5 | Avoid writing past allocated memory. | ||
| 6 | |||
| 7 | This fixes CVE-2021-33464. | ||
| 8 | Author: Petter Reinholdtsen <pere@debian.org> | ||
| 9 | Bug: https://github.com/yasm/yasm/issues/164 | ||
| 10 | Bug-Debian: https://bugs.debian.org/1016353 | ||
| 11 | Forwarded: https://github.com/yasm/yasm/issues/164 | ||
| 12 | Last-Update: 2025-04-30 | ||
| 13 | |||
| 14 | CVE: CVE-2021-33464 | ||
| 15 | Upstream-Status: Submitted [https://github.com/yasm/yasm/issues/164] | ||
| 16 | |||
| 17 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 18 | --- | ||
| 19 | modules/preprocs/nasm/nasm-pp.c | 2 +- | ||
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c | ||
| 23 | index 512f02c3..f9f92dd1 100644 | ||
| 24 | --- a/modules/preprocs/nasm/nasm-pp.c | ||
| 25 | +++ b/modules/preprocs/nasm/nasm-pp.c | ||
| 26 | @@ -1815,7 +1815,7 @@ inc_fopen(char *file, char **newname) | ||
| 27 | error(ERR_WARNING, "environment variable `%s' does not exist", | ||
| 28 | p1+1); | ||
| 29 | *p2 = '%'; | ||
| 30 | - p1 = p2+1; | ||
| 31 | + pb = p1 = p2+1; | ||
| 32 | continue; | ||
| 33 | } | ||
| 34 | /* need to expand */ | ||
diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb index bce62caadd..304fa0b34a 100644 --- a/meta-oe/recipes-devtools/yasm/yasm_git.bb +++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb | |||
| @@ -18,6 +18,7 @@ SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \ | |||
| 18 | file://0002-yasm-Use-BUILD_DATE-for-reproducibility.patch \ | 18 | file://0002-yasm-Use-BUILD_DATE-for-reproducibility.patch \ |
| 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 | " | 22 | " |
| 22 | 23 | ||
| 23 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
