https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90924
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING --- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Ren Kimura from comment #3) > Hi. Sorry for late. I've just attached more simple one. > > PoC file for this bug can be created easily, just generating ELF file and > edit e_shstrndx in ELF header file to 0. > > Attached one is built from simple Hello World program. > > #include <stdio.h> > int main() { > printf("Hello World\n"); > }; > > gcc -o memcorrupt_nm-2.30_gcc-9.1.0_gold_simple hello_world.c > > Edit e_shtrndx (offset 0x3E) to 0. What sense does it make to create a valid ELF container and then corrupt it? It's expected that various tools will crash then.