sherlock-audit / 2024-08-winnables-raffles-judging

6 stars 2 forks source link

Vast Pastel Trout - BaseCCIPReceiver will return the error InvalidRouter with wrong data #634

Closed sherlock-admin4 closed 3 months ago

sherlock-admin4 commented 3 months ago

Vast Pastel Trout

Low/Info

BaseCCIPReceiver will return the error InvalidRouter with wrong data

Summary

The modifier onlyRouter returns the error InvalidRouter(address router) with the wrong address set. The error states the address included is the router, but the modifier emits the msg sender.

Root Cause

In BaseCCIPReceiver.sol:15 the modifier reverts with revert InvalidRouter(msg.sender);.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

In BaseCCIPReceiver.sol:15 the modifier should be updated to revert with revert InvalidRouter(CCIP_ROUTER);.