The contractInteractions function in the InheritanceManager contract fails to update the inactivity deadline, unlike other owner-controlled functions like sendETH and sendERC20. This critical omission allows beneficiaries to trigger inheritance even when the owner is actively using the contract, potentially leading to unauthorized asset distribution.
The InheritanceManager contract implements an inactivity-based inheritance system where beneficiaries can claim assets after 90 days of owner inactivity. To track activity, owner-controlled functions should call _setDeadline() to reset this timer. However, the contractInteractions function lacks this critical call
this is unlike other owner functions for ex sentEth. This omission creates an inconsistent security model where some owner interactions reset the inactivity timer while others don't.
Basically this function contractInteractions plays as 'escape hedge'. Owner could do everyhting outlined in the contract, i.e. call every function in the contract and just avoid setting of deadlines _setDeadline, for same functionality
The impact is severe:
Unauthorized Access: An owner who primarily uses the contractInteractions function (which is the most flexible function for interacting with external protocols) may have their assets claimed by beneficiaries despite being active.
Premature Inheritance: Beneficiaries can trigger inheritance after 90 days from the last call to a function that properly updates the deadline, even if the owner has been actively using contractInteractions during that time.
Asset Loss: All contract assets could be distributed to beneficiaries while the owner is still actively managing the contract.
Trust Violation: The core security assumption of the contract (that inheritance only triggers after genuine owner inactivity) is broken.
This function lacks many guard rails validations and could be used for dangeorus code interactions.
Some scenarios might be explored where external selfdesctuct is being interacted with the call in contractInteractionsreturns true and then this results in inaccurate date reference -
Manual code review
Foundry testing framework
Add deadline update call - modify the contractInteractions function to include the _setDeadline() call
or
create a modifier:
and attach to owner-controlled functions. Note as part of optimized design setDedline might be done in the beginning prior function execution.
PoC:
In the test testContractInteractionsVsSendETH we show no deadline update is being triggered for the same action as sendEth.
testOwnerSwitchesToContractInteractionsScenario shows owner is active but beneficiary is inheriting.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.