Skip to content

node: cheap request paths exhaust chain-RPC quota, lane storage, origin egress, and logs #2770

In review

Description

@yigitdot

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 — getPool per unseen pool id; :659-674 — getAuthorization per new (pool, signer) pair. Negative caching only blocks repeats of the same id.
  • crates/node/src/payment_settlement.rs:184 — ADMIT_CHAIN_READ_CONCURRENCY = 16 caps concurrency, not rate: ~160–800 eth_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 answer has_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 is expiry == 0; expiry = 1 or spending_cap = 0 is accepted.
  • dispatch.rs:708-712 — intake (and register_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 maps pool_store.rs:1197-1206 / mod.rs:1554-1559, plus redb).
  • Only PoolReclaimed removes lanes (payment_settlement.rs:1280-1302). Every redeemer sweep load_all()-clones all lanes (:2492-2497); every PoolToppedUp for any pool triggers a full-scan redrive_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 for byte_len = 1); :1245-1252 — try_local_populate then imports the whole blob (crates/cache/src/engine.rs:3685); the range_out_of_bounds check only runs afterwards at :1383.
  • Against an origin without .obao4 outboards 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 and max_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-1455 and :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 through WarnThrottle.
  • Route these through WarnThrottle, or demote to debug! with a counter

Activity

  1. added
    kind:security
    prio:medium
    area:node
    area:payments
    on Oct 30, 2026
  2. yigitdot commented on Nov 26, 2026

    @yigitdot
    ContributorAuthor

    Status on main (e720fbb):

    • 1. Admit-path chain reads are still bounded by concurrency only (ADMIT_CHAIN_READ_CONCURRENCY = 16, payment_settlement.rs).
    • 2. Capability intake still registers the lane before the expiry-margin refusal (crates/node/src/handlers/client/admission.rs: intake_capability, then inside_expiry_margin). There is no lane cap and no lane GC.
    • 3. Moot after feat!: origins publish all three objects; delete the whole-blob origin fallback #2922 (de9b90e), which deleted the whole-blob origin fallback and try_local_populate. Origins publish {H}, {H}.obao4 and {H}.sizeproof, so a small request no longer fills the whole blob.
    • 4. The admit getPool failure warn! (payment_settlement.rs) and the owner-verification warn! (handlers/client/mod.rs) are not throttled.
  3. moved this from Backlog to In progress in deCDNon Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodearea:paymentskind:securityprio:medium

Type

No type

Fields

Priority

None yet

Projects

  • Status
    In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions