bank.SendKeeper breaks intended least authority permissioning #2887
Closed
Description
opened on Nov 22, 2018
bank.SendKeeper
is intended only to allow transfers of coins between accounts, but in fact it allows arbitrary minting or burning of coins with keeper.inputOutputCoins
, because the invariant inputs.Sum() == outputs.Sum()
is only checked in ValidateBasic()
on bank.MsgSend
. Modules which are passed a bank.SendKeeper
have just as much power as modules which are passed the full bank.BaseKeeper
.
Recommended mitigation: remove inputOutputCoins
from the sendKeeper
(it isn't used in any other modules presently).
Alternative mitigation: repeat the necessary validation, which is very inexpensive, in the keeper.
Activity