Skip to content

Chained OGC API layers each copy the document address, uncounted by the address budget #1595

Closed

Description

@giswqs

Found in the release quality sweep (v0.5.0 to main).

Every layer of a chained OGC API document clones its document address into its own CapabilitySource, uncounted by MAX_COPIED_ADDRESS_BYTES, so a hostile collections document with a long address and up to 100,000 layers multiplies memory; share the address (Arc, or one source per document indexed by layers) or count it in the budget.

Why it is an issue rather than a sweep fix: A possible out-of-memory path on hostile input; unanswered on the PR and unverified at scale.

Where (main at d866893): crates/engine/src/cmd/service.rs:221

From:

Activity

  1. added
    bug
    on Nov 8, 2026
  2. giswqs commented on Nov 8, 2026

    @giswqs
    MemberAuthor

    Fixed by #1621 (open, CI green): discover in crates/engine/src/cmd/service.rs now builds one Arc<str> of the address per document and gives each of its layers a clone of it, so a long address is no longer copied once per layer. Its measurements: 100,000 collections with a 100 KB address go from 9,776 MB to 353 MB. Not opening a separate PR; this closes when #1621 merges.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions