GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever · Issue #6505 · developing-today/code

id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505

New issue
Copy link
New issue
Copy link
Closed
Closed
id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever#6505
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/claimedQueue worker lifecycle statesource/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

Summary

WorldClient's records query (pkgs/id/src/world_net.rs: records :1446, records_sequenced :1465, record_pages :1483-1525, origin/main fc073b5) trusts the host's record pages completely:

  • record_pages decodes each page with serde_json::from_value::<Records>(reply["records"].clone()) (:1514) and appends it to an unbounded Vec of pages. It re-checks none of the record caps: no per-key check (empty / > MAX_RECORD_KEY_BYTES 256 / control characters), no per-value check (> MAX_RECORD_VALUE_BYTES 8192 serialized), and no total-count check (MAX_RECORDS 4096) across pages.
  • It performs no ordering or cursor validation: keys within/across pages are never checked to be ascending, duplicates across pages are silently merged by records()' extend, and next_after is never checked to advance (or to equal the last key of the page it came with).
  • The loop terminates only when the host eventually sends next_after: null. Per-frame size is bounded (MAX_FRAME_BYTES in frames.rs), but the aggregate across pages is not.

A world host is not trusted by the client in the rest of this file — the caller joins someone else's world with a join capability — and the two sibling receipt paths in the same crate were hardened for exactly this:

  • world_records::read_records (iroh-docs receipt) re-checks every MAX_RECORD* cap on receipt (id(world_records): read_records returns replicated records with none of the record caps re-checked — count, key, and value limits are enforced on publish and on admin-history receipt, but not on replica receipt #6483, merged in PR id(world_records): enforce MAX_RECORD* caps on receipt in read_records #6495).
  • The admin-history client path in this same file (admin_event_history :1529, records decode :1612) budgets every frame, validates each record through AdminHistoryBudget::add_record (:567; key length/control, value size, total count, total bytes), checks pages are in order ("admin history record pages are out of order"), checks the cursor matches the last key, and checks "admin history record cursor did not advance". The server side of the plain query (world_session/mod.rs records_session :1781) pages a parse_records-validated set in ascending key order under MAX_RECORDS_PAGE_BYTES (768 KiB), so every check proposed below holds for conforming hosts by construction.

The plain records path — the one the CLI's records read (commands/world.rs, client.records(...)) and records_sequenced use — has none of that.

Verified behavior (laptop, probe ~/git/fleet/probe-records-pages, real id crate + rogue iroh host speaking /id-world/1)

  • A (over-cap page): one page with 5,000 small records + a 9,000-byte value + a key containing U+0001, next_after: null → records() returns Ok with 5,002 records (caps would allow 4,096 records, values ≤ 8,192 bytes, no control chars in keys).
  • B (stuck cursor): every reply is {"a":1} with next_after: "a" → records() never returns (still looping after a 3 s timeout; the rogue host saw 43,639 records requests in that window). Unbounded page accumulation = hang + memory growth against any buggy or malicious host.
  • C (out-of-order / duplicate pages): page 1 {"b":1}, next_after:"b"; page 2 {"a":2,"b":3}, next_after:null → records_sequenced() returns Ok, with a accepted below the cursor and b silently overwritten 1 → 3. The admin path in the same file refuses all three shapes.

Why it matters

Any client that reads records from a world it does not operate (the normal join flow) can be hung indefinitely or memory-flooded by the host, and over-cap records flow on to callers that assume the parse_records bounds hold for every Records value. The fix pattern already exists twice in the codebase; this path was missed.

Acceptance criteria

  • record_pages (or its callers) re-checks every received record against the MAX_RECORD* caps (key 1..=256 bytes, no control characters; value ≤ 8,192 bytes serialized), matching parse_records / read_records semantics, and refuses the read with an error naming the offending key.
  • The total number of records accumulated across pages is capped at MAX_RECORDS (4,096); exceeding it is an error, not silent truncation.
  • Keys must be strictly ascending within and across pages (accounting for the prefix/after the client itself requested); a duplicate or out-of-order key is an error.
  • next_after must equal the last key of the page it accompanies and must strictly advance across iterations; a non-advancing or mismatched cursor is an error (mirroring the admin-history checks in the same file).
  • Regression tests drive WorldClient against stub/rogue replies covering: over-count page, oversized value, control-char key, stuck cursor, out-of-order page, duplicate key across pages — each refused promptly.
  • Conforming hosts are unaffected: the existing world_net / world_session records tests stay green (server pages are MAX_RECORDS_PAGE_BYTES-bounded and ascending by construction).

Activity

Next
  1. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-1965

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  3. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-11-06T10:35Z
    • Found via: filed this run
    • Task: Triage the unchecked client-side records paging in WorldClient::record_pages (world_net.rs:1483): no MAX_RECORD* re-checks, no ordering/cursor validation, non-advancing next_after loops forever (43,639 requests in 3s in the probe)
    • Expectation: effort s — refuse over-cap/out-of-order/stuck-cursor pages in record_pages, mirroring AdminHistoryBudget::add_record in the same file and read_records (id(world_records): read_records returns replicated records with none of the record caps re-checked — count, key, and value limits are enforced on publish and on admin-history receipt, but not on replica receipt #6483); regression tests against rogue replies; done when the acceptance criteria on issue id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505 hold
    • Links: probe ~/git/fleet/probe-records-pages (laptop, PROBE PASS); sibling receipt hardening id(world_records): read_records returns replicated records with none of the record caps re-checked — count, key, and value limits are enforced on publish and on admin-history receipt, but not on replica receipt #6483 / PR id(world_records): enforce MAX_RECORD* caps on receipt in read_records #6495
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  5. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-l
    • Session / ID: task 11005
    • Found via: queue claim
    • Task: triage receipt validation for WorldClient records paging (record_pages in pkgs/id/src/world_net.rs) — verify the packet evidence against current main and route the fix
    • Expectation: effort class s; done = triage verdict posted with verified evidence and a follow-up fix task enqueued (or already_done if a fix landed)
    • Links: issue id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505
  6. 12 remaining items

  7. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (PR open)

    • Agent: queue worker (repo-worker-code), lane code-q
    • Session / ID: task 11007
    • Found via: queue claim
    • Task: record_pages receipt validation for issue id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505 — the validation itself was already on main (repo-keeper snapshot e756e67 + repair bcf6e5d; verified fresh this shift against the acceptance criteria); the missing piece was the rogue-reply regression tests
    • Expectation: PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579 adds a scripted rogue host on the real iroh transport and drives the real WorldClient against over-count / oversized-value / control-char-key / stuck-cursor / duplicate-key / out-of-order / mismatched-cursor pages, plus a conforming two-page control case
    • Links: PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579 · branch queue/11007-6505-record-pages-validation
  8. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    Residual filed as #6578 (creator lane A, this run): at origin/main b0c472d the RecordsBudget/cursor checks that landed for this issue do refuse its original shapes (over-cap, stuck cursor, out-of-order), but empty pages with a strictly advancing next_after still loop record_pages forever (probe: 55,615 requests in 3s), and a non-string next_after silently terminates the read as if complete. #6578 scopes only those two remaining page shapes in the same loop; the fix for this issue and #6578 can land together.

  9. dezren39
    added a commit that references this issue on Nov 6, 2026

    test(id): prefix new record_pages tests with test_ per pkgs/id conven…

    2cc3736
  10. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/needs-reviewReady for review
    queue/needs-reviewQueue task finished and is awaiting review
    on Nov 6, 2026
  11. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane code-q
    • Session / ID: task 11007
    • Found via: queue claim
    • Task: parked awaiting CI on PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579 (run 42263445655 for commit 2cc3736); Codex P1 finding (test_ prefix) already fixed and replied to on the thread
    • Expectation: on resume, read PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579 checks fresh; if green and no undispositioned Codex findings, merge, close out issue id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505 labels, and complete task 11007 as pr_opened/merged
    • Links: PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579 · branch queue/11007-6505-record-pages-validation
  12. dezren39
    added a commit that references this issue on Nov 7, 2026

    Merge pull request #6579 from developing-today/queue/11007-6505-recor…

    eb65c13
  13. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 7, 2026
  14. developing-today
    closed this as completedon Nov 7, 2026
  15. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    MemberAuthor
    More actions

    Agent note - done (all acceptance criteria met; closing)

    • Agent: repo-worker-code-n (queue worker lane code-n, fallback mode), completing this via its implementation issue Fix #6505: id(world_net): WorldClient records paging trusts host pages — no record  #6519
    • Implementation: present on main — RecordsBudget in pkgs/id/src/world_net.rs (verified fresh at current main this shift) validates every record record_pages receives: key 1..=256 bytes with no control characters, serialized value ≤ 8192 bytes with the error naming the key, total across pages capped at MAX_RECORDS (4096), keys strictly ascending within and across pages; the cursor checks (next_after equals the page's last key and strictly advances) are exercised by the tests below. It reached main unconventionally (keeper snapshot e756e67d58 + repair bcf6e5d585), as documented on PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579.
    • Regression coverage: PR test(id): rogue-host regression tests for record_pages receipt validation (#6505) #6579 (broker task 11007's tests, rescued and landed by this lane: current main merged in, suite run on the laptop) is now MERGED (eb65c13ea562). Its rogue-host tests drive the real WorldClient over iroh against scripted pages: over-count page, oversized value, control-char key, stuck cursor, duplicate key across pages, out-of-order page, mismatched cursor — all refused — plus a conforming two-page read accepted. Full world_net suite on the merged branch: 36 passed, 0 failed.
    • The sibling empty-advancing-page shape stays tracked separately (id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read #6578 / broker task 11251), as do this file's other reply-validation siblings.
  16. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 7, 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

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/claimedQueue worker lifecycle statesource/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.