[Fuzz] Network-layer filter generic fuzzer#12086
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>
different files. Cleaned up the deps Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
|
Merge main and we can pick up a coverage report! :) |
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>
|
Coverage report for 8 filters(running for 60 seconds): |
asraa
left a comment
There was a problem hiding this comment.
LGTM for now, @sqkerner what do you think? Will give you a final sign-off.
I think after this it would be good to iterate on speed (I think it could still be faster, some mock perFilterSetup could happen once or replaced with reals), corpus entries, specific fuzzers, and bugs that come up.
Signed-off-by: jianwen <jianwendong@google.com>
Signed-off-by: jianwen <jianwendong@google.com>
test/extensions/filters/network/common/fuzz/uber_per_readfilter.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/common/fuzz/uber_per_readfilter.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/common/fuzz/uber_per_readfilter.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/common/fuzz/uber_per_readfilter.cc
Outdated
Show resolved
Hide resolved
asraa
left a comment
There was a problem hiding this comment.
Thanks Jianwen! I'm excited to see this land on OSS-Fuzz :)
* added generic freamework for testing filters. This is a fuzzer for testing network-layer(L3/L4) filters. Now Envoy has 20 network-layer filters which will deal with raw bytes from untrusted networks and thus they are security-critical to some extent. The idea of this is to write a fuzzer which can be applied to different kinds of network filters(potentially cover all the filters), and when new filters are added to Envoy, we won't need to write dedicated fuzzers one by one to give them fuzz coverage. Signed-off-by: jianwen <jianwendong@google.com> Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
* added generic freamework for testing filters. This is a fuzzer for testing network-layer(L3/L4) filters. Now Envoy has 20 network-layer filters which will deal with raw bytes from untrusted networks and thus they are security-critical to some extent. The idea of this is to write a fuzzer which can be applied to different kinds of network filters(potentially cover all the filters), and when new filters are added to Envoy, we won't need to write dedicated fuzzers one by one to give them fuzz coverage. Signed-off-by: jianwen <jianwendong@google.com>
* added generic freamework for testing filters. This is a fuzzer for testing network-layer(L3/L4) filters. Now Envoy has 20 network-layer filters which will deal with raw bytes from untrusted networks and thus they are security-critical to some extent. The idea of this is to write a fuzzer which can be applied to different kinds of network filters(potentially cover all the filters), and when new filters are added to Envoy, we won't need to write dedicated fuzzers one by one to give them fuzz coverage. Signed-off-by: jianwen <jianwendong@google.com> Signed-off-by: chaoqinli <chaoqinli@google.com>
Additional Description:
This is a fuzzer for testing network-layer(L3/L4) filters.
Now Envoy has 20 network-layer filters which will deal with raw bytes from untrusted networks and thus they are security-critical to some extent. The idea of this is to write a fuzzer which can be applied to different kinds of network filters(potentially cover all the filters), and when new filters are added to Envoy, we won't need to write dedicated fuzzers one by one to give them fuzz coverage.
To make the fuzzer run with
client_ssl_auth, I fixed the issue in api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto. The old validation allows theauth_api_clusterto be any strings including those not supported by HTTP header. This will crash the configuration process of client_ssl_auth filter. An error will look like this:[2020-07-08 20:03:49.026][15][critical][assert] [source/common/http/header_map_impl.cc:116] assert failure: validHeaderString(absl::string_view(data, size)).It is fixed by adding a validation which checks whether this is a valid HTTP header value.
In addition,
envoy_all_network_filtersis defined insource/extensions/all_extensions.bzlin order to load the network filters(especially their factories) into the fuzzer.Currently this fuzzer has already covered 8 network-layer filters. I've added 14 simple test cases(as corpus) for these 8 filters.
And I will make pull request to extend this to cover more filters in the following weeks.
Risk Level:Low
Testing: Coverage is not available since coverage script has an issue now.
[Optional Fixes #Issue]#12084
/cc @asraa
/cc @samkerner