diff options
| author | Praveen Kumar <praveen.kumar@windriver.com> | 2025-10-15 17:28:45 +0530 |
|---|---|---|
| committer | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-10-17 10:51:27 +0200 |
| commit | 9146afcebbc01d6e0598d3ca92701825b9163b6c (patch) | |
| tree | a41c3cfee5c2098fc0fa86dbdca8c3c8df746cda /meta-oe/recipes-devtools | |
| parent | bfc756c1e6e7051579f764acded0ea1396db5518 (diff) | |
| download | meta-openembedded-9146afcebbc01d6e0598d3ca92701825b9163b6c.tar.gz | |
yasm: fix CVE-2024-22653
yasm commit 9defefae was discovered to contain a NULL pointer
dereference via the yasm_section_bcs_append function at section.c.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-22653
Upstream-patch:
https://github.com/yasm/yasm/commit/121ab150b3577b666c79a79f4a511798d7ad2432
Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
| -rw-r--r-- | meta-oe/recipes-devtools/yasm/yasm/CVE-2024-22653.patch | 32 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/yasm/yasm_git.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/yasm/yasm/CVE-2024-22653.patch b/meta-oe/recipes-devtools/yasm/yasm/CVE-2024-22653.patch new file mode 100644 index 0000000000..dbbd4b94ef --- /dev/null +++ b/meta-oe/recipes-devtools/yasm/yasm/CVE-2024-22653.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 121ab150b3577b666c79a79f4a511798d7ad2432 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: haruki3hhh <135201297+haruki3hhh@users.noreply.github.com> | ||
| 3 | Date: Mon, 24 Jun 2024 18:08:27 -0500 | ||
| 4 | Subject: [PATCH] Fix null pointer dereference in yasm_section_bcs_append | ||
| 5 | (#263) | ||
| 6 | |||
| 7 | CVE: CVE-2024-22653 | ||
| 8 | |||
| 9 | Upstream-Status: Backport [https://github.com/yasm/yasm/commit/121ab150b3577b666c79a79f4a511798d7ad2432] | ||
| 10 | |||
| 11 | Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> | ||
| 12 | --- | ||
| 13 | libyasm/section.c | 4 ++++ | ||
| 14 | 1 file changed, 4 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/libyasm/section.c b/libyasm/section.c | ||
| 17 | index ba582bfa..1c1ba710 100644 | ||
| 18 | --- a/libyasm/section.c | ||
| 19 | +++ b/libyasm/section.c | ||
| 20 | @@ -611,6 +611,10 @@ yasm_bytecode * | ||
| 21 | yasm_section_bcs_append(yasm_section *sect, yasm_bytecode *bc) | ||
| 22 | { | ||
| 23 | if (bc) { | ||
| 24 | + if (!sect) { | ||
| 25 | + yasm_error_set(YASM_ERROR_VALUE, "Attempt to append bytecode to a NULL section or with a NULL bytecode"); | ||
| 26 | + return NULL; | ||
| 27 | + } | ||
| 28 | if (bc->callback) { | ||
| 29 | bc->section = sect; /* record parent section */ | ||
| 30 | STAILQ_INSERT_TAIL(§->bcs, bc, link); | ||
| 31 | -- | ||
| 32 | 2.40.0 | ||
diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb index 60b00f7ff4..e6e4faa8a9 100644 --- a/meta-oe/recipes-devtools/yasm/yasm_git.bb +++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb | |||
| @@ -13,6 +13,7 @@ SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \ | |||
| 13 | file://0001-Do-not-use-AC_HEADER_STDC.patch \ | 13 | file://0001-Do-not-use-AC_HEADER_STDC.patch \ |
| 14 | file://CVE-2023-31975.patch \ | 14 | file://CVE-2023-31975.patch \ |
| 15 | file://CVE-2023-37732.patch \ | 15 | file://CVE-2023-37732.patch \ |
| 16 | file://CVE-2024-22653.patch \ | ||
| 16 | " | 17 | " |
| 17 | 18 | ||
| 18 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
