Skip to content

fix: add missing QuerySequence case to socket client resMatchesReq (backport #2844)#2937

Merged
rootulp merged 2 commits intov0.39.x-celestiafrom
mergify/bp/v0.39.x-celestia/pr-2844
Apr 17, 2026
Merged

fix: add missing QuerySequence case to socket client resMatchesReq (backport #2844)#2937
rootulp merged 2 commits intov0.39.x-celestiafrom
mergify/bp/v0.39.x-celestia/pr-2844

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Apr 16, 2026

Summary

  • The resMatchesReq function in the socket ABCI client (abci/client/socket_client.go) was missing a case for Request_QuerySequenceResponse_QuerySequence. When QuerySequence was called over the socket transport, the client treated the valid response as "unexpected", stopped itself with an error, and killTMOnClientError terminated the node process.
  • This was reported via the Hacken bug bounty program as a remote DoS vector: a peer sends a SeenTx message with a non-empty Signer, the CAT reactor calls querySequenceFromApplication, which triggers the bug over the socket transport.
  • Real-world impact is low because celestia-app (and Cosmos SDK apps in general) use the in-process local ABCI client, not the socket transport. The local client calls QuerySequence directly and is unaffected.
  • The fix adds the missing case to resMatchesReq. A regression test (TestQuerySequenceCrashesSocketClient) is included.

Test plan

  • TestQuerySequenceCrashesSocketClient — calls QuerySequence over the socket transport and verifies the client remains healthy
  • Existing socket client tests still pass (go test ./abci/client/...)

🤖 Generated with Claude Code


Open with Devin
This is an automatic backport of pull request #2844 done by [Mergify](https://mergify.com).
Open with Devin

…2844)

## Summary

- The `resMatchesReq` function in the socket ABCI client
(`abci/client/socket_client.go`) was missing a case for
`Request_QuerySequence` ↔ `Response_QuerySequence`. When `QuerySequence`
was called over the socket transport, the client treated the valid
response as "unexpected", stopped itself with an error, and
`killTMOnClientError` terminated the node process.
- This was reported via the Hacken bug bounty program as a remote DoS
vector: a peer sends a `SeenTx` message with a non-empty `Signer`, the
CAT reactor calls `querySequenceFromApplication`, which triggers the bug
over the socket transport.
- **Real-world impact is low** because celestia-app (and Cosmos SDK apps
in general) use the in-process local ABCI client, not the socket
transport. The local client calls `QuerySequence` directly and is
unaffected.
- The fix adds the missing case to `resMatchesReq`. A regression test
(`TestQuerySequenceCrashesSocketClient`) is included.

## Test plan

- [x] `TestQuerySequenceCrashesSocketClient` — calls `QuerySequence`
over the socket transport and verifies the client remains healthy
- [ ] Existing socket client tests still pass (`go test
./abci/client/...`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->

---

<a
href="https://app.devin.ai/review/celestiaorg/celestia-core/pull/2844"
target="_blank">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
  </picture>
</a>
<!-- devin-review-badge-end -->

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit d87f7d7)
devin-ai-integration[bot]

This comment was marked as resolved.

@rootulp rootulp self-assigned this Apr 17, 2026
@rootulp rootulp merged commit 04078d2 into v0.39.x-celestia Apr 17, 2026
27 of 28 checks passed
@rootulp rootulp deleted the mergify/bp/v0.39.x-celestia/pr-2844 branch April 17, 2026 15:57
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.

2 participants