Skip to content

client: the bundle pull engine fetches a manifest under the run-wide 1 TiB cap, not the 64 MiB manifest cap #2847

Closed

Description

@altanoruc

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

PullCtx::fetch_to_memory (crates/client/src/bundle/engine.rs:2160) calls fetch_to_staging(hash, &staging, None, None, ..) under the run-wide max_blob_bytes, then reads the whole file with std::fs::read. manifest_cap_mb is applied only on the -o - route (crates/cli/src/commands/fetch.rs:634) and in the gateway (gateway.rs:2280).

So two commands pay for a whole blob when they meant to fetch a manifest:

  • decdn quote decdn:<h>/, documented as "a small paid pull" made before "any paid byte" (quote.rs:1-19);
  • decdn get decdn:<h>/.

Each pays for up to 1 TiB at the default --max-blob-mb, at the holders' rates (no rate ceiling by default), reads the blob into memory and leaves copies on disk before manifest parsing fails. A trailing / on a blob URI is enough to trigger it.

  • Pass min(run cap, MAX_MANIFEST_BYTES) from fetch_to_memory, so the lanes refuse a larger size claim before any voucher; move the constant into decdn-client
  • Test: fetch_manifest of a blob over 64 MiB pays for no more than the cap

Activity

  1. added
    kind:security
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. added
    prio:medium
    area:cli
    area:client
    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 16, 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:cliarea:clientkind:securityprio:medium

    Type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions