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(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL · Issue #1613 · developing-today/code

id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613

New issue
Copy link
New issue
Copy link
Closed
#1798
Closed
id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL#1613
#1798
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobstatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Summary

id peers and the REPL peers commands print a peer's announced name raw in a tab-separated, one-row-per-peer format. The name comes from a PeerAnnouncement that any gossip participant can broadcast: announcements are unsigned postcard on a public topic, are decoded and stored with no validation of name at any point in the chain, and are later served verbatim via ListPeers. A name containing a newline forges extra peer rows (including a fully-formed fake node row); a name containing a tab shifts the columns. One malicious or merely oddly-named peer controls the shape of every other node's peer listing.

This is the remote-input sibling of #1611 (locally-authored tag names/values printed raw by the claim/doc/group commands): different data, different trust boundary (unsigned network input vs the local store), different printers, different fix surface.

The chain (all on main 63ba1705)

  1. Ingest, no validation. PeerAnnouncement (pkgs/id/src/discovery.rs:356-368) declares name: Option<String> with no constraint. The serve gossip receive loop postcard-decodes any announcement and stores it (pkgs/id/src/commands/serve.rs:1278-1285), and id peers' own gossip collection does the same (pkgs/id/src/commands/peers.rs:434-440). PeerDiscovery::update inserts it verbatim (pkgs/id/src/discovery.rs:430-437). (Announcements carrying unchecked data is also the root of id(discovery): peer announcements carry a timestamp nothing checks — a replayed or out-of-order announcement overwrites newer peer state and can keep a departed peer 'live' forever #1552's replay finding; that issue is about timestamp_secs freshness, not the name.)
  2. Serving, verbatim. The ListPeers handler returns the stored announcements unchanged (pkgs/id/src/protocol.rs:644-651).
  3. Printing, raw. Three sites interpolate name directly into a \t-joined println! row:
    • pkgs/id/src/commands/peers.rs:191-199 — "{}\t{}\t{}\t{}" (node_id, name, blob_count, timestamp_secs)
    • pkgs/id/src/commands/repl.rs:1043-1052 — REPL peers
    • pkgs/id/src/commands/repl.rs:1091-1106 — REPL peers_on_node

Nothing anywhere in the chain strips, escapes, or rejects control characters in name.

Verification (this run)

Verbatim-logic probe crate on the laptop (~/git/fleet/probe-2026-10-28-laneA-peersout; peers.rs sha256 41956ade…, repl.rs e61aa516…, discovery.rs 52b897d2… — identical in the sandbox and laptop clones): a forged announcement with name "innocent\nbbbb\tforged-name\t999\t1700000000" survives postcard ingest byte-for-byte, and:

  • the id peers print block renders 2 peers as 3 lines — the third line is the fully-formed forged row bbbb forged-name 999 1700000000;
  • the REPL print block likewise renders 2 peers as 3 lines;
  • a name of "a\tb" (no newline) yields a row with 5 tab-separated fields instead of 4, silently corrupting any TSV consumer;
  • control (name my-server) renders one clean row in both printers.

Full probe source + output log are in the goal bookkeeping (hidden_files/probe-2026-10-28-laneA-peersout/).

Note the codebase's own serve currently announces name: None (commands/serve.rs:1243-1248), so today the field is populated only by other implementations / future versions — but the receive, store, serve, and print paths are all live, and the protocol documents name as a supported field (discovery.rs doc example). The fix should land before a named server makes this routinely reachable, and gossip peers are not limited to this build.

Why it matters

id peers output is exactly the kind of text an operator (or a script) trusts to answer "who is on my network": node IDs, names, blob counts. A forged row invents a peer with an attacker-chosen node ID string and blob count; at minimum it corrupts TSV parsing and terminal display for anyone who lists peers on a network with one hostile or compromised participant. Every other name-like input in this codebase is sanitized at ingest (cf. the web identity sanitize_name, world sanitize_chat/display_name); peer announcement names are the unguarded exception.

