| Summary: | Dolphin crashed in KConfig::sync when exiting | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | gwdx |
| Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | dolphin-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | 25.04.3 | ||
| Target Milestone: | --- | ||
| Platform: | Debian stable | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/system/dolphin/-/commit/2dce7352c1edfb13c90a8a3b858d113e3a9300b2 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
gwdx
2026-04-02 11:00:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1238 Git commit 2dce7352c1edfb13c90a8a3b858d113e3a9300b2 by Méven Car, on behalf of Wendi Gan. Committed on 26/04/2026 at 09:42. Pushed by meven into branch 'master'. Fix occasional UAF crashes in KConfig::sync() during exit Previously, c035e95 introduced `QtConcurrent::run` to execute `KConfig::sync()` in a separate thread. However, this introduced thread-safety issue: BUG 518433 (UAF caused by RC): During application exit, the main thread frees the old `s_sessionConfig` in `KMWSessionManager::saveState()` to create a new one. Meanwhile, the worker thread is still iterating over the old instance's entryMap during `KConfig::sync()`, leading to a Use-After-Free (UAF) crash. Changes: Copy the `config` in the main thread so `KConfig::sync()` can safely run in the worker. Related: bug 516481, bug 425627 M +5 -2 src/dolphinmainwindow.cpp https://invent.kde.org/system/dolphin/-/commit/2dce7352c1edfb13c90a8a3b858d113e3a9300b2 |