fix CVE-2022-47011
(cherry picked from commit 5a23147edff474520d170f8b1f899e34080834f5)
This commit is contained in:
parent
445d933a89
commit
915b2143c3
30
backport-CVE-2022-47011.patch
Normal file
30
backport-CVE-2022-47011.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From d88510a426e0c310ecfe9955837fdbc9fdc6aa51 Mon Sep 17 00:00:00 2001
|
||||
From: liningjie <liningjie@xfusion.com>
|
||||
Date: Tue, 15 Aug 2023 02:56:30 +0800
|
||||
Subject: [PATCH] PR29261, memory leak in parse_stab_struct_fields
|
||||
|
||||
PR 29261
|
||||
* stabs.c (parse_stab_struct_fields): Free "fields" on failure path.
|
||||
---
|
||||
binutils/stabs.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/binutils/stabs.c b/binutils/stabs.c
|
||||
index 395ed52d..207dc52f 100644
|
||||
--- a/binutils/stabs.c
|
||||
+++ b/binutils/stabs.c
|
||||
@@ -2368,7 +2368,10 @@ parse_stab_struct_fields (void * dhandle,
|
||||
|
||||
if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c,
|
||||
staticsp, p_end))
|
||||
- return FALSE;
|
||||
+ {
|
||||
+ free (fields);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
++c;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: Binary utilities
|
||||
Name: binutils
|
||||
Version: 2.34
|
||||
Release: 23
|
||||
Release: 24
|
||||
License: GPLv3+
|
||||
URL: https://sourceware.org/binutils
|
||||
|
||||
@ -60,6 +60,7 @@ Patch43: backport-0002-CVE-2021-42574.patch
|
||||
Patch44: Fix-gold-relocation-offset.patch
|
||||
Patch45: Fix-gold-adrp-signed-shift.patch
|
||||
Patch46: CVE-2022-47008.patch
|
||||
Patch47: backport-CVE-2022-47011.patch
|
||||
|
||||
Provides: bundled(libiberty)
|
||||
|
||||
@ -338,6 +339,9 @@ fi
|
||||
%{_infodir}/bfd*info*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 24 2023 liningjie <liningjie@xfusion.com> - 2.34-24
|
||||
- fix CVE-2022-47011
|
||||
|
||||
* Wed Aug 23 2023 liningjie <liningjie@xfusion.com> - 2.34-23
|
||||
- fix CVE-2022-47008
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user