-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unbounded field lengths #4859
Comments
MsgRegisterCounterpartyPayee
#4870
Thank you! |
technically every module in existence may have this issue, it would be good to understand why longer length cause larger amounts of computation on certain fields over others. I dont think this is limited to ibc. |
It is unfortunate that this was not addressed in a serious and rigorous manner when it was reported in October 2022, and I mention this because the reason we are scrambling does not relate to the software changes needed, but instead to a set of process-driven failures caused by the opaque ways of working and general unaccountability of the Interchain foundation, coupled with their legal threats against security researchers, and their security team's lack of good practices. Later, a chain-comber found the osmosis banana kings: https://twitter.com/web3_analyst/status/1635687287962112000 Given that Amulet has released information about a related matter direct to the public on the cosmos hub forum, I will be releasing a set of targeted mitigations that cite this issue today at midnight Bali time, which is 4PM GMT. The mitigations are available in the p2p-storms channel, as well as the validator working group on spam, and feedback from all teams is welcome, but timeline cannot be extended beyond then due to amulet's release of related information against my explicit and direct wishes. @tac0turtle can you think of a rapid way to check modules for unbounded field length, or should the suggested mitigation be to instruct authors of modules to ensure that every field has a length limitation? |
almost all fields in existence, you would need check each by hand, but this doesnt answer the question at hand, why does this tx take a long time to confirm? is it the bech32 decoding? Can we get a test case in ibc for a single message type to test what is going on here before making a bunch of length checks. the fix overall is to reduce total block sizes, there is no need to have 10mb+ blocks. That would prevent the tweet issue. I havent seen the submitted report so dont know if a test case was added, if so can you point me to a gist i can run locally to test? |
@tac0turtle can you check HackerOne? https://twitter.com/ctrl_Felix/status/1714714816625934383?t=0TTLNJYmd07vt3G52Lj2Bg&s=19 Felix mentioned that he reported this -- even before contacting me. I thought the order was the other way around though it doesn't really matter what the order is. Issues slip by and that's bad. |
Summary of Bug
In ibc-go, there are many unbounded field lengths, and in production, this can result in ibc messages that are as large as several megabytes, which are seen as valid and relayed.
Expected Behaviour
With the exception of the total size of client updates, I'm not aware of any ibc transaction that benefits from a field length of over 5kb for any field. Even if this is incorrect and we need to exceed 5kb in some places, we need to introduce bounds to fields in ibc for safety.
Version
all
Steps to Reproduce
Contact Jacob Gadikian or another Notional team member via slack for information on reproduction
fix
We should ensure that every field in IBC has a maximum length. Marko from the SDK team says that length limitations are done on a per module basis in the SDK, and so IBC should comply. We are checking internally to determine if we have time / financial resources to complete this task.
For Admin Use
The text was updated successfully, but these errors were encountered: