Skip to content

read DW_OP_deref_size address through FIRCLSReadMemory - #16550

Open
isl-Ramzi wants to merge 1 commit into
firebase:mainfrom
isl-Ramzi:dwarf-deref-size-read-guard
Open

read DW_OP_deref_size address through FIRCLSReadMemory#16550
isl-Ramzi wants to merge 1 commit into
firebase:mainfrom
isl-Ramzi:dwarf-deref-size-read-guard

Conversation

@isl-Ramzi

Copy link
Copy Markdown
Contributor

Unvalidated memory read in DW_OP_deref_size

DW_OP_deref pops its address and reads it through FIRCLSReadMemory, but DW_OP_deref_size dereferences the popped value directly, so a DW_CFA_expression in a frame's eh_frame can steer the crash-time unwinder into an arbitrary-address read. Routed it through the same validated read as DW_OP_deref, so valid reads are unchanged and a bad address is reported instead of faulting. Added two regression tests covering a valid read and an unreadable address.

@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@paulb777

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the DW_OP_deref_size opcode execution in the DWARF expression machine to safely read memory using FIRCLSReadMemory instead of directly dereferencing potentially invalid pointers. Additionally, it introduces unit tests to verify that valid addresses are read correctly and invalid addresses are safely rejected without causing crashes. There are no review comments, and I have no additional feedback to provide.

@ncooke3

ncooke3 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Rerunning failed CI job...

@ncooke3
ncooke3 self-requested a review August 24, 2026 21:25

@ncooke3 ncooke3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ncooke3
ncooke3 requested review from mghaznav and tejasd August 25, 2026 14:47
@ncooke3 ncooke3 added this to the 12.19.0 - M186 milestone Aug 25, 2026
@ncooke3 ncooke3 modified the milestones: 12.19.0 - M186, Firebase 13 Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants