Skip to content
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 new examples for Fuzzer #110

Merged
merged 85 commits into from
Jan 12, 2024

Conversation

lukacan
Copy link
Collaborator

@lukacan lukacan commented Jan 9, 2024

fuzz_example0

  • contains subtraction overflow and division by zero
  • crash file example:
    • trdelnik-tests/hfuzz_workspace/fuzz_target/overflow_crash.fuzz

fuzz_example1

  • contains incorrectly set variable "registrations_round" within Initialization
    • this variable is responsible for distinguishing between Registration/Invest Window
  • crash file example:
    • trdelnik-tests/hfuzz_workspace/fuzz_target/invest_check.fuzz
    • trdelnik-tests/hfuzz_workspace/fuzz_target/register_check.fuzz

fuzz_example2

  • misses check if Receiver is eligible to Withdraw
  • crash file example:
    • trdelnik-tests/hfuzz_workspace/fuzz_target/withdraw_check.fuzz

fuzz_example3

  • incorrect math and common Token Account across multiple Escrows, can result into:
    • not able to withdraw
    • withdraw less
    • withdraw more
  • crash file example:
    • trdelnik-tests/hfuzz_workspace/fuzz_target/can_withdraw_less.fuzz
    • trdelnik-tests/hfuzz_workspace/fuzz_target/can_withdraw_more.fuzz
    • trdelnik-tests/hfuzz_workspace/fuzz_target/cannot_withdraw_any.fuzz

@lukacan lukacan requested a review from Ikrk January 12, 2024 09:23
Copy link
Contributor

@Ikrk Ikrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Ikrk Ikrk merged commit c6a8c49 into fuzz-instructions-generator Jan 12, 2024
7 checks passed
@lukacan lukacan deleted the fuzz-instructions-generator-examples branch January 12, 2024 20:57
lukacan added a commit that referenced this pull request May 20, 2024
* 🧪 add fuzz_example1

* 🧪 added fuzz_example0, this is copy of 'fuzzer' example but with the new structure

* ✅ work on example0

* ✅ working on example1

* ✅ added fresh example2

* ✅ fuzz test for example2

* ✅ slightly different fuz test for fuzz example 1

* ✅ added fuzz example3 - escrow with bad math

* ✅ fuzz test for fuzz example3

* 🚀 added check for register Subject and added initial problem description

* ✅ add crashes for both checks

* ✅ fuzz example 0 in progress

* 📝 readme updates

* 📝 example1 small readme  update

* ✅ small program update

* 📝 readme + added fuzzer output

* ✅ minor program example updates

* ✅ remove unnecessary coments , add few notes , add new withdraw check

* ✅ add crash files

* 📝 add readme template

* 🐛 update program code and fix accounts snapshot

* 📝 add readme + crash file

* 🙈 gitignore

* ✅ remove unnecessary code + update fuzz test check

* ✅ add crashes

* 📝 initial readme

* 📝 readme update + minor code update

* 📝 the final check part

* 📝 code format

* 📝 better grammar and spelling

* 📝 better grammar and spelling

* 📝 better grammar and spelling

* 📝 link to uncomment check

* 🚧 todo find crash file for the todo check

* 🔥 removed incorrect check from withdraw + update readme

* ✏️ fix fuzz_example0 - Update readme and rename fuzzer to fuzz_example0

* ✏️ fix fuzz_example2 comments

* ✏️ fixes for fuzz_example3 - remove unnecessary code parts

* ✏️ fix fuzz_example3 - remove check for Invest function, update Readme

* Fixed snapshot deserialization

* Removed unused imports

* Rebase fixes

* 🧪 added fuzz_example0, this is copy of 'fuzzer' example but with the new structure

* ✅ work on example0

* ✅ working on example1

* ✅ added fresh example2

* ✅ fuzz test for example2

* ✅ slightly different fuz test for fuzz example 1

* ✅ added fuzz example3 - escrow with bad math

* ✅ fuzz test for fuzz example3

* 🚀 added check for register Subject and added initial problem description

* ✅ add crashes for both checks

* ✅ fuzz example 0 in progress

* 📝 readme updates

* 📝 example1 small readme  update

* ✅ small program update

* 📝 readme + added fuzzer output

* ✅ minor program example updates

* ✅ remove unnecessary coments , add few notes , add new withdraw check

* ✅ add crash files

* 📝 add readme template

* 🐛 update program code and fix accounts snapshot

* 📝 add readme + crash file

* 🙈 gitignore

* ✅ remove unnecessary code + update fuzz test check

* ✅ add crashes

* 📝 initial readme

* 📝 readme update + minor code update

* 📝 the final check part

* 📝 code format

* 📝 better grammar and spelling

* 📝 better grammar and spelling

* 📝 better grammar and spelling

* 📝 link to uncomment check

* 🚧 todo find crash file for the todo check

* 🔥 removed incorrect check from withdraw + update readme

* ✏️ fix fuzz_example0 - Update readme and rename fuzzer to fuzz_example0

* ✏️ fix fuzz_example2 comments

* ✏️ fixes for fuzz_example3 - remove unnecessary code parts

* ✏️ fix fuzz_example3 - remove check for Invest function, update Readme

* 🎨 cargo fmt

* 🎨 clippy allow too many arguments

---------

Co-authored-by: lukacan <[email protected]>
Co-authored-by: Ikrk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants