Stack-overflow in void WasmGenerator::Generate< |
|||||||
Issue descriptionDetailed report: https://clusterfuzz.com/testcase?key=5493180605923328 Fuzzer: libFuzzer_v8_wasm_compile_fuzzer Job Type: libfuzzer_chrome_asan Platform Id: linux Crash Type: Stack-overflow Crash Address: 0x7ffed14e06e0 Crash State: void WasmGenerator::Generate< std::__1::function<void Sanitizer: address (ASAN) Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=453555:453570 Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5493180605923328 Issue filed automatically. See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
,
Jul 24 2017
The wasm-compile fuzzer works by taking the input string and doing a recursive divide and conquer algorithm to generate a Wasm module to then compile and execute. Some inputs can therefore lead to deep call stacks. The bug is only in the test generator, not in any shipping code. We should be able to fix this by rewriting the test generator to use an explicitly managed stack on the heap rather than the program stack. I will start working on this.
,
Aug 30 2017
,
Sep 6 2017
,
Oct 1 2017
Automatically applying components based on information from OWNERS files. If this seems incorrect, please apply the Test-Predator-Wrong-Components label.
,
Oct 24 2017
For more information, please see https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md. The link referenced in the description is no longer valid. (bulk edit)
,
Nov 3 2017
I just ran into the same issue when fuzzing Liftoff locally.
,
Nov 3 2017
Issue 781263 has been merged into this issue.
,
Nov 3 2017
Since the bigger fix for this (mentioned in #2) seems to take a while, and the "wasm_compile" fuzzer is effectively nonfunctional till this is fixed, I went ahead and implemented a straight-forward fix: Just limit the recursion depth to a fixed value, and always generate a constant once that level is reached. Eric, WDYT? https://crrev.com/c/753329
,
Nov 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/dbddb56359c129741bb8bcf56aad6b2351bbe514 commit dbddb56359c129741bb8bcf56aad6b2351bbe514 Author: Clemens Hammacher <clemensh@chromium.org> Date: Mon Nov 06 10:27:13 2017 [wasm] Limit recursion depth in compile fuzzer Fix a stack overflow in the wasm_compile_fuzzer by limiting the recursion depth to 64. At this depth, we always just generate a constant expression. R=eholk@chromium.org, ahaas@chromium.org Bug: chromium:747348 Change-Id: I236c1e07b8cb2b6c9181c549e850eca34fac6ec6 Reviewed-on: https://chromium-review.googlesource.com/753329 Reviewed-by: Eric Holk <eholk@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49134} [modify] https://crrev.com/dbddb56359c129741bb8bcf56aad6b2351bbe514/test/fuzzer/wasm-compile.cc
,
Nov 6 2017
,
Nov 6 2017
Thanks for fixing this!
,
Nov 7 2017
ClusterFuzz has detected this issue as fixed in range 514142:514166. Detailed report: https://clusterfuzz.com/testcase?key=5493180605923328 Fuzzer: libFuzzer_v8_wasm_compile_fuzzer Job Type: libfuzzer_chrome_asan Platform Id: linux Crash Type: Stack-overflow Crash Address: 0x7fffbbd5bba0 Crash State: void v8::internal::wasm::fuzzer::WasmGenerator::Generate< std::__1::function<void Sanitizer: address (ASAN) Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=453555:453570 Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=514142:514166 Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5493180605923328 See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.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 7 2017
ClusterFuzz testcase 5493180605923328 is verified as fixed, so closing issue as verified. If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.
,
Nov 7 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by msrchandra@chromium.org
, Jul 24 2017Labels: M-62 Test-Predator-Wrong
Owner: eholk@chromium.org
Status: Assigned (was: Untriaged)