node/certs: no global retention cap — free self-signed identities defeat the per-provider limit (store and boot-RAM exhaustion)
Report
Summary
Performance certificates are self-signed and Provider is derived from the signer key, so an attacker can mint a fresh free identity per certificate. Retention is capped only per provider (256) and there is no global ceiling: the certSet.len() helper has no callers. Every accepted certificate is persisted and re-loaded into RAM at boot, and certificate ingestion is registered outside the isProvider gate, so validators and observers accumulate them too.
Affected code
| Location | Fact |
|---|---|
perf/certificate.go:156-197 |
VerifyCertificateContent: hash, signature, Provider↔ProviderPubKey, Score > 0, workload version, Puzzles, 64-hex CPUHash, multiplier ∈ [500,10000]. No length bound on Seed/WorkProof/merkle roots, no expiry check |
net/gossip_validate.go:160-176 |
topic validator calls VerifyCertificateContent only |
net/gossip.go:25,27,42 |
topic xe/certificates, MaxGossipMessageSize = 262144 |
node/certset.go:10,36-54 |
certRetentionPerProvider = 256, applied per cert.Provider |
node/certset.go:102-106 |
len() defined, never called |
node/perf.go:329-337 |
handleCertificateGossip → ingestCertificate |
node/perf.go:358-377 |
retainCertificate persists every accepted cert; DeleteCertificate only for per-provider evictions |
node/perf.go:379-404 |
loadPersistedCertificates loads all persisted certs into RAM at boot |
node/node.go:515-567 vs 578-581 |
if n.isProvider { … } ends at 567; handleCertificateGossip, loadPersistedCertificates() and SetupCertSync are outside it |
net/certsync.go:23,27-33,41-60 |
pull capped at 256 certs / 64 KiB per response, on connect and every 2 minutes |
Reproduction
- Generate a new ed25519 key per certificate so
Providerdiffers each time. - Sign the certificate with that key;
VerifyCertificateContentaccepts it. No length bound rejects a largeSeed/WorkProof. - Publish it on
xe/certificates(256 KiB message ceiling; there is no per-peer limiter on this topic — the message limiter covers/xe/msg, cf. #41/#47). - Observe
byHash/byProvidergrowth with zero evictions: each certificate belongs to its own provider, so thelen(list) >= 256test never becomes true. - Restart the node:
loadPersistedCertificatesallocates the entire accumulated set.
Impact
Remote, unauthenticated, zero-cost, persistent across restarts. Badger storage and boot-time RAM grow without bound on every node that subscribes to certificates, including non-provider nodes. At sufficient volume the node OOMs at startup and stays down until the store is cleaned manually.
Suggested fix
Add a global cap with TTL/LRU eviction across providers; rate-limit certificate ingest per peer on the topic; bound Seed/WorkProof/merkle-root lengths in VerifyCertificateContent; gate certificate ingest to explicit provider/observer roles instead of every node.
Notes
- Duplicate check: checked issues — no duplicate as of 2026-11-11 (closest: #366 cert-sync truncation, #259/#260 expired-certificate propagation, #354 emission multiplier, #6 forged score/expiry, #97/#120 stale certificate on renew; none concerns unbounded retention or the absent global cap).
- Evidence status: code-level only (line references above); no runtime OOM was produced on the live testnet.
- XE Address for Reward:
b83e7e31358b8c1e1509de6cd34e7540425eb17a190e48b486909df11080033d
Reward address updated to the official desk-bound address.
Thread
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-13263 and says what differs; it is read like any other.