Skip to content

Null dereference within DbgEngAdapter::ReadMemory #1070

@sentry

Description

@sentry

Sentry Issue: BINARYNINJA-5Z

EXCEPTION_ACCESS_VIOLATION_READ / 0x0: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ / 0x0
  File "dbgengadapter.cpp", line 2182, in BinaryNinjaDebugger::DbgEngAdapter::ReadMemory
  File "debuggercontroller.cpp", line 65, in BinaryNinjaDebugger::DebuggerController::AddBreakpoint
  File "debuggerstate.cpp", line 713, in BinaryNinjaDebugger::DebuggerBreakpoints::ContainsAbsolute
  File "viewframe.cpp", line 1479, in View::getViewFromWidget
  File "uicontext.cpp", line 762, in UIContext::contextForWidget
...
(35 additional frame(s) were not displayed)

@bdash says:

The crash occurs when DbgEngAdapter::ReadMemory dereferences m_debugDataSpaces when it is null. I don't see anything that guarantees that ReadMemory cannot be be called when m_debugDataSpaces is null, so presumably a null check should be added (ditto within WriteMemory).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions