-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
udp listener fuzzer #15974
udp listener fuzzer #15974
Conversation
Signed-off-by: davkor <[email protected]>
Signed-off-by: davkor <[email protected]>
Signed-off-by: davkor <[email protected]>
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 <[email protected]>
Signed-off-by: davkor <[email protected]>
Signed-off-by: davkor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: davkor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ENVOY_LOG_MISC(debug, "Receive a packet with {} bytes from {}", msg_len, | |
output.msg_[i].peer_address_->asString()); |
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 <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Signed-off-by: davkor [email protected]
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.cc
Additional 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:]