New issue
Advanced search Search tips

Issue 635356 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 539572



Sign in to add a comment

sqlite3_prepare_v2_fuzzer writes garbage files to disk during execution

Project Member Reported by metzman@google.com, Aug 7 2016

Issue description

Running this fuzzer (with either AFL or libFuzzer) writes files to the directory it is being executed in like:

1. ?;-b( ;SEL(SELECT lower( 15000.)-10-1-2 -1-ECT ?@2  =1=*$es+@2_?&#ar* ''*'RELEAE'+#unorSA;EPOINTs2)pt_m(oeere c01-2+1-hange(1026-00:d)S_EsLECT case intsitive_ lower(?NAALYZE  fo1)MAT880)SDORRE;AVEP?OI'TDET;TCSAACOUTe:R?*-a-&)D0!52?el?cCK)treign_key_listEs

2. ??SELET

3. :memory:memory??SELET

This probably makes the fuzzer slower than it needs to be, but it could do worse things like filling up the disk.

Sqlite can be built in a fuzzer mode that prevents this and other bad things (like executing shell commands) from happening. I will see if we are/can use it.
 

Comment 1 by metzman@google.com, Aug 7 2016

Description: Show this description
Project Member

Comment 2 by sheriffbot@chromium.org, Aug 8 2016

Labels: Hotlist-Google

Comment 3 by mmoroz@chromium.org, Aug 12 2016

Cc: mmoroz@chromium.org
Nice catch! Have you seen anything regarding garbage in the documentation, or just noticed that after local testing?

Comment 4 by metzman@google.com, Aug 12 2016

Thanks!

Actually, Richard Hipp himself has warned me about the garbage.
https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg93177.html

I did notice this when I ran it locally, but weirdly, I generated *far* more garbage with the standard SQLite build a couple months ago, than I do with the Chrome one now.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c8c6bc0bae27ca7823989eff595873b871d86ce2

commit c8c6bc0bae27ca7823989eff595873b871d86ce2
Author: metzman <metzman@google.com>
Date: Fri Aug 12 08:06:42 2016

[libFuzzer] Ensure that sqlite3_prepare_v2_fuzzer never writes to disk.

BUG= 635356 

Review-Url: https://codereview.chromium.org/2243763002
Cr-Commit-Position: refs/heads/master@{#411577}

[modify] https://crrev.com/c8c6bc0bae27ca7823989eff595873b871d86ce2/testing/libfuzzer/fuzzers/sqlite3_prepare_v2_fuzzer.cc

Comment 6 by metzman@google.com, Aug 12 2016

Status: Fixed (was: Untriaged)

Sign in to add a comment