Skip to content

fix(blocksync): backport upstream PR #5863 (v0.38.x)#58

Draft
UnbornAztecKing wants to merge 4 commits into
dydx-fork-v0.38.5from
sec-79/backport-pr5860
Draft

fix(blocksync): backport upstream PR #5863 (v0.38.x)#58
UnbornAztecKing wants to merge 4 commits into
dydx-fork-v0.38.5from
sec-79/backport-pr5860

Conversation

@UnbornAztecKing

Copy link
Copy Markdown

Backport of upstream cometbft#5863 onto the dydxprotocol fork.

Cherry-pick provenance: git cherry-pick -m 1 35ffa9673 from upstream/v0.38.x.

Upstream: cometbft#5860 (original), cometbft#5863 (v0.38.x backport).

Tests: go test ./blocksync/... ./p2p/... -race — all pass.

…t (backport cometbft#5860) (cometbft#5863)

---

Adds additional validation to blocksync, ensuring _before response
unmarshalling_ that we have made a `BlockRequest` to the peer that is
sending us a `BlockResponse` recently, and also that the response
contains a valid amount of commit signatures (not > MaxVoteCount). To do
this preunmarshal validation, we have added a `MsgBytesFilter` interface
that `Reactors` can implement. Currently only `BLOCKSYNC` does. The
`FilterMsgBytes` function is called for both comet P2P and libp2p
implementations, inside of the `onReceive` function when setting up a
peer for comet p2p, and inside of `handleStream` for libp2p, just before
unmarshalling the message in both.

- [x] Tests written/updated
- [x] Changelog entry added in `CHANGELOG.md`
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request cometbft#5860 done by
[Mergify](https://mergify.com).
@dydxprotocol dydxprotocol deleted a comment from linear-code Bot Jun 8, 2026
Fixes govulncheck failures GO-2026-5026, GO-2026-4918 (x/net), and
GO-2026-4910 (go-git) which were pre-existing in the base branch.
@linear-code

linear-code Bot commented Jun 8, 2026

Copy link
Copy Markdown

SEC-77

@wiz-55df730c58

wiz-55df730c58 Bot commented Jun 8, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 8 High 4 Medium 1 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 High 5 Medium 1 Low 2 Info
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 9 High 9 Medium 2 Low 2 Info

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Bump google.golang.org/grpc to v1.71.0 (GO-2026-4762) and
cosmossdk.io/x/tx to v1.1.0 (GO-2024-3339).

Fix pre-existing non-constant format string issues in libs/os/os.go
and types/validator_set_test.go that become compile errors under the
Go 1.25 toolchain (auto-selected via x/tools upgrade).
…ile to Go 1.25

- google.golang.org/grpc v1.71.0 → v1.79.3 (GO-2026-4762 fixed in v1.79.3)
- github.com/cosmos/cosmos-sdk v0.50.4 → v0.50.11 (GO-2024-3339 call path via libs/log)
- btcd v2.3.4 API: ecdsa.SignCompact no longer returns error; update secp256k1.go
- test/e2e/docker/Dockerfile: golang:1.21-bullseye → golang:1.25-bullseye (go.mod requires go 1.25.0)
@UnbornAztecKing UnbornAztecKing requested a review from tqin7 June 9, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants