-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
508 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2024 gRPC authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef GRPC_TEST_CORE_END2END_FUZZERS_SERVER_FUZZER_H | ||
#define GRPC_TEST_CORE_END2END_FUZZERS_SERVER_FUZZER_H | ||
|
||
#include "absl/functional/function_ref.h" | ||
|
||
#include <grpc/grpc.h> | ||
|
||
#include "src/core/lib/channel/channel_args.h" | ||
#include "test/core/end2end/fuzzers/fuzzer_input.pb.h" | ||
|
||
namespace grpc_core { | ||
|
||
void RunServerFuzzer( | ||
const fuzzer_input::Msg& msg, | ||
absl::FunctionRef<void(grpc_server*, int, const ChannelArgs&)> | ||
server_setup); | ||
|
||
} // namespace grpc_core | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2024 gRPC authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include <grpc/grpc_security.h> | ||
|
||
#include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" | ||
#include "src/libfuzzer/libfuzzer_macro.h" | ||
#include "test/core/end2end/fuzzers/server_fuzzer.h" | ||
|
||
DEFINE_PROTO_FUZZER(const fuzzer_input::Msg& msg) { | ||
grpc_core::RunServerFuzzer( | ||
msg, [](grpc_server* server, int port_num, | ||
const grpc_core::ChannelArgs& channel_args) { | ||
grpc_core::ExecCtx exec_ctx; | ||
auto* listener = new grpc_core::chaotic_good::ChaoticGoodServerListener( | ||
grpc_core::Server::FromC(server), channel_args); | ||
auto port = | ||
listener->Bind(absl::StrCat("ipv4:0.0.0.0:", port_num).c_str()); | ||
GPR_ASSERT(port.ok()); | ||
GPR_ASSERT(port.value() == port_num); | ||
}); | ||
} |
5 changes: 5 additions & 0 deletions
5
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/0d935c3f36dacec03424c94df1abb0c620eb43fc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
network_input { | ||
} | ||
config_vars { | ||
trace: "" | ||
} |
4 changes: 4 additions & 0 deletions
4
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/112d7775db5f5a752656a0a6247aadbef3419946
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
config_vars { | ||
} | ||
channel_args { | ||
} |
6 changes: 6 additions & 0 deletions
6
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/2e47637f02f17049d62d8ab39ccc76c357361751
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
channel_args { | ||
args { | ||
resource_quota { | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/2e7f50a50c066bad5205820ca70b5e06edbd6251
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
api_actions { | ||
} | ||
event_engine_actions { | ||
} | ||
channel_args { | ||
} |
2 changes: 2 additions & 0 deletions
2
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/63183371a4703b1d50738759d24b6e4e9bc4a8a5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
api_actions { | ||
} |
4 changes: 4 additions & 0 deletions
4
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/78def83352dae155ccfb6911755df930ec448d34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
api_actions { | ||
} | ||
channel_args { | ||
} |
2 changes: 2 additions & 0 deletions
2
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/7dcd04438cf570ee85613752fa82fde0f6e27d48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config_vars { | ||
} |
2 changes: 2 additions & 0 deletions
2
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/8058271eb5ffed8fff7a50befc56b425518e42b5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
channel_args { | ||
} |
6 changes: 6 additions & 0 deletions
6
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/832a708b602494e209027f25e45dc2ab9946b1c1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
api_actions { | ||
} | ||
api_actions { | ||
} | ||
channel_args { | ||
} |
6 changes: 6 additions & 0 deletions
6
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/b184a899e1be9f324b0f2c2ec87e9719745ff2c0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
api_actions { | ||
create_server { | ||
} | ||
} | ||
channel_args { | ||
} |
5 changes: 5 additions & 0 deletions
5
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/bf15b8e03b2fdf07739ac5a02f20fe7763f6652e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
config_vars { | ||
experiments: 0 | ||
} | ||
channel_args { | ||
} |
3 changes: 3 additions & 0 deletions
3
...nd2end/fuzzers/server_fuzzer_chaotic_good_corpus/cb4d4bb3651d49274363e32c0fd49893598efc2e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
config_vars { | ||
trace: "" | ||
} |
5 changes: 5 additions & 0 deletions
5
.../fuzzers/server_fuzzer_chaotic_good_corpus/crash-37ee262ad3d3c94d4984ceab893527b62a76b8a0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
network_input { | ||
single_read_bytes: "\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357\357" | ||
} | ||
channel_args { | ||
} |
20 changes: 20 additions & 0 deletions
20
.../fuzzers/server_fuzzer_chaotic_good_corpus/crash-389fb72510e4ae5efc13b96633da23db10831deb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
network_input { | ||
input_segments { | ||
segments { | ||
header { | ||
simple_header { | ||
chaotic_good_alignment: "X" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
config_vars { | ||
stacktrace_minloglevel: "" | ||
trace: "" | ||
} | ||
channel_args { | ||
args { | ||
i: 8 | ||
} | ||
} |
Oops, something went wrong.