On Wed, Feb 05, 2020 at 02:39:40PM -0800, Kristen Carlson Accardi wrote: > According to the ELF specification, if the value of st_shndx > contains SH_XINDEX, the actual section header index is too > large to fit in the st_shndx field and you should use the > value out of the SHT_SYMTAB_SHNDX section instead. This table > was already being parsed and saved into symtab_shndx_start, however > it was not being used, causing segfaults when the number of > sections is greater than 64K. Check the st_shndx field for > SHN_XINDEX prior to using. > > Signed-off-by: Kristen Carlson Accardi <kristen@xxxxxxxxxxxxxxx> Looking at "readelf" output continues to make me laugh. :) Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx> -Kees -- Kees Cook