Repository navigation
In review
Labels
area:nodedecdn-node daemon: runtime, handlers, admin RPC, serve patharea:paymentsPools, vouchers, redeem, reclaim, staking (incentive crate and chain)kind:securitySecurity impact; report a vulnerability to [email protected], not hereprio:mediumScheduled
Description
Four resource-exhaustion paths on the cdn/client/v1 admission/serve pipeline. All are reachable with free identities (NodeIds cost nothing).
1. Unauthenticated admit-path chain reads burn the RPC quota and trip the chain-stale gate
crates/node/src/handlers/client/dispatch.rs:550-560— a self-signed binding passes the unbound-request gate;:622-625—getPoolper unseen pool id;:659-674—getAuthorizationper new (pool, signer) pair. Negative caching only blocks repeats of the same id.crates/node/src/payment_settlement.rs:184—ADMIT_CHAIN_READ_CONCURRENCY = 16caps concurrency, not rate: ~160–800eth_call/s sustained.- A flood of fresh random signers/pool ids saturates the provider's quota (HTTP 429). The chain watchers share the endpoint; after
chain_staleness_grace_sec(default 1800 s) the stale-chain gate (dispatch.rs:480-488) refuses every stream and probes answerhas_blob:false. Honest new signers also hit the 5 s slot wait (PoolUnconfirmed). - Token-bucket limit on admit-path chain reads, global and per peer
- Separate RPC budget (or endpoint) for the watchers vs serve admission
2. Unbounded lane registration: lanes are registered before refusal and never garbage-collected
crates/node/src/handlers/client/mod.rs:1845— intake's only expiry check isexpiry == 0;expiry = 1orspending_cap = 0is accepted.dispatch.rs:708-712— intake (andregister_lane,mod.rs:1960-1987, no per-pool or global cap) runs before the expiry-margin refusal at:758-770, so a refused request still registers a persistent lane (in-memory mapspool_store.rs:1197-1206/mod.rs:1554-1559, plus redb).- Only
PoolReclaimedremoves lanes (payment_settlement.rs:1280-1302). Every redeemer sweepload_all()-clones all lanes (:2492-2497); everyPoolToppedUpfor any pool triggers a full-scanredrive_pool_lanes(:944,:1262-1275) inline in the shared poller sink, delaying the blacklist and slash routes. - A malicious owner of one cheap pool signs a fresh signer per request client-side: ~8.6M lanes/day/peer at the default rate limit → unbounded memory and disk, slow sweeps and restarts.
- (node: separate the expired-capability refusal at admission, meter capability intake drops, add a wire-level intake test #2631 covers only the refusal's outcome label and intake metrics, not this.)
- Refuse expired/inside-margin capabilities before registering; register only after the floor/solvency gates pass
- Cap lanes per pool and per signer; GC lanes that never carried a voucher
- Index lanes by pool so re-drives stop scanning everything
3. Tiny or out-of-range requests trigger whole-blob origin fills before the bounds check
dispatch.rs:1081-1087— the pre-spend reservation is sized to the requested aligned span (16 KiB forbyte_len = 1);:1245-1252—try_local_populatethen imports the whole blob (crates/cache/src/engine.rs:3685); therange_out_of_boundscheck only runs afterwards at:1383.- Against an origin without
.obao4outboards or range support (a plain HTTP/S3 origin), each[0,1)or past-the-end request costs the node up to the full blob (bounded by the populate timeout andmax_blob_size) in origin egress and disk churn while the client pays ~nothing. - Refuse out-of-bounds ranges before any fill
- Size the reservation by the blob size the origin reports when a whole-blob fallback fill would run, or skip the whole-blob tier for small ranges
4. Peer-triggerable warn! lines with no throttle
crates/node/src/handlers/client/mod.rs:1877-1887(owner-verification-failed fires per request, including on cache hits),payment_settlement.rs:1449-1455and:1618-1624(per admit-read fault — floods during item 1),voucher.rs:1076-1084(zero-amount sealed voucher on a fresh lane). Every other peer-triggerable warning in the handler goes throughWarnThrottle.- Route these through
WarnThrottle, or demote todebug!with a counter
Metadata
Metadata
Assignees
Labels
area:nodedecdn-node daemon: runtime, handlers, admin RPC, serve patharea:paymentsPools, vouchers, redeem, reclaim, staking (incentive crate and chain)kind:securitySecurity impact; report a vulnerability to [email protected], not hereprio:mediumScheduled
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsIn progress
Activity
yigitdot commentedon Nov 26, 2026
Status on
main(e720fbb):ADMIT_CHAIN_READ_CONCURRENCY = 16,payment_settlement.rs).crates/node/src/handlers/client/admission.rs:intake_capability, theninside_expiry_margin). There is no lane cap and no lane GC.try_local_populate. Origins publish{H},{H}.obao4and{H}.sizeproof, so a small request no longer fills the whole blob.getPoolfailurewarn!(payment_settlement.rs) and the owner-verificationwarn!(handlers/client/mod.rs) are not throttled.fix(node): refuse an expiring capability before registering its lane
fix(node): refuse an expiring capability before registering its lane (#…