Skip to content

PaymentPool/node: any EOA can land a signer registration with no event, and a live lane is never clamped to it #2839

Description

@altanoruc

Source: security review at b5e29ae (2026-11-05). Each claim below was re-read on disk by independent verifiers.

redeemMany registers every CapabilityReg before any voucher work (contracts/src/PaymentPool.sol:596-599), and the payee gate runs only inside if (totalPaid != 0) (:641-647). A capability-only batch from any EOA therefore registers (poolId, signer). _registerCapability (:822) is write-once and emits no event.

On the node:

  • admission reads getAuthorization once (crates/node/src/handlers/client/dispatch.rs:663);
  • clamp_lane_to_registration (crates/node/src/handlers/client/mod.rs:2378) runs only at admission (dispatch.rs:733);
  • mid-stream, signer_cap_drained_midstream (mod.rs:2066) compares the lane's presented cap against signer_spent_cached (crates/node/src/payment_settlement.rs:1545), which never re-reads the chain.

A pool owner can sign a wide capability and a 1 µUSDC (or near-expiry) capability for the same signer, open streams on the wide one, and then land the narrow one itself. Every stream admitted before the registration, or within UNREGISTERED_AUTH_TTL (1 min) after it, runs to the end of its blob, and its vouchers redeem for 1 µUSDC or nothing.

ADR 003 § Residuals ("Two capabilities for an unregistered signer") leaves this window undecided, assuming a race between two providers. It does not consider the owner landing the registration alone, unbonded and with no event. Related: #2697.

  • Run the payee gate for any batch that carries a CapabilityReg (update _primeLanes in PaymentPool.t.sol)
  • Emit CapabilityRegistered(poolId, signer, cap, expiry) and fold it, so cached authorizations lapse
  • Re-read authorization on the mid-stream cadence for lanes with registered_until == 0, and clamp the live lane
  • Decide the ADR 003 residual

Activity

  1. added
    kind:security
    prio:medium
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. added
    area:contracts
    area:node
    area:payments
    on Nov 5, 2026
  4. moved this from Backlog to In progress in deCDNon Nov 25, 2026
  5. moved this from In progress to Done in deCDNon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:contractsarea:nodearea:paymentskind:securityprio:medium

    Type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions