Skip to content

Commit

Permalink
fuzz: make runtime root hermetic in server_fuzz_test. (envoyproxy#4258)
Browse files Browse the repository at this point in the history
It's kind of scary allowing this to point to arbitrary locations, we will see performance and
correctness issues as fuzz tests and the container filesystem interact.

Fixes oss-fuzz issue https://oss-fuzz.com/v2/testcase-detail/5730612661452800.

Risk level: Low
Testing: Corpus entry added.

Signed-off-by: Harvey Tuch <[email protected]>
  • Loading branch information
htuch authored Aug 27, 2018
1 parent b0a9014 commit ba6ba98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
runtime {
symlink_root: "/"
subdirectory: "tmp"
override_subdirectory: "out"
}
admin {
access_log_path: "/"
address {
pipe {
path: "WW"
}
}
}
3 changes: 3 additions & 0 deletions test/server/server_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ makeHermeticPathsAndPorts(Fuzz::PerTestEnvironment& test_env,
if (output.admin().has_address()) {
makePortHermetic(*output.mutable_admin()->mutable_address());
}
if (output.has_runtime()) {
output.mutable_runtime()->set_symlink_root(test_env.temporaryPath(""));
}
for (auto& listener : *output.mutable_static_resources()->mutable_listeners()) {
if (listener.has_address()) {
makePortHermetic(*listener.mutable_address());
Expand Down

0 comments on commit ba6ba98

Please sign in to comment.