1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-29 23:42:18 +03:00
Files
libxml2/fuzz
Nick Wellnhofer 6f1470a5d6 Hardcode maximum XPath recursion depth
Always limit nested functions calls to 5000. This avoids call stack
overflows with deeply nested expressions.

The expression parser produces about 10 nested function calls when
parsing a subexpression in parentheses, so the effective nesting limit
is about 500 which should be more than enough.

Use a lower limit when fuzzing to account for increased memory usage
when using sanitizers.
2020-08-26 00:22:25 +02:00
..
2020-06-05 13:53:11 +02:00
2020-08-24 21:14:55 +02:00
2020-08-24 21:14:55 +02:00
2020-08-24 21:14:55 +02:00
2020-08-24 21:14:55 +02:00
2020-06-15 15:23:38 +02:00
2020-07-31 11:55:13 +02:00
2020-08-24 21:14:55 +02:00
2020-06-05 13:53:11 +02:00
2020-07-31 11:55:13 +02:00
2020-07-31 11:55:13 +02:00
2020-07-31 11:55:13 +02:00
2020-06-23 16:20:27 +02:00
2020-06-23 16:20:27 +02:00
2020-07-31 11:55:13 +02:00
2020-06-05 13:53:11 +02:00
2020-07-31 11:55:13 +02:00
2020-08-24 23:17:34 +02:00
2020-06-05 13:53:11 +02:00
2020-07-31 11:55:13 +02:00
2020-08-26 00:22:25 +02:00
2020-08-06 14:12:32 +02:00
2020-08-06 14:12:32 +02:00

libFuzzer instructions for libxml2
==================================

Set compiler and options:

    export CC=clang
    export CFLAGS="-g -fsanitize=fuzzer-no-link,address,undefined \
        -fno-sanitize-recover=all \
        -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"

Build libxml2 with instrumentation:

    ./configure --without-python
    make

Run fuzzers:

    make -C fuzz fuzz-xml