paxctl can't recognize elf structure in valid elf file: paxctl -v dream: dream is not valid ELF executable file paxctl -C dream: dream is not valid ELF executable file but chpax -v dream works ok! file "dream" attached or can be downloaded from http://www.stripedgazelle.org/cgi-bin/wiki_joey/dream20101104.tar.gz (latest dev-lisp/dream in gentoo-lisp)
Created attachment 261555 [details] elf executable
Just a few insights gdb nor ldd will open it os i think the problem is either in the file itself or the elf handling libraries.
scanelf output: TYPE PAX PERM ENDIAN STK/REL/PTL TEXTREL RPATH BIND FILE ET_EXEC PeMRxS 0755 LE --- --- RWX - - LAZY dream chpax -v dream output: ----[ chpax 0.7 : Current flags for dream (PeMRxS) ]---- * Paging based PAGE_EXEC : enabled (overridden) * Trampolines : not emulated * mprotect() : restricted * mmap() base : randomized * ET_EXEC base : not randomized * Segmentation based PAGE_EXEC : enabled
(In reply to comment #3) > scanelf output: > > TYPE PAX PERM ENDIAN STK/REL/PTL TEXTREL RPATH BIND FILE > ET_EXEC PeMRxS 0755 LE --- --- RWX - - LAZY dream > > chpax -v dream output: > > ----[ chpax 0.7 : Current flags for dream (PeMRxS) ]---- > > * Paging based PAGE_EXEC : enabled (overridden) > * Trampolines : not emulated > * mprotect() : restricted > * mmap() base : randomized > * ET_EXEC base : not randomized > * Segmentation based PAGE_EXEC : enabled Can you try with "objdump -T dream" for example? As I'm telling you the problem is that even recent binutils won't recongise it as a valid ELF file so paxctl won't let you play with ËLF headers (chpax markings work in other ways).
the problem is not with paxctl but the ELF executable itself: its e_shoff is not 0 (indicating the presence of section headers) while it has no such headers (e_shnum is 0), this is invalid according to the ELF spec. looking at http://pastebin.com/43ii7J1g i think the correct solution is to simply get rid of section_table_start and related stuff. PS: next time CC me on paxctl bugs ;)