Out-of-memory in sqlite3_prepare_v2_fuzzer |
||||
Issue descriptionDetailed report: https://cluster-fuzz.appspot.com/testcase?key=6567498143236096 Fuzzer: libfuzzer_sqlite3_prepare_v2_fuzzer Job Type: libfuzzer_chrome_msan Platform Id: linux Crash Type: Out-of-memory Crash Address: Crash State: sqlite3_prepare_v2_fuzzer Minimized Testcase (0.02 Kb): Download: https://cluster-fuzz.appspot.com/download/AMIfv96EO5O8RLNaBiGvnwfmxLPoYf8R9gtHLIrAmxW-ZIrAFj8w3uggnKA6QQ1Fsc2BkFV1p5W_nmpGa0qnQAoggk7UhpXfsI2If1kz42fnJ2Kn2vPn7Se7pY6btswdfUjoGyJg90bflzDd0wJC8AvlIN4FfGGi5Q?testcase_id=6567498143236096 DETACH randomblob(6e8) Issue filed automatically. See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
,
Nov 11 2016
Hm, to keep things simpler, it would be better return 0 for inputs with these large numbers, like we do for inputs with REGEXP keyword: https://cs.chromium.org/chromium/src/testing/libfuzzer/fuzzers/sqlite3_prepare_v2_fuzzer.cc?l=41
,
Nov 11 2016
No, it seems to be hard and stupid solution. I hope there are ways to restrict memory usage of sqlite3 (https://www.sqlite.org/c3ref/soft_heap_limit64.html) that could help to avoid large allocations.
,
Nov 11 2016
Hm, that's a soft limit which doesn't lead to SQLITE_NOMEM error :/
,
Nov 11 2016
sqlite3_limit(db,SQLITE_LIMIT_LENGTH,size) from https://www.sqlite.org/limits.html seems to be working for me
,
Nov 11 2016
Will upload a CL soon (+ will move the fuzzer to third_party/sqlite)
,
Nov 11 2016
https://codereview.chromium.org/2497603002/ Also did the same change on oss-fuzz.
,
Nov 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/947d0b893e2af8923bb86eb3e849e25d4dff710d commit 947d0b893e2af8923bb86eb3e849e25d4dff710d Author: mmoroz <mmoroz@chromium.org> Date: Fri Nov 11 17:45:37 2016 Limit memory usage for sqlite3 fuzzer + move it to sqlite dir. R=aizatsky@chromium.org, kcc@chromium.org, ochang@chromium.org, shess@chromium.org BUG= 657486 Review-Url: https://codereview.chromium.org/2497603002 Cr-Commit-Position: refs/heads/master@{#431589} [modify] https://crrev.com/947d0b893e2af8923bb86eb3e849e25d4dff710d/testing/libfuzzer/fuzzers/BUILD.gn [modify] https://crrev.com/947d0b893e2af8923bb86eb3e849e25d4dff710d/third_party/sqlite/BUILD.gn [rename] https://crrev.com/947d0b893e2af8923bb86eb3e849e25d4dff710d/third_party/sqlite/fuzz/sqlite3_prepare_v2_fuzzer.cc [rename] https://crrev.com/947d0b893e2af8923bb86eb3e849e25d4dff710d/third_party/sqlite/fuzz/sqlite3_prepare_v2_fuzzer.dict
,
Nov 12 2016
ClusterFuzz has detected this issue as fixed in range 431586:431621. Detailed report: https://cluster-fuzz.appspot.com/testcase?key=6567498143236096 Fuzzer: libfuzzer_sqlite3_prepare_v2_fuzzer Job Type: libfuzzer_chrome_msan Platform Id: linux Crash Type: Out-of-memory Crash Address: Crash State: sqlite3_prepare_v2_fuzzer Fixed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_msan&range=431586:431621 Minimized Testcase (0.02 Kb): Download: https://cluster-fuzz.appspot.com/download/AMIfv96EO5O8RLNaBiGvnwfmxLPoYf8R9gtHLIrAmxW-ZIrAFj8w3uggnKA6QQ1Fsc2BkFV1p5W_nmpGa0qnQAoggk7UhpXfsI2If1kz42fnJ2Kn2vPn7Se7pY6btswdfUjoGyJg90bflzDd0wJC8AvlIN4FfGGi5Q?testcase_id=6567498143236096 DETACH randomblob(6e8) See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information. If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
,
Nov 14 2016
,
Nov 22 2016
Removing EditIssue view restrictions from ClusterFuzz filed bugs. If you believe that this issue should still be restricted, please reapply the label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||
►
Sign in to add a comment |
||||
Comment 1 by mmoroz@google.com
, Nov 11 2016