riboseinc / retrace

retrace is a versatile security vulnerability / bug discovery tool through monitoring and modifying the behavior of compiled binaries on Linux, OpenBSD/FreeBSD/NetBSD (shared object) and macOS (dynamic library).
Other
61 stars 19 forks source link

popen example crashign in FreeBSD #406

Closed pablo-mendoza closed 5 years ago

pablo-mendoza commented 5 years ago

the popen tests is crashing in FreeBSD. I tested this in FreeBSD 11.2-RELEASE #0 r335510 using this:

LD_PRELOAD=.libs/libretrace_v2.so ../../test/popen


#0  _thr_rtld_lock_release (lock=<value optimized out>) at /usr/src/lib/libthr/thread/thr_rtld.c:164
#1  0x00000008006059f3 in _rtld_bind (obj=0x800623c00, reloff=<value optimized out>) at /usr/src/libexec/rtld-elf/rtld.c:840
#2  0x000000080060269d in _rtld_bind_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:121
#3  0x0000000800d60c3b in popen (command=<value optimized out>, type=0x4008a4 "r") at /usr/src/lib/libc/gen/popen.c:162
#4  0x0000000000400828 in main () at popen.c:5
pablo-mendoza commented 5 years ago

we aren't intercepting popen, so it's something else we do.

pablo-mendoza commented 5 years ago

This was actually fixed by https://github.com/riboseinc/retrace/pull/408