Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

handle non-utf8 from libfuzzer stderr #379

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

bmc-msft
Copy link
Contributor

Moves to using String::from_utf8_lossy to cleanly ignore non-utf8 output from libfuzzers.

@bmc-msft bmc-msft linked an issue Dec 10, 2020 that may be closed by this pull request
@bmc-msft
Copy link
Contributor Author

Testing of the basic feature was done by adding the following to LLVMFuzzerTestOneInput to a sample libfuzzer target.

fprintf(stdout, "\xFF\xFF\xFF\xFF\n");
fprintf(stderr, "\xFF\xFF\xFF\xFF\n");

Then run via:

onefuzz-agent debug libfuzzer-fuzz ~/tests/libfuzzer-stdout-binary/fuzz.exe /tmp/seeds /tmp/crashes
onefuzz-agent debug libfuzzer-crash-report  ~/tests/libfuzzer-stdout-binary/fuzz.exe /tmp/crashes/crash-8462399f9f420af69de1a1862b9af328ef35971c

@bmc-msft
Copy link
Contributor Author

This passed integration testing.

@bmc-msft bmc-msft merged commit 7f5673e into microsoft:main Dec 10, 2020
@bmc-msft bmc-msft deleted the handle-non-utf8-stderr branch December 10, 2020 20:13
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libfuzzer_fuzz fails if the target prints non-UTF8 to stderr
3 participants