[M2] Incomplete reentrancy protection of submitAndDeposit()
#360
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
question
Further information is requested
Lines of code
https://github.com/code-423n4/2022-09-frax/blob/55ea6b1ef3857a277e2f47d42029bc0f3d6f9173/src/frxETHMinter.sol#L70
Vulnerability details
Impact
Risk of reentrancy in
submitAndDeposit
function.PoC
I see that you added the non reentrant modifier to the internal function
_submit()
.The problem with this is that you are not protecting some parts of the function
submitAndDeposit()
In this case if
sfrxETHToken.deposit(msg.value, recipient);
it could reenter depending on implementation (actually we only have access to interfaceIsfrxETH
)In any case it is better to add reentrant modifier to every external function that you want to protect.
Recommended
Remove
nonReentrant
modifier from_submit()
and add it to every function that uses itThe text was updated successfully, but these errors were encountered: