<!-- XE-10141 · Consensus Sync Goroutine Amplification: pullConflictVotes lacks concurrency semaphore causing network socket and goroutine explosion · testnet -->
*Markdown view of <https://bounty.xe.network/XE-10141>. The page is the record; this is the same page for reading.*

XE-10141 · Bounty

# Consensus Sync Goroutine Amplification: pullConflictVotes lacks concurrency semaphore causing network socket and goroutine explosion

Closed · duplicate
—
web
filed 2026-11-12 10:15 UTC
by xe:e4cd6974

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:33 UTC

Told
:   2026-11-20 00:33 UTC

### Patches

None linked.

### History

- [552587](https://bounty.xe.network/log/552587) 2026-11-20 00:33 UTC proposal.adopted
- [552586](https://bounty.xe.network/log/552586) 2026-11-20 00:33 UTC reply.sent
- [552585](https://bounty.xe.network/log/552585) 2026-11-20 00:33 UTC ticket.status new → closed
- [552001](https://bounty.xe.network/log/552001) 2026-11-20 00:33 UTC proposal.adopted
- [552000](https://bounty.xe.network/log/552000) 2026-11-20 00:33 UTC ticket.facts area
- [551999](https://bounty.xe.network/log/551999) 2026-11-20 00:33 UTC proposal.adopted
- [551998](https://bounty.xe.network/log/551998) 2026-11-20 00:33 UTC ticket.facts
- [551997](https://bounty.xe.network/log/551997) 2026-11-20 00:33 UTC proposal.adopted
- [551996](https://bounty.xe.network/log/551996) 2026-11-20 00:33 UTC ticket.facts
- [550957](https://bounty.xe.network/log/550957) 2026-11-20 00:31 UTC note.added
- [550955](https://bounty.xe.network/log/550955) 2026-11-20 00:31 UTC proposal.created
- [550954](https://bounty.xe.network/log/550954) 2026-11-20 00:31 UTC proposal.created

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

### Report

## Vulnerability Summary

In `node/node.go:909-924`, `pullConflictVotes` is wired to `QuorumManager.VotePullFn` to synchronize votes for unresolved consensus conflicts:

```
func (n *Node) pullConflictVotes(account, previous string) {
	if account == "" {
		return
	}
	n.wg.Add(1)
	go func() {
		defer n.wg.Done()
		peers := n.Host.Network().Peers()
		if len(peers) == 0 {
			return
		}
		if xenet.PullVotes(n.ctx, n.Msg, peers, account, previous, n.VoteMgr.ReceiveVote) > 0 {
			n.syncTracker.MarkDirty()
		}
	}()
}
```

Compare this with `pullFrontierVotes` (lines 926-949) which strictly guards concurrency using a bounded semaphore channel:

```
	select {
	case n.pullSem <- struct{}{}:
	default:
		return false
	}
```

In `pullConflictVotes`:

1. Zero Concurrency Limit: No semaphore channel or rate limiter guards execution.
2. High Execution Latency: `xenet.PullVotes` (`net/votesync.go:40-66`) loops through all connected peers sequentially:

   ```
   for _, pid := range peers {
       reqCtx, cancel := context.WithTimeout(ctx, votePullTimeout) // 10s per peer
       raw, err := msg.Request(reqCtx, pid, VoteRequestMsgType, ...)
   ```

   For a node connected to 30-50 peers, a single `PullVotes` execution can block for several minutes.
3. Rapid Invocation from Sweep Loop: In `core/quorum.go:570-573`, `sweepOpenConflicts()` invokes `VotePullFn` on every sweep interval for each open conflict in the store.

When an attacker introduces multiple concurrent conflict forks or network partitions cause unresolved conflicts, `pullConflictVotes` spawns hundreds of concurrent long-lived goroutines. Each goroutine opens sequential libp2p streams to every peer in the network, creating massive P2P connection amplification, socket exhaustion (`EMFILE`), and node memory starvation.

## Proposed Remediation

Apply bounded concurrency to `pullConflictVotes` using the existing `n.pullSem` or a dedicated conflict pull semaphore:

```
func (n *Node) pullConflictVotes(account, previous string) {
	if account == "" {
		return
	}
	select {
	case n.pullSem <- struct{}{}:
	default:
		return // Do not spawn goroutine if worker pool is saturated
	}
	n.wg.Add(1)
	go func() {
		defer n.wg.Done()
		defer func() { <-n.pullSem }()
		...
	}()
}
```

### Thread

**Joseph Denne**team2026-11-20 00:33 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-10141 and says what differs; it is read like any other.
