Repository navigation
fix(elf): check load-map agreement across section extents - #12175
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge based on the inspected code. SummaryELF dependency inspection now checks each section’s full span against the load mapping while preserving independently readable library names.
The previous library-name finding is fixed. No new actionable issues or security regressions were found. Tests were inspected, not run. Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/aud..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f17e02dda
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…o audit/parser-elf-section-extents
#12156) * fix(elf): share dynamic table singleton validation * fix(elf): share note storage and framing across readers Refs #12130 * fix(elf): retain zero-filled load mapping ambiguity Refs #12136 * fix(pe): share header extent admission Refs #12143 * fix(macho): share embedded section backing checks Refs #12142 * fix(pe): share header facts and validate resource directory order * fix(macho): require complete carrier load command framing * fix(pe): probe declared resource headers by file offset * fix(elf): preserve zero-fill observations across mapping gaps * refactor(pe): share positional COFF header observation (#12173) * fix(elf): check load-map agreement across section extents (#12175) * fix(elf): check load-map agreement across section extents * fix(elf): preserve agreed section links across unreadable tables
Summary
ELF dependency inspection now checks the entire section span against
PT_LOADbefore admitting a section for a dynamic table. It still recovers from a plain mapping gap when the section starts at the agreed file offset. A different file translation or declared zero-fill prevents the section from supplying file bytes. An agreed section header still establishes its linked string-table declaration even when symbol bytes are unreadable.Refs #12136 and #12156. This is stacked on the shared mapping fix so its review shows only extent admission for sibling tables.
Problem and expected behavior
The prior section admission checked one byte at the start of the range. The new static fixture placed a zero-fill disagreement later in the dynamic symbol table and the prior parser still reported five import names. The fixed result leaves the imports unreadable with partial coverage and retains the independent
DT_NEEDEDnames. The control changes only the zero-fill declaration and retains the five expected imports. A second case combines disagreeing symbol bytes with a recoverable string-table mapping gap. It verifies that the reader still uses the independently agreed string table to retain the three needed library names.The ELF gABI describes the memory beyond a load segment's file bytes as zero-initialized. The shared virtual mapper provides those facts to the ELF dependency reader. ELF gABI program headers
Contract and boundary impact
Validation performed
cb54cc472abefore changing the parser. The adjacent positive control still passes.d7f2d699a2on Node 24.22.1 across the ELF dependency parser, mapping parity, desktop ELF reader, public CLI, and MCP boundary.npm run check:fast,npm run docs:check, andgit diff --checkpassed.Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.