Skip to content

fix(node-sea): validate Mach-O segment bounds before blob limits - #12263

Merged
morluto merged 1 commit into
mainfrom
audit/parser-node-sea-macho-bounds
Nov 19, 2026
Merged

morluto merged 1 commit into
mainfrom
audit/parser-node-sea-macho-bounds

Conversation

@morluto

@morluto morluto commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Summary

The Node SEA Mach-O reader now uses the shared segment admission rule before applying its blob allowance. A named SEA section cannot establish a readable blob when the enclosing segment extends outside the thin image or the selected universal slice. A physically valid neighboring section can still hit the blob budget. Apple Mach-O layout · Node SEA documentation

Validation

  • Authored thin and FAT cases both reported the blob limit before the change. They now report a format failure. The FAT fixture has physical bytes beyond the declared slice. Valid paired cases still report the limit.
  • 107 focused reader, CLI and MCP tests passed, including the existing real Node-produced blob check. The new Mach-O cases are authored fixtures. No SEA executable was run.
  • check:fast and git diff --check 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-19T08:55:22.296903Z 3b0b854 PR opened
ℹ️ 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 PR appears safe to merge; no actionable issues were found.

Summary

The Node SEA reader now checks Mach-O segment bounds before applying the blob-size limit.

  • Mach-O SEA segments must fit the image before their blob size counts.

No actionable issues found. Tests were inspected but not run during this review. No superseding change was found in the available Git history.

Reviews (1) · Last reviewed commit: "fix(node-sea): validate Mach-O segment b..." · Reviewed by Greptile

@morluto
morluto enabled auto-merge (squash) November 19, 2026 08:55
@morluto
morluto merged commit b74b314 into main Nov 19, 2026
40 checks passed
@morluto
morluto deleted the audit/parser-node-sea-macho-bounds branch November 19, 2026 08:58
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant