Skip to content

gateway: one gateway-wide manifest_fill lock serializes every uncached site behind the slowest manifest pull #2848

Closed

Description

@altanoruc

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

manifest() takes self.manifest_fill.lock().await (crates/cli/src/commands/gateway.rs:2291; field at :928) and holds it across the whole pull_manifest. The lock is gateway-wide, not per hash.

A pull for a hash nobody holds runs discovery until it faults, and a slow holder can keep the lock until the 120 s give-up per silent gap. Meanwhile every request for any other uncached bundle waits. Cache hits return before the lock, so only new or evicted sites are affected.

  • Key the fill lock per hash (Mutex<HashMap<[u8; 32], Arc<tokio::sync::Mutex<()>>>>), and drop the entry when the pull ends
  • Test: a stalled manifest pull for one hash does not delay another hash's manifest

Activity

  1. added
    kind:security
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. added
    prio:medium
    area:cli
    on Nov 5, 2026
  4. moved this from Backlog to In progress in deCDNon Nov 11, 2026
  5. moved this from In progress to Done in deCDNon Nov 13, 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:clikind:securityprio:medium

    Type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions