This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/6] PR binutils/22875: FRV/ELF: Prevent an out-of-bounds howto table access


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 */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]