Repository navigation
fix(windows): check fixed Shell Link ExtraData sizes - #10361
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, with no new blocking issues found. SummaryThe PR checks exact sizes before decoding six fixed-size Shell Link ExtraData blocks.
Reviews (6) · Last reviewed commit: "Merge commit 'e736d90bdf6990ffe8752c090e..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c03e91c1f3
ℹ️ 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".
Summary
Require the specified size before decoding a fixed-size Shell Link ExtraData block.
Problem and expected behavior
REA decoded oversized blocks from their prefixes and reported complete coverage. For example, a ConsoleFEDataBlock declared as 14 bytes instead of 12 still yielded a code page, and an oversized EnvironmentVariableDataBlock still supplied a derived target. The format defines exact sizes for both blocks. MS-SHLLINK §2.5.2 · §2.5.4
Change and scope
Use one size check for the six fixed-size ExtraData blocks that REA decodes. A mismatched size yields a partial report with the block signature, declared extent, and SHA-256 of its raw payload. The parser continues at the declared boundary, so later blocks remain available. Variable-size and unknown blocks use their existing raw representations. Related #10350 covers the separate target ID list terminator.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
On
bdf1ba3387, all 146 focused tests passed, including compiled CLI and stdio MCP. The new regression reproduced an affirmative icon mismatch and a derived target extension when a malformed environment block hid a target. The fix retains uncertainty, preserves a known independent match, and leaves icon-only malformed blocks separate.check:fast, formatting, and integration with the landed #12594 passed.Compatibility, safety, and release
Author readiness
Human owner: @wunianze666-netizen
Before merge
type(scope): outcome.