Skip to content

Commit ad4ddf2

Browse files
ext_authz: add response fuzzing to ext_authz grpc fuzz test (#41895)
Commit Message: add response fuzzing to ext_authz grpc fuzz test Additional Description: Add response fuzzing in the simplest way possible to the ext authz grpc fuzzer. This fuzzer now, regardless of what happened on the request path, will also invoke the response path. This is not the "highest fidelity" way to do it but it is the simplest and I ran the test overnight with zero crashes, so I think it's fine for improving fuzz coverage for the ext authz filter. Risk Level: none Testing: fuzz improvement Signed-off-by: antoniovleonti <[email protected]>
1 parent 3773c1c commit ad4ddf2

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

test/extensions/filters/http/ext_authz/ext_authz_fuzz.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ message ExtAuthzTestCaseBase {
1313
[(validate.rules).message = {required: true}];
1414
// HTTP request data.
1515
test.fuzz.HttpData request_data = 2 [(validate.rules).message = {required: true}];
16+
// HTTP response data.
17+
test.fuzz.HttpData response_data = 5 [(validate.rules).message = {required: true}];
1618
// Filter metadata.
1719
envoy.config.core.v3.Metadata filter_metadata = 4;
1820
}

test/extensions/filters/http/ext_authz/ext_authz_grpc_corpus/response_headers

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/extensions/filters/http/ext_authz/ext_authz_grpc_fuzz_test.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ DEFINE_PROTO_FUZZER(ExtAuthzTestCaseGrpc& input) {
104104
static Envoy::Extensions::HttpFilters::HttpFilterFuzzer fuzzer;
105105
fuzzer.runData(static_cast<Envoy::Http::StreamDecoderFilter*>(filter->get()),
106106
input.base().request_data());
107+
fuzzer.runData(static_cast<Envoy::Http::StreamEncoderFilter*>(filter->get()),
108+
input.base().response_data());
109+
fuzzer.reset();
107110
}
108111

109112
} // namespace

0 commit comments

Comments
 (0)