Skip to content

Crash due to null dereference in lambda within WarpCurrentFunctionWidget::SetCurrentFunction #8111

@sentry

Description

@sentry

Sentry Issue: BINARYNINJA-4R

EXCEPTION_ACCESS_VIOLATION_READ / 0x10: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ / 0x10
  File "function.cpp", line 178, in BinaryNinja::Function::GetView
  File "matches.cpp", line 166, in `WarpCurrentFunctionWidget::SetCurrentFunction'::`10'::<T>::operator()

@bdash says:

The lambda within SetCurrentFunction captures this and accesses m_current. There does not appear to be any locking involved, despite the fact this field is accessed from multiple threads. Additionally, nothing prevents a subsequent call to SetCurrentFunction from setting m_current to nullptr while an instance of this lambda is enqueued. If this happens then the call to Function::GetView will crash due to a null this.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions