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

fix(protocol): fix LibAddress.supportsInterface to handle undecodeable return data #18286

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Oct 24, 2024

Identified by Nike:

The supportsInterface utility function wraps a supportsInterface call in a try-catch block to ensure it returns false if the contract does not implement a supportsInterface function. However, it doesn't handle the case where the target contract implements a supportsInterface function that doesn't return anything (which will revert outside the try-catch block when attempting to decode the _result). I'm not sure if you care about this but if so, you could do a low-level call and check the return size.

@dantaik dantaik changed the title Update LibAddress.sol fix(protocol): fix LibAddress.supportsInterface to handle undecodeable return data Oct 24, 2024
@dantaik dantaik marked this pull request as ready for review October 24, 2024 03:34
@dantaik dantaik enabled auto-merge October 24, 2024 03:35
Copy link

openzeppelin-code bot commented Oct 24, 2024

fix(protocol): fix LibAddress.supportsInterface to handle undecodeable return data

Generated at commit: 38077c72c0b28309a76b67e035eda0641256e1d8

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
3
0
7
43
56
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@dantaik dantaik added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit 299b4c9 Oct 24, 2024
5 checks passed
@dantaik dantaik deleted the fix_supportsInterface branch October 24, 2024 05:55
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.

3 participants