Do not emit events upon ack status failure #1324
Labels
A: bug
Admin: something isn't working
O: security
Objective: aims to enhance security and improve safety
Milestone
Bug Summary
Amulet alerted us to a security report regarding a vulnerability that is similar in nature to the ibc-go Huckleberry vulnerability. We should address the cause(s) of the vulnerability in ibc-rs and communicate with Amulet once the issue has been resolved satisfactorily.
To be clear, ibc-rs's application implementations, ics20 and ics721, are safe from this vulnerability, since those implementations always return
ModuleExtras::Empty()
upon failure in thepacket_recv
flow. The main issue to be addressed here is more to do with limiting the impact on downstream implementors.Details
From the security report we received, upon a failed acknowledgment receipt, ibc-rs will still emit events unconditionally, potentially for transfers / deposits that failed where no events should be emitted at all.
@rnbguy's analysis points to this line as being the possible main culprit:
where upon an error being encountered in the logic for handling the execution of transfers, this function could still potentially emit events in the form of
extras
when it shouldn't.Per Rano's suggestion, this line should be changed to
to ensure that no extraneous events are emitted when an
AcknowledgmentStatus::error
is encountered.Once this issue has been addressed in the ibc-rs codebase, the projects that have thus far integrated ibc-rs should be contacted about the possible impact towards them.
Version
ibc-rs v0.54.0 and older
The text was updated successfully, but these errors were encountered: