This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 4/6] PR binutils/22875: Visium/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>, Eric Botcazou <ebotcazou at libertysurf dot fr>, <binutils at sourceware dot org>
- Date: Thu, 29 Mar 2018 18:33:51 +0100
- Subject: [PATCH 4/6] PR binutils/22875: Visium/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 `visium_elf_howto_table' table access in
`visium_info_to_howto_rela' and redefine R_VISIUM_max to hold the number
of entries in the contiguous regular Visium relocation range defined and
described in the table, keeping the definitions of
R_VISIUM_GNU_VTINHERIT and R_VISIUM_GNU_VTENTRY as outliers.
include/
* elf/visium.h (R_VISIUM_max): Redefine as `R_VISIUM_IM16_PCREL
+ 1'.
---
Hi,
Regression-tested successfully. OK to apply?
Maciej
---
include/elf/iq2000.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
binutils-iq2000-bfd-unsupp-reloc.diff
Index: binutils/include/elf/iq2000.h
===================================================================
--- binutils.orig/include/elf/iq2000.h 2018-02-23 14:15:47.000000000 +0000
+++ binutils/include/elf/iq2000.h 2018-03-28 17:19:48.267004721 +0100
@@ -37,7 +37,7 @@ START_RELOC_NUMBERS (elf_iq2000_reloc_ty
RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_IQ2000_max)
+END_RELOC_NUMBERS(R_IQ2000_max = R_IQ2000_32_DEBUG + 1)
#define EF_IQ2000_CPU_IQ2000 0x00000001 /* default */
#define EF_IQ2000_CPU_IQ10 0x00000002 /* IQ10 */