How to detect symbol interposition?
Florian Weimer
fweimer@redhat.com
Tue Jun 28 14:12:00 GMT 2016
I need a way to detect symbol interposition from within libc.
It seems that this is not directly distinguishable from interposition
based on addresses alone:
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
printf ("main malloc: %p\n", malloc);
}
If I have a hidden alias of malloc within libc (say, __libc_malloc), so
that I can get the original address, it will be not equal to malloc
because malloc in the entire process will point to the PLT stub. The
PLT stub will call malloc, of course, but you cannot tell this from its
address.
Any suggestions?
Thanks,
Florian
More information about the Libc-help
mailing list