-
Notifications
You must be signed in to change notification settings - Fork 38.8k
fuzz: Extend addrman fuzz test with deserialize #22493
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
Conversation
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.
Concept ACK
The unserialize itself is fuzzed in:
bitcoin/src/test/fuzz/deserialize.cpp
Lines 201 to 204 in d3474b8
| FUZZ_TARGET_DESERIALIZE(addrman_deserialize, { | |
| CAddrMan am; | |
| DeserializeFromFuzzingInput(buffer, am); | |
| }) |
What this test adds is calling addrman methods after it is unserialized from fuzzed data. This kind of simulates a disk corruption. I think it may result in the same addr:port being in "new" and "tried" or other "interesting" situations that do not occur from normal operation.
fa0a11e to
fa74025
Compare
vasild
left a comment
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.
ACK fa740252d2dcc272204b745906785fe26e9a0b77
jonatack
left a comment
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.
Tested ACK fa740252d2dcc272204b745906785fe26e9a0b77
fa74025 to
aaaa9c6
Compare
|
ACK aaaa9c6 per |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
@vasild I am seeing there is a conflict. Do you have a preference which one should be merged first? |
vasild
left a comment
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.
|
Ok, merging the one with the nicer commit-hash first 😅 |
aaaa9c6 fuzz: Extend addrman fuzz test with deserialize (MarcoFalke) Pull request description: Requested on IRC: ``` [18:01] <vasild> => I think there is a good chance fuzzing addrman unserialize will find more bugs [18:04] <sipa> definitely ACKs for top commit: jonatack: ACK aaaa9c6 per `git diff fa74025 aaaa9c6` vasild: ACK aaaa9c6 Tree-SHA512: f57d0aecf22a933e48d3181d7398218949588dd0de31218d1d28c825649e55fd60b0de6fbc92d2497cf5639a4adc2061c9bf8216546a2be916feac4f03f16e8f
Requested on IRC: