!259 fix CVE-2022-38533
From: @lgylouis Reviewed-by: @eastb233 Signed-off-by: @eastb233
This commit is contained in:
commit
f4624feb64
33
backport-CVE-2022-38533.patch
Normal file
33
backport-CVE-2022-38533.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From ef186fe54aa6d281a3ff8a9528417e5cc614c797 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alan Modra <amodra@gmail.com>
|
||||||
|
Date: Sat, 13 Aug 2022 15:32:47 +0930
|
||||||
|
Subject: [PATCH] PR29482 - strip: heap-buffer-overflow
|
||||||
|
|
||||||
|
PR 29482
|
||||||
|
* coffcode.h (coff_set_section_contents): Sanity check _LIB.
|
||||||
|
---
|
||||||
|
bfd/coffcode.h | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
|
||||||
|
index 67aaf158ca1..52027981c3f 100644
|
||||||
|
--- a/bfd/coffcode.h
|
||||||
|
+++ b/bfd/coffcode.h
|
||||||
|
@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd,
|
||||||
|
|
||||||
|
rec = (bfd_byte *) location;
|
||||||
|
recend = rec + count;
|
||||||
|
- while (rec < recend)
|
||||||
|
+ while (recend - rec >= 4)
|
||||||
|
{
|
||||||
|
+ size_t len = bfd_get_32 (abfd, rec);
|
||||||
|
+ if (len == 0 || len > (size_t) (recend - rec) / 4)
|
||||||
|
+ break;
|
||||||
|
+ rec += len * 4;
|
||||||
|
++section->lma;
|
||||||
|
- rec += bfd_get_32 (abfd, rec) * 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
BFD_ASSERT (rec == recend);
|
||||||
|
--
|
||||||
|
2.39.3
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Summary: Binary utilities
|
Summary: Binary utilities
|
||||||
Name: binutils
|
Name: binutils
|
||||||
Version: 2.37
|
Version: 2.37
|
||||||
Release: 24
|
Release: 25
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://sourceware.org/binutils
|
URL: https://sourceware.org/binutils
|
||||||
|
|
||||||
@ -80,6 +80,7 @@ Patch54: backport-CVE-2021-46174.patch
|
|||||||
Patch55: backport-CVE-2023-1972.patch
|
Patch55: backport-CVE-2023-1972.patch
|
||||||
Patch56: backport-CVE-2022-48064.patch
|
Patch56: backport-CVE-2022-48064.patch
|
||||||
Patch57: backport-CVE-2022-4285.patch
|
Patch57: backport-CVE-2022-4285.patch
|
||||||
|
Patch58: backport-CVE-2022-38533.patch
|
||||||
|
|
||||||
%ifarch loongarch64
|
%ifarch loongarch64
|
||||||
# LoongArch-related patches start with Patch101
|
# LoongArch-related patches start with Patch101
|
||||||
@ -426,6 +427,9 @@ fi
|
|||||||
%{_infodir}/bfd*info*
|
%{_infodir}/bfd*info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 25 2023 luguangyang <luguangyang@xfusion.com> - 2.37-25
|
||||||
|
- fix CVE-2022-38533
|
||||||
|
|
||||||
* Thu Sep 07 2023 yeqinglong <yeqinglong@kylinsec.com.cn> - 2.37-24
|
* Thu Sep 07 2023 yeqinglong <yeqinglong@kylinsec.com.cn> - 2.37-24
|
||||||
- DESC:Add sw_64 support
|
- DESC:Add sw_64 support
|
||||||
- DESC:Add LoongArch support
|
- DESC:Add LoongArch support
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user