linux-inject icon indicating copy to clipboard operation
linux-inject copied to clipboard

__libc_dlopen_mode gone in glibc-2.33.9000+

Open danielfvm opened this issue 3 years ago • 2 comments

I am currently using libc version 2.35, and it looks like __libc_dlopen_mode was removed from the library. I found verification for its removal here, I also can't find it with readelf --dyn-syms. When running the program I get following error:

targeting process "test" with pid 6824
instead of expected SIGTRAP, target stopped with signal 11: Segmentation fault
sending process 6824 a SIGSTOP signal for debugging purposes

Because __libc_dlopen_mode was removed, the following code returns 0 leading to the crash.

long dlopenAddr = getFunctionAddress("__libc_dlopen_mode");

This is probably the same problem as seen in #18 and #16. I'm not sure how to solve this issue, maybe there is an alternative to __libc_dlopen_mode?

danielfvm avatar Jul 26 '22 09:07 danielfvm

nm -D libc.so.6 | grep dlopen

I built the newest version, which was 2.36 and found 2 exports which should work

0000000000082f10 T dlopen@GLIBC_2.2.5
0000000000082f10 T dlopen@@GLIBC_2.34

try to just use "dlopen"

papstuc avatar Aug 09 '22 21:08 papstuc

Yes I tired that already, I wasn't able to get it working with this project (still some crash some where else), but I got it working with my own python implementation that basically does the same thing.

danielfvm avatar Aug 10 '22 13:08 danielfvm