Skip to content

fix(elf): disclose duplicate kernel module text sections - #9001

Closed
ShuaixinHuang wants to merge 7 commits into
morluto:mainfrom
ShuaixinHuang:codex/fix-kernel-module-duplicate-text-disclosure
Closed

ShuaixinHuang wants to merge 7 commits into
morluto:mainfrom
ShuaixinHuang:codex/fix-kernel-module-duplicate-text-disclosure

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Report duplicate .init.text and .exit.text declarations in the kernel module inspection limitations, while retaining the first declaration's size and location. Fixes #8941.

Change and scope

The ELF parser uses a shared first-section selection rule for all five single-section results. It emits the same warning already used for duplicate .modinfo and __versions sections. CLI and MCP use the same parser and report contract. This reads inert files and does not load a kernel module.

Evidence and validation

Two synthetic ELF regressions failed before the change and passed afterward. For example, a report can retain init_text.bytes = 4 and now include “Multiple .init.text sections are declared; the first is examined.”

Parser and service tests passed (32 tests). The compiled CLI suite (4 tests) and MCP boundary suite (3 tests) passed. The filesystem suite had two passes and one failure at fixture setup because the Windows host denied symlink creation with EPERM, before the service was called. Formatting and check:fast passed. Local Node 22.20.0 and npm 10.9.3 were used with the existing dependencies. No real kernel module was loaded or run.

Author readiness

Human owner: @ShuaixinHuang

  • 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.

CI integration

Integrated current main and the baseline test repairs from #9019, #9002, #9003 and #9009 so this branch can run independently. The local combination passed 128 related tests and check:fast on Windows. Current-HEAD remote CI remains the final integration check.

@greptile-apps

greptile-apps Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no actionable defects were found.

Summary

The parser now discloses duplicate .init.text and .exit.text sections while keeping the first section’s size and location.

  • Kernel-module reports now disclose duplicate init and exit text sections.
  • Test fixtures and boundary checks stay aligned with their current contracts.

Reviews (2) · Last reviewed commit: "Merge main and verified baseline CI repa..." · Reviewed by Greptile

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review November 5, 2026 13:48
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-05T13:48:34.761179Z
We couldn’t complete this review. Comment @codex review to try again.
3afd1c4 Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto morluto added area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior 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: 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.

[Bug] inspect-kernel-module silently omits duplicate init and exit text sections

2 participants