Skip to content

Conversation

@rootulp
Copy link
Collaborator

@rootulp rootulp commented Oct 14, 2025

Context: GHSA-hrhf-2vcr-ghch

Cherry-pick cometbft/cometbft@be5677c from upstream to celestia-core.

Note: this is for v0.38.x-celestia.

* add VaidateBasic to BitArray to ensure Bits and len(Elems) are valid

* call ValidateBasic on BitArrays when receiving as a msg from exteranl nodes

* enfore SetIndex is not setting out of bounds

* add guard to getNumTrueIndices

getNumTrueIndices will index out of bounds if Bits and Elems have a
mismatch where len(elems) != (bits+63)/64, this guard makes it simply
return 0 if this mismatch is present

* changelog

* fix missing import for v0.38.x

* update changelog for release of v0.38.19

* remove duplicate bug fixes from unreleased

* fix changelog date

* fix lint

* fix expected error string in test
@rootulp rootulp self-assigned this Oct 14, 2025
@rootulp rootulp marked this pull request as ready for review October 14, 2025 16:07
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping with this 🙏

The ABCI test can be fixed by: e28fd59

@rootulp rootulp merged commit 056ec2a into celestiaorg:v0.38.x-celestia Oct 15, 2025
22 of 25 checks passed
@rootulp rootulp deleted the rp/fix-bit-array-v0.38.x branch October 15, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants