code-423n4 / 2024-05-arbitrum-foundation-findings

1 stars 2 forks source link

Buffer Depletion Vulnerability in DelayBuffer Library #56

Closed howlbot-integration[bot] closed 1 month ago

howlbot-integration[bot] commented 1 month ago

Lines of code

https://github.com/AnasTur/2024-05-arbitrum-foundation/blob/fa413646bb4776c114234bcde97bab901f3653e0/src/bridge/DelayBuffer.sol#L33

Vulnerability details

Vulnerability:

The calcBuffer() function has a potential vulnerability in the following scenario:

This allows the malicious user to force the sequencer to process a large number of messages without having to wait the full threshold time.

Exploitation:

  1. Submit a batch of messages with a delay greater than the threshold.
  2. Monitor the delay buffer and note the amount it is depleted.
  3. Submit another batch of messages with the same delay.
  4. The calcBuffer() function will again deplete the buffer by the amount of the delay, even though only a portion of the messages in the second batch are actually delayed.
  5. Repeat steps 3 and 4 until the sequencer runs out of buffer space.

Impact:

Mitigation:

Assessed type

Timing

c4-sponsor commented 1 month ago

gzeoneth (sponsor) disputed

gzeoneth commented 1 month ago

Unclear POC, misconfiguration is out-of-scope

c4-judge commented 1 month ago

Picodes marked the issue as unsatisfactory: Insufficient proof