Govshuttle module does not register its transaction MsgServer #5
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
edited-by-warden
ineligible for award
M-03
🤖_05_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
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/2024-05-canto/blob/d1d51b2293d4689f467b8b1c82bba84f8f7ea008/canto-main/x/govshuttle/module.go#L127
Vulnerability details
The
x/govshuttle
module incanto-main
defines and handles two messages that can be emitted by a governance proposal:MsgLendingMarketProposal
MsgTreasuryProposal
However, because the module only registers the
QueryServer
(and not its MsgServer) in itsRegisterServices
function,causing no message to be routed to its message server:
If we compare this with another module that can handle messages, for example CSR, we see that this is the place for
registering the
MsgServer
where transactional messages are routed to:Impact
Successful governance actions that include a
LendingMarketProposal
orTreasuryProposal
will fail to execute becauseno handler is provided for them.
Proof of Concept
To reproduce the issue it is sufficient to create and approve a proposal among the affected ones.
Tools Used
Code review
Recommended Mitigation Steps
Consider adding a
RegisterMsgServer
call in thex/govshuttle
RegisterService
callback.Assessed type
Other
The text was updated successfully, but these errors were encountered: