Skip to content

Commit 644eddd

Browse files
authored
fix: Fix for the ASA-2025-004 vulnerability in IBC module (#419)
Resolves the "ASA-2025-004: Non-deterministic JSON Unmarshalling of IBC Acknowledgement can result in a chain halt" vulnerability, see the link below for details: GHSA-jg6f-48ff-5xrw
1 parent 4b61f34 commit 644eddd

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

app/app.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,6 @@ func LoadAndParseMergeSourceInputFiles(app *App, ctx sdk.Context, manifest *Upgr
785785
}
786786

787787
func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
788-
app.UpgradeKeeper.SetUpgradeHandler("v0.11.3", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
789-
return app.mm.RunMigrations(ctx, cfg, fromVM)
790-
})
791-
792788
app.UpgradeKeeper.SetUpgradeHandler("v0.14.0", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
793789

794790
manifest := NewUpgradeManifest()
@@ -849,6 +845,9 @@ func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
849845
return app.mm.RunMigrations(ctx, cfg, fromVM)
850846
})
851847

848+
app.UpgradeKeeper.SetUpgradeHandler("v0.14.1", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
849+
return app.mm.RunMigrations(ctx, cfg, fromVM)
850+
})
852851
}
853852

854853
// RegisterAPIRoutes registers all application module routes with the provided

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alp
139139

140140
replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.19.4
141141

142+
replace github.com/cosmos/ibc-go/v3 => github.com/fetchai/ibc-go/v3 v3.1.1-fetchai
143+
142144
// This is to add support for Ledger Nano S-Plus on linux + new macOS
143145
// usb bus device enumeration (it needs to be reiterated here, even though
144146
// it is already defined on cosmos-sdk module level):

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4
170170
github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw=
171171
github.com/cosmos/iavl v0.19.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg=
172172
github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw=
173-
github.com/cosmos/ibc-go/v3 v3.1.0 h1:aVPqkrGBluz6t9+d/sLZIG/zQ9O1KJzVeR4UlL/IFTQ=
174-
github.com/cosmos/ibc-go/v3 v3.1.0/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40=
175173
github.com/cosmos/interchain-accounts v0.1.0 h1:QmuwNsf1Hxl3P5GSGt7Z+JeuHPiZw4Z34R/038P5T6s=
176174
github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw=
177175
github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M=
@@ -231,6 +229,8 @@ github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8S
231229
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
232230
github.com/fetchai/cosmos-sdk v0.19.4 h1:guGWYaRqonYfziczEXFpBjenOb8plvEuOmthpt1RVzE=
233231
github.com/fetchai/cosmos-sdk v0.19.4/go.mod h1:xLNanYMukOhNMWoGJyy6mIZQR+Sf2sIi2Mlq0BY5rCg=
232+
github.com/fetchai/ibc-go/v3 v3.1.1-fetchai h1:cfocX7Yzd7KG94ITWTX7S4pCZwvJjBEA8kes2ULsE3I=
233+
github.com/fetchai/ibc-go/v3 v3.1.1-fetchai/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40=
234234
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
235235
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
236236
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=

0 commit comments

Comments
 (0)