[fuzz]network-level WriteFilter generic fuzzer#12462
Merged
mattklein123 merged 91 commits intoenvoyproxy:masterfrom Aug 10, 2020
Merged
[fuzz]network-level WriteFilter generic fuzzer#12462mattklein123 merged 91 commits intoenvoyproxy:masterfrom
mattklein123 merged 91 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
for ext_auth by enabling the mocked response. Fixed the validation problem inside client_ssl_auth's protobuf Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
issues Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
use-after-free problem. Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
sqkerner
reviewed
Aug 4, 2020
test/extensions/filters/network/common/fuzz/uber_writefilter.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: jianwen <jianwendong@google.com>
sqkerner
previously approved these changes
Aug 5, 2020
Signed-off-by: jianwen <jianwendong@google.com>
sqkerner
previously approved these changes
Aug 6, 2020
asraa
suggested changes
Aug 6, 2020
Contributor
asraa
left a comment
There was a problem hiding this comment.
Very nice! Just a couple small comments
test/extensions/filters/network/common/fuzz/network_writefilter_fuzz_test.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/common/fuzz/uber_writefilter.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/common/fuzz/uber_writefilter.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
asraa
reviewed
Aug 10, 2020
| name = "network_writefilter_fuzz_test", | ||
| srcs = ["network_writefilter_fuzz_test.cc"], | ||
| corpus = "network_writefilter_corpus", | ||
| # All Envoy network filters must be linked to the test in order for the fuzzer to pick |
Contributor
There was a problem hiding this comment.
Are the deps below added instead of envoy_all_network_filters to exclude postgres?
Contributor
Author
There was a problem hiding this comment.
Are the deps below added instead of
envoy_all_network_filtersto exclude postgres?
envoy_all_network_filters includes 20 filters and only 5 of them are WriteFilters. And yes, I exclude postgres here. But another reason is to exclude all those ReadFilters to reduce linking time.
Contributor
There was a problem hiding this comment.
Sounds good for now -- I just wonder if somoene adds a write filter it may get missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional Description:
A generic fuzzer to test all network-level WriteFilters. There are 5 WriteFilters now in Envoy, and now this fuzzer can cover 4 of them. Postgres_proxy doesn't support untrusted data currently(#12340), so I didn't cover it.
Risk Level: Low
Testing:
This fuzzer covered
onWrite()methods of all the WriteFilters. Since those 4 filters are also subclasses of ReadFilter, onData() and onNewConnection() will be covered in by another fuzzernetwork_readfilter_fuzzer(#12086).Coverage report for 4 filters with this single fuzzer(running for 60 seconds):
Directory name------------------------------------------------------------------/Line Coverage/Functions coveragesource/extensions/filters/network/kafka/broker----------/36 %32 / 89/45.8 %11 / 24source/extensions/filters/network/zookeeper_proxy-----/28 %244 / 871/31.8 %27 / 85source/extensions/filters/network/mysql_proxy-----------/11.8 %94 / 795/15.7 %19 / 121source/extensions/filters/network/mongo_proxy-----------/6.5 %122 / 1868/7.6 %17 / 233Since this fuzzer only tests the interface of WriteFilter, the overall coverage of these filters should be a combination of WriteFilter generic fuzzer and ReadFilter generic fuzzer.
/cc @asraa
/cc @samkerner