Daohub-io/cap9

Handle Procedure Destroy Attacks

Latrasis opened this issue · 4 comments

We need to address how we prevent a malicious actor from destroying a procedure contract like so:

  1. Create a contract that self-destructs after being delegated
  2. Do a Call into a procedure which calls back into the malicious contract, which triggers deletion of the contract.

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.

This also needs to be added to the verification process to ensure every procedure has it.

This has been added to the spec, see #114.

@JakeOShannessy: Ok, closing this on #114 and #113.