Skip to content

Commit de16a06

Browse files
aljo242alpejulienrbrt
authored andcommitted
Merge commit from fork
* Prevent empty groups (cherry picked from commit 95090a0ec1f193104ba7d6d033a490d1515e54d8) * Handle inflight proposals (cherry picked from commit 855983471882068894ed7952b592ab3e61b464b9) * No empty group with simulations * Update changelog * Set release date * updates * Update RELEASE_NOTES.md * Update RELEASE_NOTES.md --------- Co-authored-by: Alex Peters <[email protected]> Co-authored-by: Julien Robert <[email protected]>
1 parent 05863f6 commit de16a06

File tree

7 files changed

+142
-130
lines changed

7 files changed

+142
-130
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ Ref: https://keepachangelog.com/en/1.0.0/
5858

5959
## [Unreleased]
6060

61+
62+
## [v0.50.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.12) - 2025-02-20
63+
64+
### Bug Fixes
65+
66+
* [GHSA-x5vx-95h7-rv4p](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-x5vx-95h7-rv4p) Fix Group module can halt chain when handling a malicious proposal
67+
68+
69+
## [v0.50.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.11) - 2024-12-16
70+
6171
### Features
6272

6373
* (crypto/keyring) [#21653](https://github.com/cosmos/cosmos-sdk/pull/21653) New Linux-only backend that adds Linux kernel's `keyctl` support.

RELEASE_NOTES.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
# Cosmos SDK v0.50.10 Release Notes
1+
# Cosmos SDK v0.50.12 Release Notes
22

33
💬 [**Release Discussion**](https://github.com/orgs/cosmos/discussions/58)
44

55
## 🚀 Highlights
66

7-
For this month patch release of the v0.50.x line, some bugs were fixed.
7+
This patch release fixes [GHSA-x5vx-95h7-rv4p](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-x5vx-95h7-rv4p).
8+
It resolves a `x/group` module issue that can halt chain when handling a malicious proposal.
9+
Only users of the `x/group` module are affected by this issue.
810

9-
Notably, we fixed the following:
10-
11-
* Add the root command `module-hash-by-height` to query and retrieve module hashes at a specific height
12-
* `PreBlock` events (mainly `x/upgrade`) are now emitted (this time, for real)
13-
* A fix in runtime baseapp option ordering, giving issue when other modules were having options
11+
We recommended to upgrade to this patch release as soon as possible.
12+
When upgrading from <= v0.50.11, please use a chain upgrade to ensure that 2/3 of the validator power upgrade to v0.50.12.
1413

1514
## 📝 Changelog
1615

17-
Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.50.10/CHANGELOG.md) for an exhaustive list of changes, or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.50.9...v0.50.10) from the last release.
18-
19-
Refer to the [upgrading guide](https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/UPGRADING.md) when migrating from `v0.47.x` to `v0.50.1`.
20-
Note, that the next SDK release, v0.52, will not include `x/params` migration, when migrating from < v0.47, v0.50.x **or** v0.47.x, is a mandatory migration.
16+
Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.50.12/CHANGELOG.md) for an exhaustive list of changes, or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.50.11...v0.50.12) from the last release.

x/group/keeper/msg_server.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ func (k Keeper) UpdateGroupMembers(goCtx context.Context, msg *group.MsgUpdateGr
200200
return err
201201
}
202202
}
203+
// ensure that group has one or more members
204+
if totalWeight.IsZero() {
205+
return errorsmod.Wrap(errors.ErrInvalid, "group must not be empty")
206+
}
203207
// Update group in the groupTable.
204208
g.TotalWeight = totalWeight.String()
205209
g.Version++
@@ -1145,10 +1149,8 @@ func (k Keeper) validateMembers(members []group.MemberRequest) error {
11451149
if _, err := math.NewNonNegativeDecFromString(member.Weight); err != nil {
11461150
return errorsmod.Wrap(err, "weight must be non negative")
11471151
}
1148-
11491152
index[member.Address] = struct{}{}
11501153
}
1151-
11521154
return nil
11531155
}
11541156

0 commit comments

Comments
 (0)