devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fuzzing dtc with AFL
@ 2016-01-02 15:32 Anton Blanchard
  2016-01-03  9:28 ` David Gibson
  0 siblings, 1 reply; 6+ messages in thread
From: Anton Blanchard @ 2016-01-02 15:32 UTC (permalink / raw)
  To: David Gibson; +Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

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

[-- Attachment #2: test1.dts --]
[-- Type: audio/vnd.dts, Size: 31 bytes --]

[-- Attachment #3: test2.dts --]
[-- Type: audio/vnd.dts, Size: 29 bytes --]

[-- Attachment #4: test3.dts --]
[-- Type: audio/vnd.dts, Size: 36 bytes --]

[-- Attachment #5: test4.dts --]
[-- Type: audio/vnd.dts, Size: 8 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-12  8:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-02 15:32 fuzzing dtc with AFL Anton Blanchard
2016-01-03  9:28 ` David Gibson
     [not found]   ` <20160103092848.GE9329-JFWYtBTiNpwvqAi9XkHEEA@public.gmane.org>
2016-01-04 11:58     ` David Gibson
     [not found]       ` <20160104115858.GG9329-JFWYtBTiNpwvqAi9XkHEEA@public.gmane.org>
2016-01-05 11:16         ` Anton Blanchard
2016-01-12  8:29           ` David Gibson
2016-01-04 12:04     ` Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).