View previous topic :: View next topic |
Author |
Message |
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Sat Aug 19, 2017 10:11 am Post subject: [solved] fuzz testing of net-vpn/tor |
|
|
When I do follow the document ~/tor/doc/HACKING/Fuzzing.md I run into Code: | checking whether the compiler accepts -fsanitize=address... yes
configure: error: The compiler supports -fsanitize=address, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libubsan.so, and with Clang you need libclang_rt.ubsan*
| when I add --enable-expensive-hardening to ./configure.
Without that switch I can setup a fuzz testing suite. Now I do wonder how to solve that issue ?
Last edited by toralf on Sun Aug 20, 2017 9:44 am; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21602
|
Posted: Sat Aug 19, 2017 3:53 pm Post subject: |
|
|
Check config.log or equivalent to see what error messages the underlying tools produced when the configure script tried its link test. That should give us a hint about what must be changed. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Sat Aug 19, 2017 6:09 pm Post subject: |
|
|
Hu wrote: | Check config.log or equivalent to see what error messages the underlying tools produced when the configure script tried its link test. That should give us a hint about what must be changed. | There's nothing too much interesting except exit 1 : https://paste.pound-python.org/show/abmMQ7MBZUXkRZmktPx6/ or ? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21602
|
Posted: Sat Aug 19, 2017 9:06 pm Post subject: |
|
|
This looks interesting: Code: | 3041 configure:10836: afl-gcc -o conftest -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1 -fPIE -pedantic -Werror -fsanitize=address -I${top_srcdir}/src/common -pie conftest.c -lcap -lpthread -ldl >&5
3042 /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find libasan_preinit.o: No such file or directory
3043 /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lasan
3044 collect2: error: ld returned 1 exit status | Is your gcc built with USE=sanitize? Can you build a hello-world test program with gcc-5.4.0 -fsanitize=address? |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Sun Aug 20, 2017 8:27 am Post subject: |
|
|
Hu wrote: | This looks interesting: Code: | 3041 configure:10836: afl-gcc -o conftest -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1 -fPIE -pedantic -Werror -fsanitize=address -I${top_srcdir}/src/common -pie conftest.c -lcap -lpthread -ldl >&5
3042 /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find libasan_preinit.o: No such file or directory
3043 /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lasan
3044 collect2: error: ld returned 1 exit status | Is your gcc built with USE=sanitize? Can you build a hello-world test program with gcc-5.4.0 -fsanitize=address? | Ah - that's the point. Whilst llvm (clang) is build with "sanitize", the gcc is not - b/c it is a hardened gcc.
Thx for the hint, Hu ! |
|
Back to top |
|
|
|