Skip to content

Commit c627b4b

Browse files
authored
[MEDIUM] Patch yasm for CVE-2024-22653 (microsoft#14072)
1 parent 9fcbb5b commit c627b4b

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

SPECS/yasm/CVE-2024-22653.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 9aee6978378817664714350b597073efabfdef12 Mon Sep 17 00:00:00 2001
2+
From: archana25-ms <[email protected]>
3+
Date: Mon, 23 Jun 2025 08:51:40 +0000
4+
Subject: [PATCH] Address CVE-2024-22653
5+
Upstream Patch Reference: https://patch-diff.githubusercontent.com/raw/yasm/yasm/pull/263.diff
6+
7+
---
8+
libyasm/section.c | 4 ++++
9+
1 file changed, 4 insertions(+)
10+
11+
diff --git a/libyasm/section.c b/libyasm/section.c
12+
index ba582bf..1c1ba71 100644
13+
--- a/libyasm/section.c
14+
+++ b/libyasm/section.c
15+
@@ -611,6 +611,10 @@ yasm_bytecode *
16+
yasm_section_bcs_append(yasm_section *sect, yasm_bytecode *bc)
17+
{
18+
if (bc) {
19+
+ if (!sect) {
20+
+ yasm_error_set(YASM_ERROR_VALUE, "Attempt to append bytecode to a NULL section or with a NULL bytecode");
21+
+ return NULL;
22+
+ }
23+
if (bc->callback) {
24+
bc->section = sect; /* record parent section */
25+
STAILQ_INSERT_TAIL(&sect->bcs, bc, link);
26+
--
27+
2.45.3
28+

SPECS/yasm/yasm.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Modular Assembler
22
Name: yasm
33
Version: 1.3.0
4-
Release: 16%{?dist}
4+
Release: 17%{?dist}
55
License: BSD and (GPLv2+ or Artistic or LGPLv2+) and LGPLv2
66
URL: https://yasm.tortall.net/
77
Vendor: Microsoft Corporation
@@ -12,6 +12,7 @@ Patch2: CVE-2023-31975.patch
1212
Patch3: CVE-2021-33454.patch
1313
Patch4: CVE-2023-51258.patch
1414
Patch5: CVE-2023-37732.patch
15+
Patch6: CVE-2024-22653.patch
1516

1617
BuildRequires: gcc
1718
BuildRequires: bison
@@ -76,6 +77,9 @@ make install DESTDIR=%{buildroot}
7677

7778

7879
%changelog
80+
* Mon Jun 23 2025 Archana Shettigar <[email protected]> - 1.3.0-17
81+
- Patch CVE-2024-22653
82+
7983
* Wed May 14 2025 Akhila Guruju <[email protected]> - 1.3.0-16
8084
- Patch CVE-2023-51258 and CVE-2023-37732
8185

0 commit comments

Comments
 (0)