Skip to content

node: register_lane race can roll a lane's stored frontier back to zero #2701

Closed

Description

@thiras

Source: GHSA-jr93-46mf-88wx (low bundle, internal audit at 772c8f4, re-confirmed on main).

register_lane (crates/node/src/handlers/client/mod.rs:1931-1951) checks contains_key and returns if the lane exists. Otherwise it calls pool_state_store.record(&state) before the atomic Entry::Vacant insert. The state it records is a fresh lane with amount 0, no last_signature and LaneChain::NONE (:1897-1908). PoolStore::record (crates/node/src/pool_store.rs:1219-1241) overwrites the row and keeps only registered_until, owner_sig and paid_cumulative. Two first streams on a lane can race, with one of them advancing and recording a voucher in between. The stored last_amount, signature and frontier then roll back to zero. The in-memory lane stays correct until the next record. A restart inside that window rehydrates the lane at zero, and the redeemer sees no signature.

  • Persist the zero state only from the thread that wins the Entry::Vacant insert (or make record refuse to lower the frontier)
  • Test: interleave two first-stream registrations with a voucher record; the stored frontier does not go backwards

Activity

  1. added
    kind:security
    prio:low
    area:node
    area:payments
    on Oct 28, 2026
  2. self-assigned this
    on Oct 28, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  4. moved this from In progress to Done in deCDNon Oct 28, 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:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions