Skip to content

cache: the untrusted .obao4 outboard read is capped by the origin's own size claim #2842

Closed

Description

@altanoruc

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

outboard_with_origin (crates/cache/src/engine.rs:3861) derives its read cap from the origin-reported size, expected_outboard_len(total_bytes) (:3866). total_bytes comes from origin_size (HEAD Content-Length or S3 HeadObject), reached from crates/node/src/handlers/client/dispatch.rs:1160-1162.

Nothing clamps the size to max_blob_bytes first. The whole-blob path does (engine.rs:5519, "origins can lie or omit the hint"). The HTTP and S3 readers pre-check Content-Length only against that inflated cap, and a chunked body skips the pre-check. An origin that reports a huge size can therefore make the node buffer an equally huge outboard in memory.

The input is the operator's configured origin, so the precondition is a compromised or on-path origin (parse_origin_url accepts plain http). crates/node/src/handlers/client/window.rs:778-783 records that this leg has "no untrusted counterparty", while ADR 037:81-82 calls the outboard untrusted. A scratch test confirmed the unclamped cap.

  • In outboard_with_origin, return Ok(None) (or refuse) when total_bytes > max_blob_bytes
  • Test: an origin size above the engine cap reads no outboard

Activity

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

    Type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions