Closed c4-bot-8 closed 8 months ago
141345 marked the issue as sufficient quality report
intentionally retain malicious hook, onStop
function will be affected to lock fund
141345 marked the issue as primary issue
Alec1017 (sponsor) confirmed
0xean marked the issue as satisfactory
0xean marked the issue as selected for report
Hey @0xean thanks for judging this. I think this report needs a revisit.
onTransaction
hook. The sponsors have already shared their input on this hook https://github.com/code-423n4/2024-01-renft-findings/issues/396#issuecomment-1910470022.Can you please recheck the impact, validity and duplication status of this report. Thanks.
Hi @akshaysrivastav,
Now leave it to @0xean to conclude if this is another path and a different issue or if it's a duplicate, but it's definitely valid.
Agree that this is just another way of framing #501.
onStop
hook and it is disabled, stopRent
will always revert.onStop
hook, the admin will refrain from disabling it because that would brick the rentals.Seems like two sides of the same coin to me.
0xean marked the issue as duplicate of #501
agree, should be duped.
0xean marked the issue as not selected for report
Lines of code
https://github.com/re-nft/smart-contracts/blob/main/src/policies/Stop.sol#L194-L212
Vulnerability details
Impact
The protocol has admin-owned hooks, which can be used instead of
_checkTransaction
from GnosisSafe to disable transferring and approving the rented assets. There can be cases where hooks can contain vulnerable code in theironTransaction
function and admins should disable them. Still, a malicious user can effectively block them from disabling by creating a rent to himself with a long rent period. As there will most likely be other rents using these hooks, admins will be forced to callupdateHookStatus
foronStop
and all funds will be locked inside thePaymentEscrow
contract, with no way to be recovered.Proof of Concept
Stop.sol#L211
Tools Used
Manual Review
Recommended Mitigation Steps
Consider adding a blacklist to disable hooks only for certain renters, this will ensure that other users who are using the same hook will be able to stop their rents, without losing their funds.
Assessed type
Context