This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH v2 4/6] PR binutils/22875: Visium/ELF: Prevent an out-of-bounds howto table access
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,
Oops, wrong patch originally included, here's correct v2.
Regression-tested successfully. OK to apply?
Maciej
---
include/elf/visium.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
binutils-visium-bfd-unsupp-reloc.diff
Index: binutils/include/elf/visium.h
===================================================================
--- binutils.orig/include/elf/visium.h 2018-02-23 14:15:47.000000000 +0000
+++ binutils/include/elf/visium.h 2018-03-28 17:20:53.143480975 +0100
@@ -46,6 +46,6 @@ START_RELOC_NUMBERS (elf_visium_reloc_ty
RELOC_NUMBER (R_VISIUM_IM16_PCREL, 13)
RELOC_NUMBER (R_VISIUM_GNU_VTINHERIT, 200)
RELOC_NUMBER (R_VISIUM_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_VISIUM_max)
+END_RELOC_NUMBERS(R_VISIUM_max = R_VISIUM_IM16_PCREL + 1)
#endif /* _ELF_VISIUM_H */