This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 2/6] PR binutils/22875: FRV/ELF: Prevent an out-of-bounds howto table access
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Alan Modra <amodra at gmail dot com>, Dave Brolley <brolley at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, <binutils at sourceware dot org>
- Date: Thu, 29 Mar 2018 18:32:29 +0100
- Subject: [PATCH 2/6] PR binutils/22875: FRV/ELF: Prevent an out-of-bounds howto table access
- References: <alpine.DEB.2.00.1803282251560.2163@tp.orcam.me.uk>
Prevent an out-of-bounds `elf32_frv_howto_table' table access in
`frv_info_to_howto_rela' and redefine R_FRV_max to hold the number of
entries in the contiguous regular FRV relocation range defined and
described in the table, keeping the definitions of R_FRV_GNU_VTINHERIT
and R_FRV_GNU_VTENTRY as outliers.
include/
* elf/frv.h (R_FRV_max): Redefine as `R_FRV_TLSMOFF + 1'.
---
Hi,
Regression-tested successfully. OK to apply?
Maciej
---
include/elf/frv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
binutils-frv-bfd-unsupp-reloc.diff
Index: binutils/include/elf/frv.h
===================================================================
--- binutils.orig/include/elf/frv.h 2018-02-23 14:15:46.000000000 +0000
+++ binutils/include/elf/frv.h 2018-03-28 17:16:12.393679065 +0100
@@ -67,7 +67,7 @@ START_RELOC_NUMBERS (elf_frv_reloc_type)
RELOC_NUMBER (R_FRV_TLSMOFF, 40)
RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200)
RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_FRV_max)
+END_RELOC_NUMBERS(R_FRV_max = R_FRV_TLSMOFF + 1)
/* Processor specific flags for the ELF header e_flags field. */
/* gpr support */