You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
crashpad_handler segfaults on Linux when an external reporter is configured and uploads are enabled. #2286
On Linux only, crashpad_handler segfaults inside CrashReportExecutionHandler::WriteMinidumpToDatabase when an external crash reporter is configured and uploads are enabled. The cause looks like a use-after-move of new_report.
In handler/linux/crash_report_exception_handler.cc:
UUID uuid;
database_status =
database_->FinishedWritingCrashReport(std::move(new_report), &uuid); // new report gets moved-from here
...
if (has_crash_reporter && uploads_enabled) {
database_->DeleteReport(new_report->ReportID()); // crash! new_report is null!
} elseif (upload_thread_) {
...
}
FinishedWritingCrashReport takes std::unique_ptr<NewReport> by value, so new_report is null after the std::move. We ultimately get a crash somewhere deeper in the stack trace (typically UUID::ToString).
macOS and Windows appear to be ok, because they use the uuid out-parameter and avoid the dereference.
This bug appears to have been there in "feat: external crash reporter" change (getsentry/crashpad#131, commit 137d0f478), so it has existed since external reporters were introduced.
When does the problem happen
During build
During run-time
When capturing a hard crash
Environment
OS: Linux x86_64, glibc
Compiler: GCC, any recent
CMake version and config: [any recent cmake, SENTRY_BACKEND=crashpad]
Steps To Reproduce
Build on Linux with SENTRY_BACKEND=crashpad
Call sentry_options_set_external_crash_reporter_path() on any executable.
Make sure uploads are enabled in the crashpad db, e.g give consent.
Be sure to enable core dumps (ulimit -c unlimited or coredumpctl)
Trigger a crash or sentry_crash() - crashpad should submit a report but will segfault
when trying to delete a leftover report in the pending/ dir.
Check the coredump - you should see a stack trace in ...::DeleteReport(crashpad::UUID const&) ()
where it probably crashed in ...UUID::ToString[abi:cxx11]() const ()
Suggested fix
Instead of _database->DeleteReport(new_report->ReportID()); , use the UUID rather than dereferencing. A one line change to _database->DeleteReport(uuid);
Activity
linear-code commentedon Nov 6, 2026
NATIVE-242
jpnurmi commentedon Nov 6, 2026
Thanks for a detailed bug report! 🙏
fix(crashpad): fix use-after-move with an external crash reporter
fix(crashpad): fix use-after-move with an external crash reporter (ge…