Skip to content

Segfault when locking GNOME/Wayland desktop with database open #10432

@dimitris-personal

Description

@dimitris-personal

Overview

KeePassXC crashes when locking the desktop. New regression as of 2.7.7.

Steps to Reproduce

  1. Enable the security option Lock databases when session is locked or lid is closed.
  2. Unlock the database.
  3. Lock the GNOME desktop

Expected Behavior

Before 2.7.7, KPXC behaved as expected. Was still running with database locked upon session unlock.

Actual Behavior

KPXC receives SIGSEGV before the database is locked (at least window still displays unlocked content)

Additional information

Fedora 39/GNOME/Wayland. KPXC build is from the Fedora testing repo.

Debug info

KeePassXC - Version 2.7.7
Revision: 68e2dd8

Qt 5.15.12
Debugging mode is disabled.

Operating system: Fedora Linux 39 (Workstation Edition)
CPU architecture: x86_64
Kernel: linux 6.7.9-200.fc39.x86_64

Enabled extensions:
- Auto-Type
- Browser Integration
- Passkeys
- SSH Agent
- KeeShare
- YubiKey
- Secret Service Integration

Cryptographic libraries:
- Botan 2.19.3

backtrace

Thread 1 "keepassxc" received signal SIGSEGV, Segmentation fault.
0x00005555556b78cd in Database::transformedDatabaseKey (this=<optimized out>) at /usr/include/qt5/QtCore/qscopedpointer.h:116
Downloading source file /usr/include/qt5/QtCore/qscopedpointer.h
116         T *operator->() const noexcept                                                                                                                                                                             
(gdb) bt
#0  0x00005555556b78cd in Database::transformedDatabaseKey (this=<optimized out>) at /usr/include/qt5/QtCore/qscopedpointer.h:116
#1  0x00005555556f1dcf in Kdbx4Reader::readDatabaseImpl (this=0x55555612d390, device=0x7fffffffd040, headerData=..., key=..., db=<optimized out>)
    at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/format/Kdbx4Reader.cpp:61
#2  0x00005555556ee6df in KdbxReader::readDatabase (db=0x5555572afb40, key=..., device=0x7fffffffd040, this=<optimized out>) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/format/KdbxReader.cpp:95
#3  KeePass2Reader::readDatabase (this=<optimized out>, device=0x7fffffffd040, key=..., db=0x5555572afb40) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/format/KeePass2Reader.cpp:97
#4  0x00005555556b7bfb in Database::open (this=0x5555572afb40, filePath=..., key=..., error=0x7fffffffd108) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/core/Database.cpp:149
#5  0x000055555571d301 in DatabaseOpenWidget::clearForms (this=this@entry=0x555556e66bd0) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/gui/DatabaseOpenWidget.cpp:275
#6  0x000055555571e7f3 in DatabaseOpenWidget::load (this=0x555556e66bd0, filename=...) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/gui/DatabaseOpenWidget.cpp:241
#7  0x000055555573025f in DatabaseWidget::switchToOpenDatabase (this=0x5555563a8100, filePath=...) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/gui/DatabaseWidget.cpp:1355
#8  0x0000555555736d8d in DatabaseWidget::lock (this=0x5555563a8100) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/gui/DatabaseWidget.cpp:1790
#9  0x00005555557200ee in DatabaseTabWidget::lockDatabases (this=0x555555dc4f60) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/gui/DatabaseTabWidget.cpp:666
#10 0x00007ffff64e92d8 in doActivate<false> (sender=0x555556052c90, signal_index=3, argv=0x7fffffffd380) at kernel/qobject.cpp:3937
#11 0x00007ffff64e92d8 in doActivate<false> (sender=0x555556052ba0, signal_index=3, argv=0x7fffffffd450) at kernel/qobject.cpp:3937
#12 0x00005555556abd20 in ScreenLockListenerDBus::qt_metacall (this=0x555556052ba0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffd5a0)
    at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/redhat-linux-build/src/keepassx_core_autogen/FUIKO5VHUE/moc_ScreenLockListenerDBus.cpp:141
#13 0x00007ffff759438b in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:1001
#14 0x00007ffff64df9fb in QObject::event (this=0x555556052ba0, e=0x7fffe001a010) at kernel/qobject.cpp:1347
#15 0x00007ffff77aeb95 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555556052ba0, e=0x7fffe001a010) at kernel/qapplication.cpp:3640
#16 0x00007ffff64b4e78 in QCoreApplication::notifyInternal2 (receiver=0x555556052ba0, event=0x7fffe001a010) at kernel/qcoreapplication.cpp:1064
#17 0x00007ffff64b5092 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#18 0x00007ffff64b8325 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555555b68570) at kernel/qcoreapplication.cpp:1821
#19 0x00007ffff64b85dd in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#20 0x00007ffff65078cf in postEventSourceDispatch (s=0x555555d149e0) at kernel/qeventdispatcher_glib.cpp:277
#21 0x00007ffff4b11e5c in g_main_dispatch (context=0x7fffe0000ec0) at ../glib/gmain.c:3476
#22 g_main_context_dispatch_unlocked (context=0x7fffe0000ec0) at ../glib/gmain.c:4284
#23 0x00007ffff4b6cf18 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffe0000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#24 0x00007ffff4b0fad3 in g_main_context_iteration (context=0x7fffe0000ec0, may_block=1) at ../glib/gmain.c:4414
#25 0x00007ffff65073b9 in QEventDispatcherGlib::processEvents (this=0x555555d017e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007ffff64b383b in QEventLoop::exec (this=this@entry=0x7fffffffda80, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#27 0x00007ffff64bbacb in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#28 0x00007ffff6960efd in QGuiApplication::exec () at kernel/qguiapplication.cpp:1863
#29 0x00007ffff77aeb09 in QApplication::exec () at kernel/qapplication.cpp:2832
#30 0x000055555563d3a5 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/keepassxc-2.7.7-2.fc39.x86_64/src/main.cpp:215

KeePassXC - 2.7.7
Revision: 68e2dd8

Operating System: Linux
Desktop Env: Gnome
Windowing System: Wayland

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions