Trail of Bits

Offchain Arbitrum Challenge v2

Type

Security review

Client

Offchain Labs

Date

2023-08

Domain

Blockchain

Effort

20 wks

Section

Offchain Labs

Trail of Bits's security review of Offchain Labs (Aug 2023) identified 34 issues: 8 high, 6 medium, 5 low, 13 informational, and 2 undetermined.

Findings · 34

  1. 1 Go Root function does not check for an empty Merkle expansion Medium
  2. 2 Go Root function does not accept Merkle expansion of MAX_LEVEL length High
  3. 3 NewHistoryCommitment does not validate height Undetermined
  4. 4 Unused errors Informational
  5. 5 GeneratePrefixProof does not work in some cases High
  6. 6 Divergence in VerifyPrefixProof error handling Informational
  7. 7 Missing validation in Golang’s GeneratePrefixProof function Low
  8. 8 Substantial amount of code duplication Informational
  9. 9 Consider implementing “sanity checks” as assertions Informational
  10. 10 Allow one-step proofs for length one SmallStep-type unrivaled edges Informational
  11. 11 Incorrect state transition in edgeAtOneStepProof Medium
  12. 12 Lack of a terminal state Informational
  13. 13 Possibly unnecessary state transition Informational
  14. 14 Possible state transitions never happen Informational
  15. 15 Consider failing early to minimize the impact of griefing attacks Undetermined
  16. 16 Presumptive edge tracker never reaches confirmation High
  17. 17 Front-running a validator can trigger a denial of service High
  18. 18 *LevelZeroEdge snapshots are not updated High
  19. 19 Claimed edge’s timer of a BigStep edge is counted twice Medium
  20. 20 Top level assertion timer not included in honest path timer calculation High
  21. 21 Incorrect input parameter used to get the unrivaled time of the honest top level assertion High
  22. 22 The earliestCreatedRivalBlockNumber function can be optimized to reduce looping Informational
  23. 23 The localTimer function can be optimized to reduce computation Informational
  24. 24 Remove honest nodes from the mutual ids map Informational
  25. 25 Unsafe Uint64 operation for block number Low
  26. 26 Watcher could miss edges validated by time Medium
  27. 27 Possible nil deref when getting a top level assertion Low
  28. 28 Discrepancy between on and off-chain confirmation timers Medium
  29. 29 Front-running certain validator operations leads to honest edges not being tracked High
  30. 30 Consider adding an EdgeAwaitingConfirmation state to avoid unnecessary computation Medium
  31. 31 Unclear code comment regarding the ability to disable and enable staking Informational
  32. 32 Validate the withdrawn amount by a staker is greater than zero Low
  33. 33 Consider deleting the staker when their stake is reduced to zero Low
  34. 34 Initial assertion’s status is not confirmed Informational

Findings extracted from the published report PDF. See the full report below for details and remediation.

Related