Add support to fuzz proto data in uber filter fuzzer#10796
Add support to fuzz proto data in uber filter fuzzer#10796mattklein123 merged 13 commits intoenvoyproxy:masterfrom
Conversation
|
@vitalybuka @asraa: Note the How do we handle this:
|
As discussed in envoyproxy/envoy#10796, this will allow breaking wire-compatibility changes in the input proto. The pre-existing corpus will still function, but old fields will be ignored. Risk: Typos in the text proto will cause the fuzzer to run on an incomplete proto. Previously, this would log an error message and skip fuzzing with that test case.
As discussed in envoyproxy/envoy#10796, this will allow breaking wire-compatibility changes in the input proto. The pre-existing corpus will still function, but old fields will be ignored. Risk: Typos in the text proto will cause the fuzzer to run on an incomplete proto. Previously, this would log an error message and skip fuzzing with that test case.
|
FYI we found a bug in protobuf and are waiting for a fix to propagate to Github - google/libprotobuf-mutator#172 |
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
|
Sorry for the force push, I rebased instead of merging earlier |
Signed-off-by: Teju Nareddy <nareddyt@google.com>
asraa
left a comment
There was a problem hiding this comment.
Overall, this looks amazing! Some organization clean-up, but LGTM!
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
asraa
left a comment
There was a problem hiding this comment.
Thank you! This looks amazing. Really excited about it.
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
| // These types are request/response from the test Bookstore service | ||
| // for the gRPC Transcoding filter. | ||
| static const std::vector<std::string> expected_types = { | ||
| "type.googleapis.com/bookstore.ListShelvesResponse", |
There was a problem hiding this comment.
For later, I wonder if these types can be picked up via reflection.
There was a problem hiding this comment.
Good point, I didn't think of that. I did some initial research and it seems feasible. Lets do that in another PR later, if we end up needing to fuzz test with proto data for any other filters.
Description: The uber filter fuzzer is not very efficient in fuzzing
decodeDatawith serialized proto bodies. Add some specialized logic that allows libprotobufmutator to generategoogle.protobuf.Anymessages. Uber filter fuzzer then uses the serialized value as the data fordecodeData. This should allow better fuzz coverage in the gRPC Transcoding filter.Risk Level: None
Testing: Ran against sample corpus with debug logs and ensured corpus was parsed correctly, correct decoder functions were called, and filters were not rejecting proto data. Ran
with_libfuzzerfor 5 minutes and ensured crashes were unrelated to the proto data.Docs Changes: None
Release Notes: None