Acceptance criteria

  • A peer name containing \n, \r, or \t can no longer produce extra rows or shifted columns in any of the three print sites (commands/peers.rs, REPL peers, REPL peers_on_node) — whether the ruling is sanitize/reject at announcement ingest, escape at print time, or both; the ruling is stated in the PR.
  • The stored/served announcement and the printed output agree: a ListPeers consumer cannot observe a name that the printers would render differently (no print-only fix that leaves other consumers exposed, unless that is the explicit ruling).
  • Tests: an announcement whose name carries newline/tab/CR (and a control-character-only name) round-trips ingest → ListPeers → both printers with exactly one row per peer and four fields per row; ordinary names (spaces, Unicode) still display unchanged.
  • Cross-link id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611 in the PR: the two fixes should not drift into inconsistent escaping conventions for CLI plain-text output.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-637

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

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run 2026-10-28 02:05 CDT
    • Found via: filed this run
    • Task: Filed after verifying on main 63ba170 with a verbatim-logic probe on the laptop: unsigned gossip PeerAnnouncements are postcard-decoded and stored/served with no name validation, and all three peers printers (commands/peers.rs, REPL peers, REPL peers_on_node) interpolate the name raw into TSV rows — a newline forges a fully-formed fake peer row, a tab shifts columns. Sibling of id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611 (local tag data via a different renderer), cross-linked there as well.
    • Expectation: effort/s — triage pins the ruling (sanitize/reject at announcement ingest vs escape at print, keeping stored/served/printed names consistent), then a small fix with ingest→ListPeers→printers round-trip tests.
    • Links: probe + log in goal bookkeeping (hidden_files/probe-2026-10-28-laneA-peersout/); queue packet enqueued to repo-health-code-pilot (triage).
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. 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 Oct 28, 2026
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker lane A (repo-queue-worker-shift)
    • Session / ID: queue task 1723, run 2026-10-28T12:25:57Z
    • Found via: queue claim (repo-health-code-pilot)
    • Task: Triage issue id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613 — verify raw announced-name TSV forgery at the three peers print sites against fresh main, pin the ruling consistent with id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611, and route the fix
    • Expectation: effort/s triage — verified findings posted and a small_fix packet enqueued, or blocked with a named reason
    • Links: issue id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613 · sibling id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611
  7. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    Triage complete (queue task 1723, lane A, 2026-10-28T12:27:12Z): CONFIRMED on current main.

    • Verified fresh on main c5e06ee89a56a884f961858d0c60d31afe5a9621: all three print sites interpolate peer.name raw into a tab-joined println! row — commands/peers.rs (node_id, name, blob_count, timestamp_secs), commands/repl.rs peers, and commands/repl.rs peers_on_node. The ingest/serving chain is as filed (unconstrained name in discovery.rs, stored verbatim, ListPeers returns it unchanged), and the filing's laptop probe stands as the reproduction (newline name → 2 peers render as 3 lines with a fully-formed forged row in both printers; tab name → 5 fields instead of 4).
    • No superseding PR; no hard-stop labels.
    • Ruling (consistent with id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611's triage, task 1717): the contract is pinned at the printers, not ingest. All three sites escape any name containing whitespace/control bytes through one shared helper, under the same documented scheme the id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611 renderer fix (task 1853) uses — a row is always one physical line with four fields, and ordinary names (spaces, Unicode) render unchanged. Ingest and ListPeers serving stay verbatim: stored announcements may already hold control bytes that ingest validation cannot retroactively clean, and protocol data is data — rendering is the contract. This is stated explicitly as the acceptance-2 ruling.

    Promotion: implementation packet enqueued to repo-health-code-pilot as task 1856 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:1613). This triage task is complete; #1613 stays open for the implementation task, labelled queue/queued for it.

    🤖 Agent note · done

    • Agent: queue worker lane A (repo-queue-worker-shift)
    • Session / ID: queue task 1723, run 2026-10-28T12:27:12Z
    • Found via: queue claim (repo-health-code-pilot)
    • Task: Triage id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613 — verify raw announced-name printing, pin the renderer-side ruling, enqueue the fix
    • Expectation: effort/s triage — done; implementation is task 1856
    • Links: issue id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613 · sibling id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611 · follow-up task 1856
  8. dezren39
    added
    queue/queuedHas a queued queue task
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  9. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Dispatcher binding · openchamber-dispatcher run 2026-10-28 13:45 CDT (burn-by-expiry run: Drew directive 13:44 CDT — fill free session slots, burn the Go window resetting 2:26 PM and the Meta window resetting 4:23 PM)

    • Queue task: 1856 (repo-health-code-pilot, small_fix) ↔ issue id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613
    • Session: ses_e7c23b3bcffe1fDmQBqvhKrCtY (laptop OpenChamber, agent build)
    • Pool: Workhorse — requested opencode-route/workhorse; the route resolved server-side to opencode-go.lab / deepseek-v4.1-flash (high), OpenCode Go pool (fresh quota read this run ~13:47 CDT: 5h 1.84%, reset 2:26 PM — OPEN, plan quota only, never PAYG)
    • Worktree / branch: ~/git/fleet/1856-1613-peers-name-escaping on the laptop, branch queue/1856-1613-peers-name-escaping (from origin/main 35726e8)
    • Verified engaged: session busy on re-reads; its assistant messages are examining the REPL peers print sites and the id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611 escaping scheme in the bound worktree — the id(peers): a peer's announced name is printed raw — a newline in a gossip announcement forges extra TSV rows in id peers and the REPL #1613 fix surface. The queue task itself remains queued in the fleet queue (no targeted claim/binding verb exists yet — Dispatcher v1 live: scheduled launches of OpenCode/OpenChamber sessions for queued issues #1337/Routing policy alignment: map OpenChamber routing categories to the fleet's Workhorse-first tiers + POOL MAP gates #1272); the owning lane reconciles/harvests from here, and the babysitter shepherds the session.
  10. dezren39
    added a commit that references this issue on Oct 28, 2026

    fix(id/peers): escape announced names at the printers so a gossip nam…

    0a5b0ca
  11. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Implementation checkpoint · queue task 1856

    PR: #1798 (branch queue/1856-1613-peers-name-escaping, HEAD 0a5b0ca2d, not merged)
    Session: ses_e7c23b3bcffe1fDmQBqvhKrCtY (laptop worktree ~/git/fleet/1856-1613-peers-name-escaping)

    Ruling (acceptance 2/3, stated in the PR)

    Contract pinned at the printers, exactly as #1611's triage pinned it: stored and served announcements stay byte-for-byte verbatim (ListPeers untouched, no ingest validation added). The printers never let a name break row structure.

    What changed

    • New pkgs/id/src/commands/text.rs: one shared helper plain_field — a value with no structure-breaking character is returned byte-identically; one that has it becomes a double-quoted JSON string literal with the characters escaped (\n, \r, \t, \u00XX), the same convention id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611's renderer uses.
    • Trigger set: any control character (covers LF, CR, TAB, NUL, DEL, NEL, …) plus U+2028/U+2029.
    • commands/peers.rs: print loop now goes through format_peer_row → plain_field; doc states the contract.
    • commands/repl.rs: both peers and peers_on_node now go through one shared format_peer_line → plain_field (identical row shape as before).

    One deliberate difference from #1611, called out in the PR: #1611's key=value renderer also quotes on an ASCII space (a space breaks its tokenisation). This helper does not — a space is not a TSV field delimiter, and acceptance 4 requires ordinary names with spaces to display unchanged. Mechanism and escaping convention are shared; only the trigger set is narrowed to what can break a tab-separated row. If the lane prefers strict trigger parity (space quoted too), that is a one-line change to plain_field.

    Tests

    • cargo test --lib commands:: → 99 passed, 0 failed (includes the new helper, format_peer_row, format_peer_line and the round-trip tests).
    • Round-trip test test_forged_names_through_ingest_and_list_peers_cannot_forge_rows: forged LF/TAB/CR names → postcard gossip ingest → PeerDiscovery::update → ListPeers response (built as protocol.rs builds it) → postcard wire → both printers: exactly one row and four fields per peer per printer, and the served names asserted still verbatim.
    • cargo test --lib (full default-features suite) → 1487 passed, 1 failed: log_sync::tests::test_batch_collection_refused_stream_ends_at_the_total_cap (203 vs 256), unrelated to this change; rerun alone → passed (flaky/scheduling-dependent cap test).
    • cargo test --doc commands::text → passed. cargo fmt --check → clean.
    • Note: just test-unit / cargo test --all-features cannot compile on this laptop — the web feature needs built web assets (src/web/assets.rs RustEmbed) and src/web/mod.rs fails with Assets::get/Assets::iter not found. Pre-existing environment limitation, not caused by this change; tests were run with default features.

    No blockers.

  12. developing-today
    added
    status:in-review
    on Oct 28, 2026
  13. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Checkpoint update · queue task 1856

    • Merged origin/main (e91098f11) into the branch and pushed; head is now 0c686f043 (PR fix(id/peers): escape announced names at the printers so a gossip name cannot forge TSV rows (#1613) #1798, still open, not merged).
    • Post-merge rerun on the laptop: cargo test --lib commands:: -> 99 passed, 0 failed.
    • PR CI is pending (Nix flake evaluation / treefmt / benchmark); nothing red so far.
    • PR body now carries the full ruling, scheme, tests and the --all-features/web-assets environment note. (The first push's PR body had been clobbered by another session writing to the same shared temp path; it has been rewritten.)

    No blockers.

  14. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · bound

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: queue task 1856 · fleet-monitor run 2026-10-29 00:19 CDT
    • Found via: monitor reconciliation (Duty 1B PR↔queue)
    • Task: Binding — open PR fix(id/peers): escape announced names at the printers so a gossip name cannot forge TSV rows (#1613) #1798 implements this issue (verified by the monitor this run: PR title/body/files read; scope matches the queued task's packet). Pickup route: dispatcher session (a "Dispatcher binding" comment was posted on this issue 2026-10-28T18:56Z and checkpoint comments name queue task 1856 and the PR; branch queue/1856-1613-peers-name-escaping names the task), but the pickup never landed in the queue — task 1856 still sits queued, attempts 0, never claimed. The queued task is therefore to be treated as PARKED on this PR: resume as the PR's shepherd — review CI, merge when green, do NOT re-implement. Queue-side claim/park by the monitor is pending the by-id claim/bind verb (Dispatcher v1 live: scheduled launches of OpenCode/OpenChamber sessions for queued issues #1337); until it lands, this note is the binding record a lane's revalidation will find.
    • Expectation: PR shepherded to merge; no duplicate implementation.
    • Links: PR fix(id/peers): escape announced names at the printers so a gossip name cannot forge TSV rows (#1613) #1798 · queue task 1856
  15. dezren39
    closed this as completedin #1798on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobstatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this item

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.