exec-only ELF interpreter
Posted Nov 13, 2004 18:38 UTC (Sat) by
giraffedata (subscriber, #1954)
In reply to:
Some Linux kernel security vulnerabilities by iabervon
Parent article:
Some Linux kernel security vulnerabilities
The dynamic linker gets called like any other program (you can exec() it if you want), so it's not obvious that e.g. /sbin/mount would crash if you named it as the ELF interpreter (dynamic linker) for your program /home/hacker/hack. It would just complain about nonsensical arguments. And since /sbin/mount will definitely not transfer control to the text of /home/hacker/hack, said program can't look at the text of /sbin/mount.
I believe there is some black magic that keeps the text of /sbin/mount from ending up in a core dump file if it is --x and you run it the normal way and it crashes. Maybe that black magic is missing for the case that /sbin/mount is running in place of the dynamic linker. I know the execute-only concept is fragile; people are warned not to rely on it.
It seems reasonable to me that Linux would be designed to allow for --x dynamic linkers.
(
Log in to post comments)