Handle Procedure Destroy Attacks
Latrasis opened this issue · 4 comments
Latrasis commented
We need to address how we prevent a malicious actor from destroying a procedure contract like so:
- Create a contract that self-destructs after being delegated
- Do a
Call
into a procedure which calls back into the malicious contract, which triggers deletion of the contract.
JakeOShannessy commented
Create a value in storage that is defined as one value in the kernel, and a different value in procedure contracts.
At the start of every procedure (before any system call or the like) the procedure should check this value. If it is not found, or it is found that the value corresponds to the procedure's own storage, the execution should revert.
JakeOShannessy commented
This also needs to be added to the verification process to ensure every procedure has it.
JakeOShannessy commented
This has been added to the spec, see #114.
Latrasis commented
@JakeOShannessy: Ok, closing this on #114 and #113.