udp listener fuzzer#15974
Conversation
Signed-off-by: davkor <david@adalogics.com>
Signed-off-by: davkor <david@adalogics.com>
Signed-off-by: davkor <david@adalogics.com>
|
Hi @DavidKorczynski, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Signed-off-by: davkor <david@adalogics.com>
Signed-off-by: davkor <david@adalogics.com>
asraa
left a comment
There was a problem hiding this comment.
Thanks!! You may need to run fix format to help CI
out https://github.com/envoyproxy/envoy/blob/1d1b708c7bf6efa02c41d9ce22cbf1e4a1aeec2c/support/README.md#fixing-format-problems
Couple of initial nits, after CI passes it should generate a fuzz coverage report
Signed-off-by: davkor <david@adalogics.com>
Signed-off-by: davkor <david@adalogics.com>
asraa
left a comment
There was a problem hiding this comment.
Thanks! The fuzz coverage reports were generated, this got added the wanted coverage here https://storage.googleapis.com/envoy-pr/bebe107/fuzz_coverage/source/common/network/utility.cc.gcov.html
(compare to https://storage.googleapis.com/envoy-postsubmit/master/fuzz_coverage/source/common/network/utility.cc.gcov.html)
Assuming oss-fuzz runners support UDP_GRO, maybe we can also fuzz that portion?
Signed-off-by: davkor <david@adalogics.com>
Sounds good - fixed it up and you can see the coverage report here: https://storage.googleapis.com/envoy-pr/056fbe5/fuzz_coverage/source/common/network/utility.cc.gcov.html |
asraa
left a comment
There was a problem hiding this comment.
LGTM!
FWIW (for documentation later, not blocking addition to OSS-Fuzz) could you check if this line crashes
envoy/source/common/network/utility.cc
Lines 664 to 665 in a12869f
output.msg_[i].truncated_and_dropped_ from https://github.com/envoyproxy/envoy/pull/14122/files
Sure thing. Just to clarify here, is it the logging line or the assert right before the logging line that should crash? |
|
It's the logging line actually :P since |
Ahh :) Thanks for the clarification, will update here with documentation shortly. |
* test: common: network: add udp listener fuzzer. Signed-off-by: davkor <david@adalogics.com> Signed-off-by: Gokul Nair <gnair@twitter.com>
Signed-off-by: davkor david@adalogics.com
Commit Message: This adds a fuzz test that targets the UdpListener code.
The fuzzer has been tested over a 30 minute experiment and runs without issues. It currently hits code in
/source/common/network/udp_listener_impl.cc,/source/common/network/udp_listener_impl.cc, andsource/common/network/io_socket_handle_impl.ccAdditional Description: Cross referencing #14889 CC @asraa
Risk Level: Zero. This adds a fuzz test and does not modify anything in the Envoy proxy itself.
Testing: Compiled with OSS-Fuzz to verify fuzzer runs in OSS-Fuzz environment.
Docs Changes: N/A
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]