Lookup the start,len of the "execve" stub in libc.so, and tell the kernel
authorderaadt <deraadt@openbsd.org>
Sat, 18 Feb 2023 01:22:50 +0000 (01:22 +0000)
committerderaadt <deraadt@openbsd.org>
Sat, 18 Feb 2023 01:22:50 +0000 (01:22 +0000)
commita4ba1e578abc32528c379f6c94024325cd810809
tree6ffd5b6208095a3e2bea554f15aab6f64afb428f
parenta2c764f6fb7a2a06df769555b041baf5e612c4de
Lookup the start,len of the "execve" stub in libc.so, and tell the kernel
where it is with pinsyscall().  In non-static binaries, kernel execve(2)
will now insist upon being called from that small region.  Arriving from
a different region smells like ROP methodology, and the process is killed.
libexec/ld.so/Makefile
libexec/ld.so/loader.c
libexec/ld.so/syscall.h