<!-- XE-13367 · Laporan bug · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13367>. The page is the record; this is the same page for reading.*

XE-13367 · Bounty

# Laporan bug

Closed · duplicate
—
[xe#510](https://github.com/xeprotocol/xe/issues/510)
filed 2026-11-12 16:21 UTC
by Gib230223

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:38 UTC

Told
:   2026-11-20 00:34 UTC

### Patches

- [xe#517](https://github.com/xeprotocol/xe/pull/517) open by arturbarszcz78
  fix(net,node): sanitize advertised peer features against KnownFeatureSet and cap list (fixes #510)

### History

- [554010](https://bounty.xe.network/log/554010) 2026-11-20 00:34 UTC reply.mirrored
- [553999](https://bounty.xe.network/log/553999) 2026-11-20 00:34 UTC github.state\_pushed
- [553998](https://bounty.xe.network/log/553998) 2026-11-20 00:34 UTC github.labels
- [552438](https://bounty.xe.network/log/552438) 2026-11-20 00:33 UTC proposal.adopted
- [552437](https://bounty.xe.network/log/552437) 2026-11-20 00:33 UTC reply.sent
- [552436](https://bounty.xe.network/log/552436) 2026-11-20 00:33 UTC ticket.status new → closed
- [551825](https://bounty.xe.network/log/551825) 2026-11-20 00:33 UTC proposal.adopted
- [551824](https://bounty.xe.network/log/551824) 2026-11-20 00:33 UTC ticket.facts area
- [551823](https://bounty.xe.network/log/551823) 2026-11-20 00:33 UTC proposal.adopted
- [551822](https://bounty.xe.network/log/551822) 2026-11-20 00:33 UTC ticket.facts
- [551821](https://bounty.xe.network/log/551821) 2026-11-20 00:33 UTC proposal.adopted
- [551820](https://bounty.xe.network/log/551820) 2026-11-20 00:33 UTC ticket.facts

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

### Report

# XE Bounty — Laporan siap file (temuan pass 5 #3, subagent C)

File issue baru di: https://github.com/xeprotocol/xe/issues/new
Paste judul \+ isi di bawah. Akun GitHub: Gib230223.

---

## Judul

\[Low\] DAO readiness gate trusts self-asserted peer features — a representative can push a nonexistent feature to 1000/1000 ready

## Isi

## Summary

`GET /network/readiness` is documented as "the gate the DAO reads before signing an activation". It reports delegated vote weight per *peer-advertised* feature string — but the feature list a peer advertises in the netcheck handshake is self-asserted and never validated against `core.KnownFeatures()`, and never truncated. A representative holding delegated weight can advertise a pending activation feature it does not implement and push that feature to 1000/1000 ready, while no node on the network implements it.

## Evidence

```
// net/netcheck.go:415,471 — both handshake directions store msg.Features verbatim:
gater.RecordPeerCapabilities(pid, PeerCapabilities{Version: msg.Version, Features: msg.Features})

// net/netcheck.go:354 checkPeer — validates network_id, genesis, version; never looks at Features.
func checkPeer(msg netcheckMsg, ours netcheckMsg) (reason string, banDuration time.Duration) {
    // ... network_id / genesis / version checks only ...
    return "", 0
}

// net/features.go:68-72 — maxAdvertisedFeatures=8 caps only the LOCAL list:
var LocalFeatures = sync.OnceValue(func() []string {
    f := core.KnownFeatures()
    if len(f) > maxAdvertisedFeatures { f = f[:maxAdvertisedFeatures] }
    return f
})

// node/activations.go:185 — GetReadiness sums delegated weight per advertised string, no validation:
for _, f := range c.Features {
    info.FeatureWeight[f] += w
}
// ... then FeatureReadyMilli[f] = w * 1000 / info.TotalWeight
```

```
// api/handler.go:151 — the endpoint's documented purpose:
{"GET", "/network/readiness", "Delegated vote weight by advertised version and feature — the gate the DAO reads before signing an activation", h.handleGetReadiness},
```

Note the local node's own entry is built from `core.KnownFeatures()` (`node/activations.go:165-168`) — only *remote* peers can inject invented names, which is exactly the trust boundary that is unchecked.

## Impact (Low)

A representative that already holds delegated weight can make the DAO activation gate read "ready" for a feature nobody implements — e.g. advertising a pending activation feature before any node ships it, so an activation is signed on false readiness. Severity is Low, not higher: the attacker must already be a registered representative holding delegated weight (it cannot be done by an arbitrary peer with no stake), and the consequence is a wrong gate signal, not a direct fund movement. The fix is one validation: intersect advertised features with `core.KnownFeatures()` (and cap the list length) at `RecordPeerCapabilities` or in `GetReadiness`.

## Reproduction (PoC)

Unit test, `node/poc5_readiness_test.go`, `TestPoc5ReadinessFakeFeature`, `go test ./node/ -run TestPoc5ReadinessFakeFeature -v -count=5`. It funds an account delegating \~1e16 uXE to a fresh representative, registers it in the directory, records caps with `Features: ["fake-feature-xyz", "noop"]`, and asserts that feature's readiness milli is ≥900.

Coordinator run (2026-11-12 \~23:15 WIB), 5/5 PASS (one-line compile fix applied to the PoC as written — `GenerateEd25519Key` returns priv, pub, err):

```
setup: rep 4be745caebb6 holds 10000000000000000 uXE of delegated weight
BUG: nonexistent feature 'fake-feature-xyz' reports weight=10000000000000000, ready=995/1000 (total weight=10042000000000000)
--- PASS: TestPoc5ReadinessFakeFeature (0.00s)
```

## Suggested fix

Validate advertised features at ingestion: in `RecordPeerCapabilities` (or `checkPeer`), drop any feature not in `core.KnownFeatures()` and cap the list at `maxAdvertisedFeatures`. Alternatively, filter to known features in `GetReadiness` before summing weights. Either way the DAO gate should only ever report readiness for features the build knows about.

## Novelty note

No ticket covers readiness / feature advertising. Closest, all verified: XE-1438 (QEMU/Lima VM managers "report premature SLIRP readiness" — VM guest-SSH readiness, a different subsystem and mechanism; the word "readiness" is the only overlap). GitHub live `search_issues` for readiness/feature-advertising returns 0 hits. Checked the live bounty board (High\+Medium and Minor views) and the GitHub repo issues, 2026-11-12.

Repo: github.com/xeprotocol/xe, HEAD 89a542e, testnet-0005.

### Thread

**Joseph Denne**team2026-11-20 00:34 UTCgithub

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-13367 and says what differs; it is read like any other.
