Skip to content

fix(TimelockPolicy): correct ERC-7579 no-op detection encoding#48

Merged
leekt merged 1 commit intofix/tob-kernel-1from
fix/tob-kernel-18
Feb 6, 2026
Merged

fix(TimelockPolicy): correct ERC-7579 no-op detection encoding#48
leekt merged 1 commit intofix/tob-kernel-1from
fix/tob-kernel-18

Conversation

@leekt
Copy link
Contributor

@leekt leekt commented Feb 6, 2026

Summary

Fixes TOB-KERNEL-18 (Informational): No-op detection for ERC-7579 execute is inconsistent with actual encoding.

  • Offset fix: _isNoOpERC7579Execute now checks offset 64 (2 ABI head slots) instead of 32
  • Compact format fix: ERC-7579 decodeSingle uses abi.encodePacked(target, value, calldata) with no explicit length prefix. No-op detection now checks execDataLength == 52 (target 20B + value 32B, no inner calldata) instead of looking for a separate calldataLength word
  • Updated BTT tests to use correct ABI encoding and compact execution format

Audit Reference

  • Finding: TOB-KERNEL-18 — No-op detection for ERC-7579 execute is inconsistent with actual encoding
  • Severity: Informational
  • Auditor: Trail of Bits (Offchain Labs Kernel v4 Security Assessment, January 2026)

Test plan

  • Valid no-op (target=self, value=0) detected correctly
  • Valid no-op (target=address(0), value=0) detected correctly
  • Wrong offset (not 64) rejected
  • execDataLength != 52 rejected
  • execDataLength > 52 (has inner calldata) rejected
  • Wrong target rejected
  • Non-zero value rejected
  • Short calldata rejected

@leekt leekt merged commit d4c3302 into fix/tob-kernel-1 Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant