code-423n4 / 2023-10-zksync-findings

4 stars 0 forks source link

ZkSync Does Not Work With Anonymous Events #1071

Closed c4-submissions closed 12 months ago

c4-submissions commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-10-zksync/blob/main/code/system-contracts/test/EventWriter.spec.ts#L40

Vulnerability details

Impact

EventWriter.yul does not work with anonymous events. This could cause EVM compatibility issues when using innocent Solidity code and leads to unexpected behavior. "Known differences from Ethereum" does not say anything about not having the capabilities to work with anonymous events.

This unexpected behavior caused by anonymous events can be seen in the EventWriter test. By removing the .skip and running the test it will fail.

Tools Used

Manual

Recommended Mitigation Steps

Consider adding additional functionality to EventWriter.yul to be able to handle anonymous events. In the meantime, add more details to Known differences from Ethereum around not being compatible with anonymous events.

Assessed type

Other

c4-pre-sort commented 1 year ago

bytes032 marked the issue as low quality report

miladpiri commented 1 year ago

Invalid. Proof that it works:

c4-sponsor commented 1 year ago

miladpiri (sponsor) disputed

c4-judge commented 12 months ago

GalloDaSballo marked the issue as unsatisfactory: Invalid