ethereum-optimism / ethereum-optimism/optimism

Syscall argument error is silently ignored

Open
#13,442 0 comments 0 reactions 0 assignees View on GitHub
A-pkg-contracts-bedrock C-good first issue MT cannon - audit findings
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

**Description**
This alignment is a fair assumption, and probably required for C ABI compliance. But as far as defensive programming goes, it is better to fail if the address is misaligned than to silently align it.

**Recommendation**
Fail if the pointer is misaligned.

[packages/contracts-bedrock/src/cannon/MIPS64.sol](https://cantina.xyz/code/4ea41142-4359-4f62-bfaa-a542172cab5d/packages/contracts-bedrock/src/cannon/MIPS64.sol#L584)
uint64 effAddr = a1 & arch.ADDRESS_MASK;

Contributor guide

Open the contributing guide

Research direction

Start in packages/contracts-bedrock/src/cannon/MIPS64.sol at the syscall argument handling around line 584. Trace how a1 is masked with arch.ADDRESS_MASK and inspect nearby syscall logic and tests, if present. Done means a misaligned pointer causes an explicit failure instead of being silently aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.