FoRTE-Research/UnTracer-AFL

untracer-afl segfault Ubuntu 18.04

Closed this issue ยท 9 comments

Hi, untracer-afl segfault's on Ubuntu 18.04.
it reports:

[] setting up tracer binary..
bad_alloc()
[
] setting up basic block array..
segfault

target binary is compiled without PIE and installation went fine
which platform did you run it on?

It should run on 18.04. What binary are you trying to run it on? I'd be happy to help troubleshoot.

I tried a second time with a fresh Lubuntu 18.04 minimal image
the test target is imagemagick 'convert' tool. configure options are --disable-shared --disable-pthreads CFLAGS CXXFLAGS are -no-pie compiled with the untracer-clang untracer-clang++ binarys.
did i miss someting in my setup? tried a single input with an "a" as corpus but segfaults when setting ub the basic block array...

What version of ImageMagick are you using?

I'm playing around with version 7.0.8-66 and am getting segfaults too. In my out/ folder attempting to directly run the .tracer binary crashes with the following:

Inconsistency detected by ld.so: ../sysdeps/x86_64/dl-machine.h: 540: elf_machine_rela_relative: Assertion `ELFW(R_TYPE) (reloc->r_info) == R_X86_64_RELATIVE' failed!

Do you get the same issue? My guess is that this is a Dyninst bug unfortunately. :(

i tried version 7 from github ( @ commit adf669269af5c16818a001c5a902e96e6bd0ebb9 from master)
i get the following:
----[ running untracer-afl ] -------------------------------------------
[] Setting up tracer binary...
UnTracerDyninst: /AFL/dyninst-9.3.2/dyninstAPI/src/codegen.C:508: void codeGen::realloc(unsigned int): Assertion `buffer_' failed.
[
] Setting up basic block array...
Segmentation fault

----[ execute the tracer in the /out folder ] -------------------------------------------
$ ./convert.tracer
./convert.tracer: error while loading shared libraries: unexpected PLT reloc type 0x90909090

and the fuzz binary compile settings are:
Arch: amd64-64-little
RELRO: Partial RELRO
Stack: Canary found
NX: NX enabled
PIE: No PIE (0x400000)
FORTIFY: Enabled

Yeah that looks to me like a Dyninst issue, I have no idea how to remedy it. Dyninst version 9.3.0 was stable for us but you might have better luck with the most recent one.

i see, thanks for your help!

Moving to dyninst 10.0.1.x (github master) might help.
the current dyninst state finally is better than the 9.3 one. (in my opinon)

This original segfault issue should now be fixed in d695ca0.