breadbug symbol publisher exposes new stores and accepts unusable debug artifacts #74

Closed
opened 2026-10-13 20:04:02 +08:00 by Breadway · 2 comments
Owner

Found during independent exact-head review of ECO-67 / bread-ecosystem PR #69 at 300b3d7ff5. Confidence: high, both defects reproduced locally with a rustc -g test executable in /tmp/opencode, with no Hestia or /srv access.

  1. scripts/publish-symbols.sh:59-68 creates the root and shard with mkdir -p under the caller umask and chmods files 0644. With normal umask 022 the root/shard were 0755 and the debug file 0644. This violates ECO-67 not-world-readable storage; docs/breadbug-symbols.md:33-37 says not publicly served but provides no private provisioning contract. Establish private access for runner writer and server reader, validate unsafe existing stores and symlink/path assumptions without recursive chmod of caller-owned trees, and document provisioning.

  2. scripts/publish-symbols.sh:55-68 treats any existing file as success and accepts objcopy output without checking usable DWARF. Repro: compile with rustc -g and GNU build-id, strip a copy, publish the stripped copy to a fresh store, then publish the original. Both exit 0, second says already published, addr2line on known_fn returns ?? / ??:0. The same original published to a different fresh store resolves known_fn and source line. Require usable line-table debuginfo on input/output and validate existing artifacts before treating the ID as an idempotent success. Preserve good append-only entries; reject bad entries with an actionable repair error.

Track repairs on the existing PR #69 and link to ECO-67. Add regression tests and wire scripts/test-publish-symbols.sh into check.yml (currently the green check does not execute it).

Found during independent exact-head review of ECO-67 / bread-ecosystem PR #69 at 300b3d7ff5adf0f8fb5f859999b614e89ee74579. Confidence: high, both defects reproduced locally with a rustc -g test executable in /tmp/opencode, with no Hestia or /srv access. 1. scripts/publish-symbols.sh:59-68 creates the root and shard with mkdir -p under the caller umask and chmods files 0644. With normal umask 022 the root/shard were 0755 and the debug file 0644. This violates ECO-67 not-world-readable storage; docs/breadbug-symbols.md:33-37 says not publicly served but provides no private provisioning contract. Establish private access for runner writer and server reader, validate unsafe existing stores and symlink/path assumptions without recursive chmod of caller-owned trees, and document provisioning. 2. scripts/publish-symbols.sh:55-68 treats any existing file as success and accepts objcopy output without checking usable DWARF. Repro: compile with rustc -g and GNU build-id, strip a copy, publish the stripped copy to a fresh store, then publish the original. Both exit 0, second says already published, addr2line on known_fn returns ?? / ??:0. The same original published to a different fresh store resolves known_fn and source line. Require usable line-table debuginfo on input/output and validate existing artifacts before treating the ID as an idempotent success. Preserve good append-only entries; reject bad entries with an actionable repair error. Track repairs on the existing PR #69 and link to ECO-67. Add regression tests and wire scripts/test-publish-symbols.sh into check.yml (currently the green check does not execute it).
Author
Owner

Fixed on the merged shared half. Not marked done from review.

Both defects from the review of 300b3d7 are fixed at ef218b88c9 and merged as 4f70691b33 (PR 69).

  1. Store modes are 0750/0640 regardless of umask. Existing unsafe roots and shards are refused, not chmod'd. Reproduced locally, including umask 000 and a world-readable shard left unchanged.
  2. Stripped or otherwise unusable input is rejected. A stale artifact for the same build-id is replaced only from a usable input. Reproduced: empty, stripped, wrong-id, and symlink entries.

scripts/test-publish-symbols.sh covers these cases and ran in CI job check, Actions run 298, on this SHA ("publish-symbols: all tests passed"). Left in review so the coordinator can verify the integrated tree.

Fixed on the merged shared half. Not marked done from review. Both defects from the review of 300b3d7 are fixed at ef218b88c99b602e66fc754c1a2a4462ecbd3e39 and merged as 4f70691b33bc778294073681065665d3e2b7f559 (PR 69). 1. Store modes are 0750/0640 regardless of umask. Existing unsafe roots and shards are refused, not chmod'd. Reproduced locally, including umask 000 and a world-readable shard left unchanged. 2. Stripped or otherwise unusable input is rejected. A stale artifact for the same build-id is replaced only from a usable input. Reproduced: empty, stripped, wrong-id, and symlink entries. scripts/test-publish-symbols.sh covers these cases and ran in CI job check, Actions run 298, on this SHA ("publish-symbols: all tests passed"). Left in review so the coordinator can verify the integrated tree.
Author
Owner

Defect-only acceptance verified on integrated PR69 merge4f70691b33bc778294073681065665d3e2b7f559: clean detached worktree scripts/test-publish-symbols.sh all tests passed; exact integrated main CI now success. Independent reviewer pass at ef218b8 comment4553 covers private modes, unusable-symbol rejection/replacement and behavior suite execution. ECO-67 product rollout remains open separately.

Defect-only acceptance verified on integrated PR69 merge4f70691b33bc778294073681065665d3e2b7f559: clean detached worktree scripts/test-publish-symbols.sh all tests passed; exact integrated main CI now success. Independent reviewer pass at ef218b8 comment4553 covers private modes, unusable-symbol rejection/replacement and behavior suite execution. ECO-67 product rollout remains open separately.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread-ecosystem#74
No description provided.