Misc fixes for R2#8219
Merged
Merged
Conversation
This mirrors the fix that was performed on the x86 platform
…ion event callback
There was a problem hiding this comment.
Pull request overview
This PR bundles several stability and hardening fixes across loaders, platforms, plugins, and language parsers to address race conditions and malformed-input crashes (notably for PE exception directories, WARP sidebar callbacks, and Objective-C metadata parsing).
Changes:
- Add additional validation/fast-fail behavior for malformed inputs (PE exception directory; Objective-C protocol/ivar/CFString parsing).
- Address UI/plugin lifetime and threading hazards in the WARP sidebar update callbacks.
- Prevent concurrent initialization races in the Windows x64 platform view init path.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| view/pe/peview.cpp | Adds a fast-fail check intended to prevent oversized/malformed exception directory tables. |
| rust/src/architecture.rs | Pure formatting change for readability (no behavior change). |
| plugins/warp/ui/plugin.cpp | Changes sidebar update scheduling to use Qt’s main-thread invocation mechanism. |
| platform/windows/platform_windows.cpp | Adds a mutex to prevent concurrent m_teb initialization in x64 BinaryViewInit. |
| objectivec/objc.cpp | Adds bounds checks to skip clearly-malformed Objective-C metadata counts/sizes to avoid crashes. |
Comments suppressed due to low confidence (1)
plugins/warp/ui/plugin.cpp:186
- This callback is registered in
WarpFetcher, which copies the callback list and then executes callbacks without holding the mutex (seeWarpFetcher::ExecuteCompletionCallback). As a result,RemoveCompletionCallbackin the destructor does not guarantee this lambda won’t run after the widget is destroyed. Capturing rawthishere can still lead to UAF. Prefer capturing aQPointer<WarpSidebarWidget>(or similar weak reference) and checking it before callinginvokeMethod/accessing members.
m_fetcher = WarpFetcher::Global();
m_callbackId = m_fetcher->AddCompletionCallback([this]() {
QMetaObject::invokeMethod(this, [this]() {
// Instead of doing a full update after fetching, we only want to make sure the current function has
// up-to-date matches, since the other two tabs (all matches, container list) do not get populated with
// additional information or manage their own updates (e.g. container source list).
m_currentFunctionWidget->UpdateMatches();
});
return KeepCallback;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7906daf to
4683004
Compare
plafosse
approved these changes
May 28, 2026
Member
plafosse
left a comment
There was a problem hiding this comment.
Did review in person and approved given the changes we discussed (regarding integer overflow.)
If we hit a got entry outside the valid regions of memory we can safely assume the tables to be malformed.
4683004 to
37fd650
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.