Skip to content

Sequencer suffers from TOCTOU issues #1318

@SuperFluffy

Description

@SuperFluffy

Bug found by auditors:

Due to the way action handling is done, unexpected behaviors can be noted.

a transactions action's stateful checks are ran together in parallel. Then the actions are executed.

Action 1 -> check_stateful()
Action 2 -> check_stateful()
...
Action 1 -> Execute()
Action 2 -> Execute()

This means that certain actions could have unforseen consequences. Imagine 2 BridgeSudoChangeAction actions which have been bundled into 1 tx, they would both execute even if the first action changes the sudo address because the stateful checks of both actions are executed before the execute

    async fn check_stateless(&self) -> anyhow::Result<()> {
        ensure!(!self.actions.is_empty(), "must have at least one action");

        for action in &self.actions {
            match action {

┆Issue Number: ENG-666

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingsequencerpertaining to the astria-sequencer crate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions