FUNCTION SETBASEGAS LACKS BOUNDS CHECK AND EVENT EMIT AFFECTS TRANSFER #192
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-03-biconomy/blob/04751283f85c9fc94fb644ff2b489ec339cd9ffc/contracts/hyphen/LiquidityPool.sol#L119-L121
https://github.com/code-423n4/2022-03-biconomy/blob/04751283f85c9fc94fb644ff2b489ec339cd9ffc/contracts/hyphen/LiquidityPool.sol#L284
Vulnerability details
Impact
Executors can, unintentionally, send a huge amount of ETH
Proof of Concept
The function
setBaseGas(uint128 gas)#LiquidityPool.sol
should have bounds like MAXBASEGAS.Even worse this function lacks of event emit.
As a result, executors can call
sendFundsToUser
and send enormous amount of ETH.Tools Used
Manual code review
Recommended Mitigation Steps
Add bound checks and add an event emit
The text was updated successfully, but these errors were encountered: