-
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
fuzzing support #508
Comments
|
Yes, please assign this to me. |
|
@amb67 suggested we take a look at http://lcamtuf.coredump.cx/afl/. |
|
Would this be something that runs during CI or is it too heavyweight? |
|
We could definitely do some light fuzzing in CI (time boxed fuzzing of X
mins), and then a heavier duty fuzz in nightly runs or elsewhere.
…On Tue, Aug 29, 2017 at 11:37 AM Dan Noé ***@***.***> wrote:
Would this be something that runs during CI or is it too heavyweight?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#508 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKaLv6t3PEHAnephIsDCWJ1eqKNarZ_Pks5sdDA0gaJpZM4MMFpg>
.
|
|
Assuming we get accepted to CNCF we will have have more resources to apply to CI for things like fuzzing/perf/etc. We should still plan for what we ultimately want to do though. |
|
@PiotrSikora is this still on your radar, or should we tag "help wanted"? |
|
I've started work on the new project setup for https://github.com/google/oss-fuzz. I'm working through a bunch of build issues, as we need to build Envoy in a Docker image with an oss-fuzz supplied compiler (looks to be clang-6.0) and its own set of CFLAGS/CXXFLAGS (including |
|
FTR the following pertinent restrictions exist in oss-fuzz today:
This implies that we can't make use of any of our existing integration tests with a fuzz frontend, it probably makes sense to focus on some unit tests for inspiration as well as new fuzz areas. I'm going to start with just a simple Following this, we can focus on configuration (protobuf) ingest and protocol handling on the data plane as the low hanging targets of interest. Any other suggestions welcome as well. |
|
@htuch the no network restriction is pretty unfortunate. I wonder if we could somehow fuzz/inject a fake client directly into the normal Envoy process maybe via a custom transport socket implementation? |
…xample. This is the groundwork for envoyproxy#508. See test/fuzz/README.md for the spiel on what we're integrating with, the fuzz test model and how to create new fuzz tests. There were a bunch of changes needed to the build infrastructure to get it to work in the oss-fuzz Docker build environment. In particular, we needed to allow clang + libc++ static linking on Linux and to supply extra flags that some of the external deps were not handling correctly. Signed-off-by: Harvey Tuch <htuch@google.com>
#2476) This is the groundwork for #508. See test/fuzz/README.md for the spiel on what we're integrating with, the fuzz test model and how to create new fuzz tests. There were a bunch of changes needed to the build infrastructure to get it to work in the oss-fuzz Docker build environment. In particular, we needed to allow clang + libc++ static linking on Linux and to supply extra flags that some of the external deps were not handling correctly. Signed-off-by: Harvey Tuch <htuch@google.com>
|
Status here is we have server config fuzzing (
|
This PR introduces a transport socket extension that wraps a given transport socket, interposes on its plain text traffic and records it into a proto trace file on the filesystem. This can be used for a number of purposes: 1. As a corpus for fuzzing the data plane. 2. Converted to PCAP using a soon-to-be-written utility, allowing existing tools such as Wireshark to be used to decode L4/L7 protocol history in the trace. Essentially this lets us take advantage of the PCAP ecosystem. Relates to envoyproxy#1413 and envoyproxy#508. Risk Level: Low (opt-in). Testing: New SSL integration tests, demonstrating plain text intercept. Signed-off-by: Harvey Tuch <htuch@google.com>
* tap/fuzz: transport socket extension for traffic capture. This PR introduces a transport socket extension that wraps a given transport socket, interposes on its plain text traffic and records it into a proto trace file on the filesystem. This can be used for a number of purposes: 1. As a corpus for fuzzing the data plane. 2. Converted to PCAP using a soon-to-be-written utility, allowing existing tools such as Wireshark to be used to decode L4/L7 protocol history in the trace. Essentially this lets us take advantage of the PCAP ecosystem. Relates to #1413 and #508. Risk Level: Low (opt-in). Testing: New SSL integration tests, demonstrating plain text intercept. Signed-off-by: Harvey Tuch <htuch@google.com>
|
#3493 just merged with the string lib fuzzing. |
Fuzzer for the H2 codec. This is similar in structure to //test/common/http/http2:codec_impl_test, where a client H2 codec is wired via shared memory to a server H2 codec and stream actions are applied. We fuzz the various client/server H2 codec API operations and in addition apply fuzzing at the wire level by modeling explicit mutation, reordering and drain operations on the connection buffers between client and server. Part of envoyproxy#508. Risk Level: Low Testing: Tested with corpus under bazel test and under oss-fuzz Docker image. ~500 cases per second with python infra/helper.py build_fuzzers --sanitizer=address envoy <envoy path> && python infra/helper.py run_fuzzer envoy codec_impl_fuzz_test. Test corpus has 87.9% coverage of http2/codec_impl.cc. Signed-off-by: Harvey Tuch <htuch@google.com>
|
Calling this complete. We can open individual issues on fuzzing tasks. |
Fuzzer for the H2 codec. This is similar in structure to //test/common/http/http2:codec_impl_test, where a client H2 codec is wired via shared memory to a server H2 codec and stream actions are applied. We fuzz the various client/server H2 codec API operations and in addition apply fuzzing at the wire level by modeling explicit mutation, reordering and drain operations on the connection buffers between client and server. Part of #508. Risk Level: Low Testing: Tested with corpus under bazel test and under oss-fuzz Docker image. ~500 cases per second with python infra/helper.py build_fuzzers --sanitizer=address envoy <envoy path> && python infra/helper.py run_fuzzer envoy codec_impl_fuzz_test. Test corpus has 87.9% coverage of http2/codec_impl.cc. Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Alan Chiu <achiu@lyft.com> Description: ci: add master aar release dist workflow job Risk Level: low Testing: on master Docs Changes: n/a Release Notes: n/a [Optional Fixes #Issue] [Optional Deprecated:] Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: Alan Chiu <achiu@lyft.com> Description: ci: add master aar release dist workflow job Risk Level: low Testing: on master Docs Changes: n/a Release Notes: n/a [Optional Fixes #Issue] [Optional Deprecated:] Signed-off-by: JP Simard <jp@jpsim.com>
We should start adding fuzz testing (probably using llvm). Some thinking needs to be put into how to get the most value out of this. (Which granularity to fuzz, etc.). At minimum it would be nice to fuzz not only the HTTP codecs, but also all the way through the downstream HTTP connection manager processing. Doing this in a sane way which also yields good coverage is not going to be trivial. Also need to figure out how/when to run the tests.
@PiotrSikora would you like to own this? (At least in terms of getting some stuff started and then educating the rest of us on best practices so that we can all contribute).
The text was updated successfully, but these errors were encountered: