Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] fuzz testing of net-vpn/tor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sat Aug 19, 2017 10:11 am    Post subject: [solved] fuzz testing of net-vpn/tor Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sat Aug 19, 2017 3:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sat Aug 19, 2017 6:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sat Aug 19, 2017 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sun Aug 20, 2017 8:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum