binutils/binutils-CVE-2018-7643.patch
Nick Clifton bb781d5f31 Fix for PR 22887 - crashing objdump by passing it a corrupt AOUT binary. (#1553115)
Fix for PR 22905 - crashing objdump by passing it a corrupt DWARF file.  (#1553122)
Fix for PR 22741 - crashing objdump by passing it a corrupt COFF file.  (#1571918)
2018-04-27 10:05:56 +01:00

17 lines
457 B
Diff

--- binutils.orig/binutils/dwarf.c 2018-04-27 09:22:07.402864408 +0100
+++ binutils-2.30/binutils/dwarf.c 2018-04-27 09:24:26.794235786 +0100
@@ -6810,6 +6810,13 @@ display_debug_ranges (struct dwarf_secti
continue;
}
+ if (next < section_begin || next >= finish)
+ {
+ warn (_("Corrupt offset (%#8.8lx) in range entry %u\n"),
+ (unsigned long) offset, i);
+ continue;
+ }
+
if (dwarf_check != 0 && i > 0)
{
if (start < next)