Skip to content

Commit 654e5b3

Browse files
authored
yasm: patch CVE-2021-33454 (#9433)
1 parent e3c025c commit 654e5b3

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

SPECS/yasm/CVE-2021-33454.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From 9defefae9fbcb6958cddbfa778c1ea8605da8b8b Mon Sep 17 00:00:00 2001
2+
From: dataisland <dataisland@outlook.com>
3+
Date: Fri, 22 Sep 2023 00:21:20 -0500
4+
Subject: [PATCH] Fix null-pointer-dereference in yasm_expr_get_intnum (#244)
5+
6+
---
7+
libyasm/expr.c | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/libyasm/expr.c b/libyasm/expr.c
11+
index 5b0c418b..09ae1121 100644
12+
--- a/libyasm/expr.c
13+
+++ b/libyasm/expr.c
14+
@@ -1264,7 +1264,7 @@ yasm_expr_get_intnum(yasm_expr **ep, int calc_bc_dist)
15+
{
16+
*ep = yasm_expr_simplify(*ep, calc_bc_dist);
17+
18+
- if ((*ep)->op == YASM_EXPR_IDENT && (*ep)->terms[0].type == YASM_EXPR_INT)
19+
+ if (*ep && (*ep)->op == YASM_EXPR_IDENT && (*ep)->terms[0].type == YASM_EXPR_INT)
20+
return (*ep)->terms[0].data.intn;
21+
else
22+
return (yasm_intnum *)NULL;

SPECS/yasm/yasm.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
Summary: Modular Assembler
22
Name: yasm
33
Version: 1.3.0
4-
Release: 14%{?dist}
4+
Release: 15%{?dist}
55
License: BSD and (GPLv2+ or Artistic or LGPLv2+) and LGPLv2
66
URL: https://yasm.tortall.net/
77
Vendor: Microsoft Corporation
88
Distribution: Mariner
99
Source0: https://www.tortall.net/projects/%{name}/releases/%{name}-%{version}.tar.gz
1010
Patch1: 0001-Update-elf-objfmt.c.patch
1111
Patch2: CVE-2023-31975.patch
12+
Patch3: CVE-2021-33454.patch
1213

1314
BuildRequires: gcc
1415
BuildRequires: bison
@@ -73,6 +74,9 @@ make install DESTDIR=%{buildroot}
7374

7475

7576
%changelog
77+
* Tue Jun 18 2024 Saul Paredes <saulparedes@microsoft.com> - 1.3.0-15
78+
- Apply upstream patch for CVE-2021-33454
79+
7680
* Tue Jun 13 2023 Henry Beberman <henry.beberman@microsoft.com> - 1.3.0-14
7781
- Apply upstream patch for CVE-2023-31975
7882

0 commit comments

Comments
 (0)