Wrong operation #109
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-148
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
🤖_09_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-08-superposition/blob/4528c9d2dbe1550d2660dac903a8246076044905/pkg/sol/OwnershipNFTs.sol#L93
Vulnerability details
Impact
In function _onTransferReceived
...
require(
data != IERC721TokenReceiver.onERC721Received.selector,
"bad nft transfer received data"
);
}
It's wrong logic. Need to check if data is selector. Use == instead of !=
Recommended Mitigation Steps
require(
data == IERC721TokenReceiver.onERC721Received.selector,
"bad nft transfer received data"
);
Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: