-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Add Reproducible Error Injection (rebased) #21668
Open
bernd-edlinger
wants to merge
10
commits into
openssl:master
Choose a base branch
from
bernd-edlinger:add_error_injection_rebased
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bee2d87
Add Reproducible Error Injection
bernd-edlinger 9c489bf
fixup! Add Reproducible Error Injection
bernd-edlinger 190ce20
fixup! Add Reproducible Error Injection
bernd-edlinger 52f5b55
fixup! Add Reproducible Error Injection
bernd-edlinger 930d2bd
fixup! Add Reproducible Error Injection
bernd-edlinger 539b6a5
fixup! Add Reproducible Error Injection
bernd-edlinger a87f07c
fixup! Add Reproducible Error Injection
bernd-edlinger 453914f
fixup! Add Reproducible Error Injection
bernd-edlinger f5a4fa4
fixup! Add Reproducible Error Injection
bernd-edlinger 154463b
fixup! Add Reproducible Error Injection
bernd-edlinger File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Error Injection Testrun | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: '0 10 * * *' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
fuzzing_testrun: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: checkout fuzz/corpora submodule | ||
run: git submodule update --init --depth 1 fuzz/corpora | ||
- name: config | ||
run: ./config --strict-warnings enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -DERROR_INJECT -DERROR_CALLSTACK && perl configdata.pm --dump | ||
- name: make | ||
run: make -s -j4 | ||
- name: fuzzing... | ||
run: ./util/shlib_wrap.sh ./apps/openssl version -a && cd fuzz && (sh -c 'sleep 3600; touch stop.signal; sleep 60; test -f stop.signal && killall -6 -r ".*-test";' &) && ASAN_OPTIONS=handle_abort=true ./testrun.sh && test ! -f *-test.out |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Except in the case of a malloc failure this really should succeed. So by removing the assert you remove the possibility that the normal fuzzer (i.e. where we're not injecting malloc errors) could find an input that produces an unexpected failure. After this change if it has an input that produces an unexpected failure, the fuzzer will just ignore it.
We should really only avoid this assert in the case that ERROR_INJECT is defined.
The same comment applies to many of the other places where you are removing asserts.
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.
Ah I see what you mean, that's valid point.
Although I doubt that BN_bin2bn has any other failure mode than out-of-memory,
the other BN_mod_exp below might be a different story.
I made them go to the assertion and guard that in ifndef ERROR_INJECT as suggested in several places.