Fix null deref in EsrevenAdapter::GetProcessList#1076
Open
xusheng6 wants to merge 1 commit into
Open
Conversation
GetProcessList dereferenced m_rspConnector unconditionally; every other method in the class already gates this access on !m_rspConnector. Mirror the same guard so the crash reported in BINARYNINJA-61 (Free user clicking Attach in the process list dialog without an active connection) returns an empty list instead of dereferencing null. Fixes #1071 Fixes BINARYNINJA-61 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
EsrevenAdapter::GetProcessListdereferencedm_rspConnectorunconditionally; mirror the!m_rspConnectorguard that every other method in this adapter already has.controlswidget.cpp:358→attachprocess.cpp:401→DebuggerController::GetProcessList→EsrevenAdapter::GetProcessList), so any user opening that dialog without first connecting to a Reven backend crashes.Fixes #1071
Fixes BINARYNINJA-61
Sentry context
bn.edition=Free,release=binaryninja@5.3.9434— same demographic pattern as Crash inside BinaryNinjaDebugger::RspConnector::SendRaw #1066: a free user exploring an adapter that needs a server-side backend they don't haveEXC_BAD_ACCESS / KERN_INVALID_ADDRESS / 0x0insideunique_lockconstructing on the nullRspConnector::m_socketLockNote on the broader race
This is the same shape of bug as the one PR #1075 addresses across all three RSP adapters via
std::shared_ptrlifetime management. This narrower patch lands a minimal fix ondevso the user-visible crash stops without waiting on the larger refactor. If #1075 merges first, this change is already subsumed by it and the PR can be closed.Test plan
🤖 Generated with Claude Code