Skip to content

node: capability intake stores the owner signature's raw recovery byte, so a v=0/1 capability reverts every redeemMany batch it joins #2835

Closed

Description

@altanoruc

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

intake_capability parses owner_signature with alloy::primitives::Signature::from_raw (crates/node/src/handlers/client/mod.rs:2203). That accepts recovery bytes 0, 1, 27, 28 and 35 and above, and recovers the correct owner for 0 and 1, so intake accepts the capability. It then stores the raw wire bytes, lane.owner_sig = Some(sig_bytes) (:2280), not the canonical signature.as_bytes() (27/28).

Settlement forwards those bytes verbatim as CapabilityReg.ownerSig (crates/node/src/payment_settlement.rs:2308) on every sweep until the registration lands. On chain, ECDSA.tryRecover(digest, ownerSig) (contracts/src/PaymentPool.sol:844) fails for v ∉ {27, 28}, and the ERC-1271 fallback fails for an EOA owner, so InvalidCapabilitySignature reverts the whole redeemMany.

chunk_redemptions packs all planned lanes into a few chunks. A reverted chunk is only logged and left for retry (payment_settlement.rs:2654-2665); the halve-and-retry applies only to oversize sends. One such lane therefore reverts its chunk on every sweep until its capability expires (the expiry is owner-chosen) or the pool is reclaimed. A pool owner needs one capability and one voucher.

Same family as #836 (high-s): an off-chain accept set that is wider than the chain's. A scratch test confirmed that v=0 parses, recovers the owner, and differs from the canonical encoding.

  • Store signature.as_bytes() at mod.rs:2280, and refuse sig_bytes[64] ∉ {27, 28} at intake
  • Isolate a reverting lane in submit_chunk, for example by bisecting a non-oversize revert or parking the lane after N reverts, so one lane cannot block a batch
  • Test: intake of a capability presented with v = 0/1 stores 27/28

Activity

  1. added
    kind:security
    prio:high
    area:node
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. added
    area:payments
    on Nov 5, 2026
  4. moved this from Backlog to In progress in deCDNon Nov 6, 2026
  5. moved this from In progress to Done in deCDNon Nov 10, 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:nodearea:paymentskind:securityprio:high

    Type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions