-
Notifications
You must be signed in to change notification settings - Fork 5.3k
fuzz: add header string filter in utility_fuzz_test and cleanup dead code #7088
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b24534a
fuzz: cleanup utility_fuzz_test and add header string filter
asraa 89a0ed8
format
asraa 1201d1e
cleanup commit
asraa c7e109b
Add crashign utility fuzz testcase
asraa beb07bb
Merge remote-tracking branch 'upstream/master' into utilityfuzz
asraa e036b26
change name replaceInvalidCharacters
asraa c2a99bd
Merge remote-tracking branch 'upstream/master' into utilityfuzz
asraa 7bb807f
add fuzzers to dictionary
asraa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,26 @@ | ||
| #include "common_fuzz.h" | ||
|
|
||
| #include "common/common/macros.h" | ||
|
|
||
| namespace Envoy { | ||
|
|
||
| std::string replaceInvalidCharacters(absl::string_view string) { | ||
| std::string filtered; | ||
| filtered.reserve(string.length()); | ||
| for (const char& c : string) { | ||
| switch (c) { | ||
| case '\0': | ||
| FALLTHRU; | ||
| case '\r': | ||
| FALLTHRU; | ||
| case '\n': | ||
| filtered.push_back(' '); | ||
| break; | ||
| default: | ||
| filtered.push_back(c); | ||
| } | ||
| } | ||
| return filtered; | ||
| } | ||
|
|
||
| } // namespace Envoy |
This file contains hidden or 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,16 @@ | ||
| #include <functional> | ||
|
|
||
| #include "absl/strings/string_view.h" | ||
|
|
||
| namespace Envoy { | ||
|
|
||
| // The HeaderMap code assumes that input does not contain certain characters, and | ||
| // this is validated by the HTTP parser. Some fuzzers will create strings with | ||
| // these characters, however, and this creates not very interesting fuzz test | ||
| // failures as an assertion is rapidly hit in the LowerCaseString constructor | ||
| // before we get to anything interesting. | ||
| // | ||
| // This method will replace any of those characters found with spaces. | ||
| std::string replaceInvalidCharacters(absl::string_view string); | ||
|
|
||
| } // namespace Envoy |
This file contains hidden or 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
3 changes: 3 additions & 0 deletions
3
test/common/http/utility_corpus/clusterfuzz-testcase-utility_fuzz_test-5735325211557888
This file contains hidden or 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 @@ | ||
| parse_cookie_value { | ||
| cookies: "\027\000\000\000\000\000\000\000" | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -90,6 +90,7 @@ FIN | |
| FIPS | ||
| FQDN | ||
| FUZZER | ||
| FUZZERS | ||
| GB | ||
| GC | ||
| GCC | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you mark this field as
reserved 3;to avoid later reuse?