Skip to content

fix(artifacts): verify FAT identities before Bun and Node SEA claims - #12288

Merged
morluto merged 3 commits into
mainfrom
audit/parser-fat-carrier-identity
Nov 19, 2026
Merged

morluto merged 3 commits into
mainfrom
audit/parser-fat-carrier-identity

Conversation

@morluto

@morluto morluto commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Bun and Node SEA now use the shared FAT CPU type and subtype check before claiming content from a thin Mach-O slice. A mismatched named slice can supply a format diagnostic, but cannot claim graph or blob bytes, consume the recognition allowance, or displace an independent valid sibling. Node SEA also bounds its Mach-O header read to the selected slice and uses the shared decoder to admit the header width. Strict CLI target selection retains its existing rejection behavior.

Fixes #12283. Apple universal header definitions

Validation

  • Both producers previously accepted mismatched CPU type and subtype controls. Authored inventory and producer tests verify named refusals, unrelated mismatches, valid siblings and budget isolation.

  • An instrumented FileHandle test verifies a 28-byte 32-bit header reads exactly those bytes and still locates the valid sibling. The earlier parser skipped the short header.

  • 534 focused tests passed with 16 existing skips, plus fast and diff checks. Passive inventory recovered only the correctly identified sibling in both carriers. The fixtures were inspected without execution.

  • On 0fc49d49d2, Bun retains rejected FAT slice bounds before the load-command budget. The trailing fallback excludes overlapping footers and graph bodies. The low-cap regression failed on the previous head. Valid siblings and independent outer trailers remain readable. Ten focused suites reported 535 passed and 16 skipped. check:fast passed.

Author readiness

Human owner: @morluto

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T11:43:14.800707Z 0fc49d4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

Bun and Node SEA now check FAT CPU identities before accepting embedded content. The follow-up fixes the earlier Bun trailer bypass.

  • Bun graph discovery checks each FAT slice before using its bytes.
  • Node SEA checks FAT identity before using a Mach-O slice.

No new actionable issues found. Tests were inspected, not run.

Reviews (2) · Last reviewed commit: "fix(bun): exclude rejected FAT slices fr..." · Reviewed by Greptile

@morluto
morluto enabled auto-merge (squash) November 19, 2026 11:45
@morluto
morluto merged commit 1e5956a into main Nov 19, 2026
41 checks passed
@morluto
morluto deleted the audit/parser-fat-carrier-identity branch November 19, 2026 11:51
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bun and Node SEA carrier readers skip FAT slice identity admission

1 participant