[PATCH 2/2] elf: Detect PT_LOAD segments that extend beyond EOF and refuse loading

Florian Weimer fweimer@redhat.com
Fri Nov 5 14:41:32 GMT 2021


* H. J. Lu:

> So dlopen should reject it.   Can you identify the broken tools which
> generate such input files and black list them for this test?

It's objcopy --only-keep-debug, and it behaves as expted Separated
debuginfo is broken by design.  The program headers do not correspond to
the file contents, but match the original ELF file.

> Of course, ld.so can improve sanity checks.  But we need really broken
> inputs for such checks.

elf/tst-debug1 deliberately uses a broken input file.

Thanks,
Florian



More information about the Libc-alpha mailing list