Abrt in imageloader::HelperProcessReceiver::OnFileCanReadWithoutBlocking |
|||||||
Issue descriptionDetailed report: https://clusterfuzz.com/testcase?key=5200048113319936 Fuzzer: libFuzzer_chromeos_imageloader_helper_process_receiver_fuzzer Job Type: libfuzzer_asan_chromeos Platform Id: linux Crash Type: Abrt Crash Address: 0x000000000001 Crash State: imageloader::HelperProcessReceiver::OnFileCanReadWithoutBlocking imageloader::helper_process_receiver_fuzzer_run helper_process_receiver_fuzzer.cc Sanitizer: address (ASAN) Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_asan_chromeos&range=3138110:3138341 Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5200048113319936 Issue filed automatically. See https://chromium.googlesource.com/chromiumos/docs/+/master/fuzzing.md#Reproducing-crashes-from-ClusterFuzz for more information.
,
Nov 17
,
Nov 19
The crash site is caused by LOG(FATAL):
if (!command.ParseFromArray(buffer.data(), bytes))
LOG(FATAL) << "error parsing protobuf";
@kerrnel, it looks like we can just use LOG(ERROR) here and return without sending a response? Since the server process waits the response with a timeout of 2s.
,
Nov 20
Crashing on LOG(FATAL) should be fine since it's a deliberate crash, right? That's the way the model works. If some invalid input is received, the helper process crashes and then the main process will exit.
,
Nov 20
Sounds reasonable. Is there a way to not report LOG(FATAL) in ClusterFuzz?
,
Nov 20
I think marking this bug as WontFix would prevent ClusterFuzz from annoying you. But there will still be a problem. libFuzzer/CF doesn't handle exiting well, since libFuzzer runs in-process. As you can see here, the fuzzer isn't doing much because of these exits. https://clusterfuzz.com/fuzzer-stats/by-day/date-start/2018-11-13/date-end/2018-11-19/fuzzer/libFuzzer_chromeos_imageloader_helper_process_receiver_fuzzer/job/libfuzzer_asan_chromeos It would be nice if we didn't need to exit the process on invalid input.
,
Nov 20
Will libFuzzer/CF handle LOG(FATAL) better in the future? It looks like many system services in src/platform2/ uses LOG(FATAL) here and there: https://cs.corp.google.com/search/?q=%22LOG(FATAL)%22+file:%5Esrc/platform2/+package:%5Echromeos_public$&det=none&type=cs
,
Nov 20
Because this is a privileged helper process that should only be receiving valid input from the main process, I think the most sensible course of action is to LOG(FATAL) on an invalid input. It should be an "impossible" condition so it's not safe to try and keep executing.
,
Nov 21
One possible workaround is to detect this case in llvmFuzzerTestOneInput function() and just do an early return.
,
Nov 21
some code uses FATAL when they want a shorthand for LOG(ERROR);exit and they don't realize FATAL triggers an abort/crash report. that said, that's not what we're talking about here. for the purpose of fuzzing, i think it's fine to add a protected method that does the bulk of the work and returns true/false, and OnFileCanReadWithoutBlocking calls that and takes care of exiting/aborting. that way the fuzzer can call the internal func and not worry about it exiting.
,
Nov 21
Yes I think vapier@ has a good suggestion. Allow the "public code" to exit/abort as it wishes, but have internal functions that fuzzer can call.
,
Nov 21
The only way to avoid that branch being hit is to provide a serialized protobuf message which needs libprotobuf-mutator to work. The internal functions will basically takes a serialized protobuf message to work on which again requires libprotobuf-mutator... I'm marking this as won't fix and we use crbug.com/904593 to track using libprotobuf-mutator.
,
Nov 28
ClusterFuzz testcase 5200048113319936 is still reproducing on tip-of-tree build (trunk). If this testcase was not reproducible locally or unworkable, ignore this notification and we will file another bug soon with hopefully a better and workable testcase. Otherwise, if this is not intended to be fixed (e.g. this is an intentional crash), please add ClusterFuzz-Ignore label to prevent future bug filing with similar crash stacktrace.
,
Nov 28
,
Dec 1
ClusterFuzz testcase 5200048113319936 appears to be flaky, updating reproducibility label. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ClusterFuzz
, Nov 17Labels: ClusterFuzz-Auto-CC