fix: verify gossiped tx proposer signature before mempool entry#1312
Open
0xMayoor wants to merge 1 commit into
Open
fix: verify gossiped tx proposer signature before mempool entry#13120xMayoor wants to merge 1 commit into
0xMayoor wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HandleGossipNonce(server.go:560) doesRecoverAddress+ slot-owner match before storing. the siblingHandleGossipTxs(server.go:584) doesn't — txs land viaOnTxsReceived→mempool.AddTxwith only a sender-membership check.a byzantine group member POSTs a forged
MsgValidationVote{InferenceId: target, VoterSlot: <victim's own slot>, ProposerSig: garbage}. it passes membership auth, enters the victim's mempool, and the victim'scollectValidationJobs(host.go:775) callshasMempoolValidationOrVotewhich trips purely on slot match — no proposer-sig check. the host skips its honest validation for that inference. same shape forMsgRevealSeedviamaybeRevealSeed's early-return athost.go:675-677.never evicted: bad-sig tx never applies (
applyValidationVotemachine.go:862rejects viaverifyProposerSig), somempool.RemoveIncludednever sees it; persists for the whole session.restricting gossip to group members doesn't close this — the route is already members-only. a byzantine member passes auth and still serves a forged inner tx. orthogonal to content verification.
Fix: add
StateMachine.VerifyGossipedTxmirroring the existing per-txverifyProposerSigcalls inapplyValidation,applyValidationVote,applyRevealSeed. expose aHost.VerifyGossipedTxwrapper. filter at ingestion inHandleGossipTxs(server.go:584) — drop bad-sig txs before passing toOnTxsReceived, same shape asHandleGossipNonce. regression ingossip_tx_verify_test.gowith reject-forged + accept-valid pairs for each of the three affected tx kinds, plus unknown-slot and pass-through-other-kinds guards.related: #1311 (same class on the
GET /sessions/:id/signaturespath), both introduced by #1284.