fuzzing dtc with AFL
Hi David,
I wanted something to test AFL with, and since dtc is simple, self contained and checked out on my laptop, I attacked it. It found a number of interesting testcases:
A divide by zero issue:
# ./dtc test1.dts Floating point exception
An issue parsing octals:
# ./dtc test2.dts dtc: dtc-lexer.l:156: yylex: Assertion `!(*e) || !e[strspn(e, "UL")]' failed. Aborted
An issue with null escape characters:
# ./dtc test3.dts dtc: util.c:155: get_escape_char: Assertion `c' failed. Aborted
and a SEGV:
# ./dtc test4.dts Segmentation fault
Anton
Quoted 3 lines · Anton Blanchard
Hi David,
I wanted something to test AFL with, and since dtc is simple, self
What's AFL?
Quoted 17 lines
contained and checked out on my laptop, I attacked it. It found a number of interesting testcases:
A divide by zero issue:
# ./dtc test1.dts Floating point exceptionAn issue parsing octals:
# ./dtc test2.dts dtc: dtc-lexer.l:156: yylex: Assertion `!(*e) || !e[strspn(e, "UL")]' failed. AbortedAn issue with null escape characters:
Quoted 8 lines
# ./dtc test3.dts dtc: util.c:155: get_escape_char: Assertion `c' failed. Abortedand a SEGV:
# ./dtc test4.dts Segmentation fault
Nice catches all. I'll try to debug these in detail soon.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 28 lines · David Gibson
Quoted 3 lines · Anton Blanchard
Hi David,
I wanted something to test AFL with, and since dtc is simple, self
What's AFL?
Quoted 21 lines
contained and checked out on my laptop, I attacked it. It found a number of interesting testcases:
A divide by zero issue:
# ./dtc test1.dts Floating point exceptionAn issue parsing octals:
# ./dtc test2.dts dtc: dtc-lexer.l:156: yylex: Assertion `!(*e) || !e[strspn(e, "UL")]' failed. AbortedAn issue with null escape characters:
# ./dtc test3.dts dtc: util.c:155: get_escape_char: Assertion `c' failed. Aborted
Quoted 6 lines
Quoted 4 lines
and a SEGV:
# ./dtc test4.dts Segmentation faultNice catches all. I'll try to debug these in detail soon.
I've now commited fixes (and test cases) for all of these to the master tree.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Hi David,
Quoted 1 line
What's AFL?
http://lcamtuf.coredump.cx/afl/
Quoted 1 line
Nice catches all. I'll try to debug these in detail soon.
Thanks!
Anton
Quoted 3 lines
I've now commited fixes (and test cases) for all of these to the master tree.
Thanks David! It's looking much better, but the fuzzer did trip on another divide by zero, this time a modulo:
/dts-v1/;
/ {
x = <(0%0)>
};Anton
Quoted 4 lines · Anton Blanchard
Quoted 3 lines
I've now commited fixes (and test cases) for all of these to the master tree.
Quoted 8 lines
Thanks David! It's looking much better, but the fuzzer did trip on another divide by zero, this time a modulo:
/dts-v1/;
/ { x = <(0%0)> };
Oops, really should have thought of that case at the same time. Oh well, fixed now.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson