[llvm-dev] Segfault after compiling wget with dfsan

Tianyi Chen via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 3 16:53:28 PDT 2020


Hi all,

I was trying to compile dfsan with wget. (Just enabling the dfsan feature,
without actually making changes to the source code) Without dfsan, I am
able to compile and run wget 1.19.5 (available at
https://ftp.gnu.org/gnu/wget/wget-1.19.5.tar.gz). But when compiled with
dfsan, it encountered a null pointer dereference error.

Following an old post:
http://lists.llvm.org/pipermail/cfe-dev/2014-May/037160.html . I was trying
to use a blacklist for openssl functions.

My commands are:
export CC="clang -g -fsanitize=dataflow
-fsanitize-blacklist=/tmp/openssl-list.txt
export LDFLAGS=" -fsanitize=dataflow
-fsanitize-blacklist=/tmp/openssl-list.txt
./configure --with-ssl=openssl
make

I've tried with clang 9,10, and the nightly build of 11 today.

The error is:
when trying to run "src/wget www.google.com"

Program received signal SIGSEGV, Segmentation fault.
0x00005555556de113 in url_parse (url=0x555555c47550 "http://www.google.com",

    error=0x7fffffffdb30, iri=0x555555c442f0 <dummy_iri>,
percent_encode=true)
    at url.c:837
837  if (*p == ':')
and p is a null pointer.

I am not sure if this is because I misused the dfsan or for some other
reason, any ideas?

Attached is the  fsanitize-blacklist I've used.

Thanks,
Tianyi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200403/2a8dfb54/attachment.html>
-------------- next part --------------
fun:SSL*=uninstrumented
fun:ssl*=uninstrumented
fun:RAND*=uninstrumented
fun:DES*=uninstrumented
fun:ERR*=uninstrumented
fun:MD5*=uninstrumented
fun:MD4*=uninstrumented
fun:*X509*=uninstrumented
fun:OPENSSL*=uninstrumented
fun:CRYPTO*=uninstrumented
fun:TLS*=uninstrumented
fun:BIO_*=uninstrumented
fun:gzdopen=uninstrumented
fun:gzclose=uninstrumented
fun:gzwrite=uninstrumented
fun:a2i_IPADDRESS=uninstrumented
fun:ENGINE_load_builtin_engines=uninstrumented
fun:inflateInit2_=uninstrumented
fun:inflate=uninstrumented
fun:inflateEnd=uninstrumented
fun:inflateInit2_=uninstrumented
fun:ASN1_*=uninstrumented
fun:GENERAL_NAME_free=uninstrumented
fun:CONF_modules_load_file=uninstrumented



More information about the llvm-dev mailing list