Stop potential illegal memory access when disassembling an EFI binary.
Resolves: #1685727
This commit is contained in:
parent
f8df98934c
commit
60c80a1491
|
@ -0,0 +1,39 @@
|
|||
diff -rup binutils.orig/bfd/coffgen.c binutils-2.31.1/bfd/coffgen.c
|
||||
--- binutils.orig/bfd/coffgen.c 2019-03-06 08:49:19.500586870 +0000
|
||||
+++ binutils-2.31.1/bfd/coffgen.c 2019-03-06 08:49:45.798394582 +0000
|
||||
@@ -2289,7 +2289,7 @@ coff_find_nearest_line_with_names (bfd *
|
||||
information. So try again, using a bias against the address sought. */
|
||||
if (coff_data (abfd)->dwarf2_find_line_info != NULL)
|
||||
{
|
||||
- bfd_signed_vma bias;
|
||||
+ bfd_signed_vma bias = 0;
|
||||
|
||||
/* Create a cache of the result for the next call. */
|
||||
if (sec_data == NULL && section->owner == abfd)
|
||||
@@ -2301,10 +2301,11 @@ coff_find_nearest_line_with_names (bfd *
|
||||
|
||||
if (sec_data != NULL && sec_data->saved_bias)
|
||||
bias = sec_data->saved_bias;
|
||||
- else
|
||||
+ else if (symbols)
|
||||
{
|
||||
bias = _bfd_dwarf2_find_symbol_bias (symbols,
|
||||
& coff_data (abfd)->dwarf2_find_line_info);
|
||||
+
|
||||
if (sec_data)
|
||||
{
|
||||
sec_data->saved_bias = TRUE;
|
||||
Only in binutils-2.31.1/bfd: coffgen.c.orig
|
||||
diff -rup binutils.orig/bfd/dwarf2.c binutils-2.31.1/bfd/dwarf2.c
|
||||
--- binutils.orig/bfd/dwarf2.c 2019-03-06 08:49:19.498586884 +0000
|
||||
+++ binutils-2.31.1/bfd/dwarf2.c 2019-03-06 08:49:45.799394575 +0000
|
||||
@@ -4463,7 +4463,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol **
|
||||
|
||||
stash = (struct dwarf2_debug *) *pinfo;
|
||||
|
||||
- if (stash == NULL)
|
||||
+ if (stash == NULL || symbols == NULL)
|
||||
return 0;
|
||||
|
||||
for (unit = stash->all_comp_units; unit; unit = unit->next_unit)
|
||||
Only in binutils-2.31.1/bfd: dwarf2.c.orig
|
|
@ -69,7 +69,7 @@
|
|||
Summary: A GNU collection of binary utilities
|
||||
Name: %{?cross}binutils%{?_with_debug:-debug}
|
||||
Version: 2.31.1
|
||||
Release: 23%{?dist}
|
||||
Release: 24%{?dist}
|
||||
License: GPLv3+
|
||||
URL: https://sourceware.org/binutils
|
||||
|
||||
|
@ -223,6 +223,10 @@ Patch25: binutils-CVE-2019-9075.patch
|
|||
# Lifetime: Fixed in 2.33
|
||||
Patch26: binutils-CVE-2019-9077.patch
|
||||
|
||||
# Purpose: Stop a seg-fault when disassembling an EFI binary.
|
||||
# Lifetime: Fixed in 2.33
|
||||
Patch27: binutils-disassembling-efi-files.patch
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
Provides: bundled(libiberty)
|
||||
|
@ -372,6 +376,7 @@ using libelf instead of BFD.
|
|||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
|
||||
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
||||
|
||||
|
@ -779,6 +784,9 @@ exit 0
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Wed Mar 06 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-24
|
||||
- Stop potential illegal memory access when disassembling an EFI binary. (#1685727)
|
||||
|
||||
* Tue Feb 26 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-23
|
||||
- Stop potential illegal memory access when parsing a corrupt MIPS binary. (#1680676)
|
||||
|
||||
|
|
Loading…
Reference in New Issue