Skip to content

Harden GNU Debuglink Parsing And Path Handling - #2462

Open
Brian Robbins (brianrob) wants to merge 2 commits into
microsoft:mainfrom
brianrob:brianrob-fix-gnu-debuglink-validation
Open

Harden GNU Debuglink Parsing And Path Handling#2462
Brian Robbins (brianrob) wants to merge 2 commits into
microsoft:mainfrom
brianrob:brianrob-fix-gnu-debuglink-validation

Conversation

@brianrob

Copy link
Copy Markdown
Member

GNU .gnu_debuglink values are filenames, but malformed section data could previously influence path construction and filesystem access. This change enforces the GNU contract at parse time and keeps candidate construction within trusted search directories.

  • Strictly validate section bounds, null termination, UTF-8, and filename syntax.
  • Reject paths, traversal, device names, alternate streams, and malformed values before filesystem access.
  • Canonicalize and containment-check executable-adjacent symbol candidates.
  • Treat invalid debug links as not found while preserving existing CRC and build-ID behavior.
  • Consolidate reusable validation in PathUtilities.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 941aeaec-b88c-4728-b9ef-8bb0110236a8
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 941aeaec-b88c-4728-b9ef-8bb0110236a8
@brianrob
Brian Robbins (brianrob) requested a review from a team as a code owner August 27, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant