Unable to compile dynamic shared library with afl-g++-fast.

107 views
Skip to first unread message

Elias Myllymäki

unread,
Dec 1, 2022, 5:23:12 PM12/1/22
to afl-users
Hi!

I am trying to compile this project with afl-g++-fast (afl++) because I want to fuzz a certain part of the code. The code loads dynamic shared libraries and then calls functions inside the shared libraries from the main function. The compilation goes succesfully but when I try to run the binary I get this error:

undefined symbol: __afl_area_ptr (libtier0_client.so)

So my guess is that there is a missing symbol inside the libtier0_client.so file which the afl compiler should add. How do I fix this error? I read somewhere that this error could signify that I am linking the binary with normal gcc or ld instead of afl-gcc, but I looked at the log files and I am sure that I am linking with afl-gcc. Thanks in advance for your help!

Marc

unread,
Dec 2, 2022, 4:58:36 AM12/2/22
to afl-...@googlegroups.com, Elias Myllymäki
Hi!

On 12/1/22 23:23, Elias Myllymäki wrote:
> I am trying to compile this project
> <https://github.com/SwagSoftware/Kisak-Strike> with afl-g++-fast (afl++)

Only use afl-g++-fast if the target does not compile with
clang/afl-clang-fast. the afl++ gcc_module is far away from the
effectiveness of the clang implementation.

> when I try to run the binary I get this error:
>
> undefined symbol: __afl_area_ptr (libtier0_client.so)
>
> looked at the log files and I am sure that I am linking with afl-gcc.

if you use afl-gcc then that explains it. you can never ever mix afl++
compiler and instrumentation variants. either you use afl-gcc for all or
afl-gcc-fast. afl-gcc != afl-gcc-fast !
afl-gcc-fast is better than afl-gcc.

Regards,
Marc

--
Marc Heuse
www.mh-sec.de

PGP: AF3D 1D4C D810 F0BB 977D 3807 C7EE D0A0 6BE9 F573
Reply all
Reply to author
Forward
0 new messages