-
Notifications
You must be signed in to change notification settings - Fork 979
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
Detector for encodeWithSelector wrong argument count/ mismatched types #1292
base: dev
Are you sure you want to change the base?
Conversation
This pull request introduces 2 alerts when merging ecd8adb into d0a4f55 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 7ce0a71 into d0a4f55 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 5fbbef5 into d0a4f55 - view on LGTM.com new alerts:
|
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
Co-authored-by: alpharush <[email protected]>
Co-authored-by: alpharush <[email protected]>
Co-authored-by: alpharush <[email protected]>
Co-authored-by: alpharush <[email protected]>
This pull request introduces 1 alert when merging 15d79b4 into d0a4f55 - view on LGTM.com new alerts:
|
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
slither/detectors/compiler_bugs/wrong_selector_with_selector.py
Outdated
Show resolved
Hide resolved
Can we add a test case that uses an array type as an argument please? |
...e/detectors/snapshots/detectors__detector_WriteAfterWrite_0_8_0_write_after_write_sol__0.txt
Outdated
Show resolved
Hide resolved
else: | ||
return result | ||
|
||
_, _, argument_types = func_ids[selector.value] |
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.
This causes an error on 0x9078f5996746f134f761b93939b0fd595f68845e. We should return early if we cannot determine which function the selector map backs to until we integrate a selector db
The Solc Compiler does not help checking that the arguments used in when building the transaction calldata with encodeWhitSelector matches the target function. This detector look for miss-matching encodeWithSelector arguments and target function arguments.