Repository navigation
fix(elf): reject invalid section table and zlib declarations - #12193
Conversation
Refs #10149, #10148, #9330. Co-authored-by: Nianze Wu <[email protected]>
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 reviewed changes appear safe to merge. SummaryThe PR tightens ELF section-table and compressed-section checks, then shares section-count checks with Deno, Node SEA, and Dart readers.
No new actionable issues or rule violations found. No superseding fix appeared in the available base-branch history. Tests were not rerun during this review. Reviews (2) · Last reviewed commit: "fix(elf): share section count admission ..." · Reviewed by Greptile |
fix(elf): admit section tables before carrier recognition
Summary
The ELF readers could report complete section data from three malformed declarations. The shared table reader now rejects section counts that must use extended numbering. The shared compression reader validates decoded alignment before inflation and checks that the zlib stream consumes the declared payload.
The refreshed implementation covers #10149, #9330, and #10148. Thanks to @wunianze666-netizen for the original reports and controls. The readers retain their existing caller budgets and error projection. Zlib accounting uses Node's existing consumed-input result across supported Node releases.
The carrier follow-up from #12196 applies the same section count admission before Dart, Deno, and Node SEA use section rows. Node SEA still uses an independently valid program note when it needs no section fallback. Deno preserves its existing format-error classification for confirmed carriers with damaged section metadata.
Validation
npm run check:fastandgit diff --checkpassed.References ELF gABI Sections and RFC 1950.
Author readiness
Human owner: @morluto