fuzzilli: Fix stack-buffer-overflow in Fuzzilli driver on shutdown The driver treated 0-byte reads (EOF) from the control pipe as errors and attempted to log the `action_msg` buffer. This buffer was not null-terminated, causing the logging operator to read past the stack allocation and trigger an ASan `stack-buffer-overflow`. Check for EOF explicitly and exit cleanly with a warning. Use `base::as_string_view` to log received bytes safely based on the read length. Distinguish between read errors (ERROR) and clean shutdown (WARNING). Bug: 477639524 Change-Id: Iad93d87acb5928f84da9f05f04698deba7693e57 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7513891 Commit-Queue: Giovanni Ortuno Urquidi <[email protected]> Reviewed-by: Titouan Rigoudy <[email protected]> Reviewed-by: Alex Kallam <[email protected]> Cr-Commit-Position: refs/heads/main@{#1575364} NOKEYCHECK=True GitOrigin-RevId: 14d045fe1842e926579368cbf51e7daad1eb5ea1
Fuzzing is a testing technique that feeds auto-generated inputs to a piece of target code in an attempt to crash the code. It's one of the most effective methods we have for finding security and stability issues (see go/fuzzing-success). You can learn more about the benefits of fuzzing at go/why-fuzz.
This documentation covers the in-process guided fuzzing approach employed by different fuzzing engines, such as libFuzzer or [AFL]. To learn more about out-of-process fuzzers, please refer to the Blackbox fuzzing page in the ClusterFuzz documentation.
In Chromium, you can easily create and submit fuzz targets. The targets are automatically discovered by buildbots, built with different fuzzing engines, then uploaded to the distributed ClusterFuzz fuzzing system to run at scale.
You should fuzz any code which absorbs inputs from untrusted sources, such as the web. If the code parses, decodes, or otherwise manipulates that input, it's an especially good idea to fuzz it.
Create your first fuzz target and submit it by stepping through our Getting Started Guide.
Creating a fuzz target that expects a protobuf instead of a byte stream as input.
Reproducing bugs found by libFuzzer/AFL and reported by ClusterFuzz.
Fuzzing mojo interfaces using automatically generated libprotobuf-mutator fuzzers.