https://bugs.kde.org/show_bug.cgi?id=482819
Bug ID: 482819 Summary: kwalletd6 sometimes crashed in QCA::PrivateKey::deriveKey when starting Proton VPN GUI Classification: Frameworks and Libraries Product: frameworks-kwallet Version: 6.0.0 Platform: Fedora RPMs OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: va...@kde.org Reporter: matt.fagn...@bell.net CC: kdelibs-b...@kde.org Target Milestone: --- SUMMARY kwalletd6 sometimes crashed in QCA::PrivateKey::deriveKey when starting Proton VPN GUI. Crashes with the same trace happened three times when starting Proton VPN each of which was the first time I ran it in a Plasma 6.0.1 session in a Fedora 40 KDE Plasma installation. Core was generated by `/usr/bin/kwalletd6 --pam-login 13 14'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f0fa37491dc in QCA::PrivateKey::deriveKey (this=this@entry=0x7ffe71c73640, theirs=...) at /usr/src/debug/qca-2.3.8-1.fc40.x86_64/src/qca_publickey.cpp:1030 1030 return static_cast<PKeyContext *>(context())->key()->deriveKey(*(theirContext->key())); [Current thread is 1 (Thread 0x7f0fa37c79c0 (LWP 9448))] (gdb) bt #0 0x00007f0fa37491dc in QCA::PrivateKey::deriveKey (this=this@entry=0x7ffe71c73640, theirs=...) at /usr/src/debug/qca-2.3.8-1.fc40.x86_64/src/qca_publickey.cpp:1030 #1 0x000055f537f92992 in KWalletFreedesktopService::createSessionAlgorithmDhAes (this=0x7f0f8800a320, clientKey=...) at /usr/src/debug/kf6-kwallet-6.0.0-1.fc40.x86_64/src/runtime/kwalletd/kwalletfreedesktopservice.cpp:424 #2 KWalletFreedesktopService::OpenSession (this=0x7f0f8800a320, algorithm=<optimized out>, input=<optimized out>, result=...) at /usr/src/debug/kf6-kwallet-6.0.0-1.fc40.x86_64/src/runtime/kwalletd/kwalletfreedesktopservice.cpp:266 #3 0x000055f537fb7f43 in KWalletFreedesktopServiceAdaptor::OpenSession (this=0x55f539ee3fe0, algorithm=<optimized out>, input=<optimized out>, result=<optimized out>) at /usr/src/debug/kf6-kwallet-6.0.0-1.fc40.x86_64/redhat-linux-build/src/runtime/kwalletd/kwalletfreedesktopserviceadaptor.cpp:63 #4 KWalletFreedesktopServiceAdaptor::qt_static_metacall (_o=0x55f539ee3fe0, _c=<optimized out>, _id=<optimized out>, _a=0x7ffe71c73978) at /usr/src/debug/kf6-kwallet-6.0.0-1.fc40.x86_64/redhat-linux-build/src/runtime/kwalletd/moc_kwalletfreedesktopserviceadaptor.cpp:410 #5 0x000055f537fb8254 in KWalletFreedesktopServiceAdaptor::qt_metacall (this=0x55f539ee3fe0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7ffe71c73978) at /usr/src/debug/kf6-kwallet-6.0.0-1.fc40.x86_64/redhat-linux-build/src/runtime/kwalletd/moc_kwalletfreedesktopserviceadaptor.cpp:489 #6 0x00007f0fa2a7bb11 in QDBusConnectionPrivate::deliverCall (this=this@entry=0x7f0f88001690, object=object@entry=0x55f539ee3fe0, msg=..., metaTypes=..., slotIdx=11) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/dbus/qdbusintegrator.cpp:977 #7 0x00007f0fa2a7f675 in QDBusConnectionPrivate::activateCall (this=this@entry=0x7f0f88001690, object=0x55f539ee3fe0, flags=flags@entry=273, msg=...) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/dbus/qdbusintegrator.cpp:879 #8 0x00007f0fa2a802c6 in QDBusConnectionPrivate::activateCall (this=0x7f0f88001690, object=<optimized out>, flags=273, msg=...) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/dbus/qdbusintegrator.cpp:825 --Type <RET> for more, q to quit, c to continue without paging--c #9 QDBusConnectionPrivate::activateObject (this=0x7f0f88001690, node=..., msg=..., pathStartPos=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/dbus/qdbusintegrator.cpp:1460 #10 0x00007f0fa2a8295a in QDBusActivateObjectEvent::placeMetaCall (this=0x7f0f8800adc0) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/dbus/qdbusintegrator.cpp:1580 #11 0x00007f0fa19e25a5 in QObject::event (this=0x7f0f8800a320, e=0x7f0f8800adc0) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qobject.cpp:1437 #12 0x00007f0fa2d87f68 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x7f0f8800a320, e=0x7f0f8800adc0) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3296 #13 0x00007f0fa198f218 in QCoreApplication::notifyInternal2 (receiver=0x7f0f8800a320, event=0x7f0f8800adc0) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121 #14 0x00007f0fa198f42d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1539 #15 0x00007f0fa1993147 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55f539b2d390) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1901 #16 0x00007f0fa199340d in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1760 #17 0x00007f0fa1c6751f in postEventSourceDispatch (s=0x55f539b2f450) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:243 #18 0x00007f0fa0ed626c in g_main_dispatch (context=0x7f0f88000f00) at ../glib/gmain.c:3344 #19 g_main_context_dispatch_unlocked (context=0x7f0f88000f00) at ../glib/gmain.c:4152 #20 0x00007f0fa0f372a8 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7f0f88000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4217 #21 0x00007f0fa0ed76e3 in g_main_context_iteration (context=0x7f0f88000f00, may_block=1) at ../glib/gmain.c:4282 #22 0x00007f0fa1c66de3 in QEventDispatcherGlib::processEvents (this=0x55f539b470d0, flags=...) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393 #23 0x00007f0fa199c053 in QEventLoop::exec (this=this@entry=0x7ffe71c74250, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/global/qflags.h:34 #24 0x00007f0fa1997ffc in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/global/qflags.h:74 #25 0x00007f0fa21d37cd in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:1925 #26 0x00007f0fa2d87ed9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2574 #27 0x000055f537f78d95 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kf6-kwallet-6.0.0-1.fc40.x86_64/src/runtime/kwalletd/main.cpp:221 Proton VPN GUI crashed with the following trace after the kwalletd6 crash. Mar 07 23:34:49 plasmashell[11327]: Traceback (most recent call last): Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 48, in send_and_get_reply Mar 07 23:34:49 plasmashell[11327]: raise DBusErrorResponse(resp_msg) Mar 07 23:34:49 plasmashell[11327]: jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.NoReply] ('Remote peer disconnected',) Mar 07 23:34:49 plasmashell[11327]: The above exception was the direct cause of the following exception: Mar 07 23:34:49 plasmashell[11327]: Traceback (most recent call last): Mar 07 23:34:49 plasmashell[11327]: File "/usr/bin/protonvpn-app", line 33, in <module> Mar 07 23:34:49 plasmashell[11327]: sys.exit(load_entry_point('proton-vpn-gtk-app==4.2.0', 'console_scripts', 'protonvpn-app')()) Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/__main__.py", line 34, in main Mar 07 23:34:49 plasmashell[11327]: controller = Controller.get(executor) Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/controller.py", line 56, in get Mar 07 23:34:49 plasmashell[11327]: executor.submit(controller.initialize_vpn_connector).result() Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 456, in result Mar 07 23:34:49 plasmashell[11327]: return self.__get_result() Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 401, in __get_result Mar 07 23:34:49 plasmashell[11327]: raise self._exception Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/controller.py", line 89, in initialize_vpn_connector Mar 07 23:34:49 plasmashell[11327]: self._connector = await self._api.get_vpn_connector() Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/vpn/core/api.py", line 53, in get_vpn_connector Mar 07 23:34:49 plasmashell[11327]: settings = await self.load_settings() Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/vpn/core/api.py", line 63, in load_settings Mar 07 23:34:49 plasmashell[11327]: if self._session_holder.session.logged_in: Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/vpn/core/session.py", line 71, in session Mar 07 23:34:49 plasmashell[11327]: self._session = self._proton_sso.get_default_session( Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 192, in get_default_session Mar 07 23:34:49 plasmashell[11327]: sessions = self.sessions Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 133, in sessions Mar 07 23:34:49 plasmashell[11327]: keyring_index = keyring[self.__keyring_index_name()] Mar 07 23:34:49 plasmashell[11327]: ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/keyring/_base.py", line 65, in __getitem__ Mar 07 23:34:49 plasmashell[11327]: return self._get_item(key) Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/proton/keyring_linux/core/keyring_linux.py", line 45, in _get_item Mar 07 23:34:49 plasmashell[11327]: stored_data = self.__keyring_backend.get_password( Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 83, in get_password Mar 07 23:34:49 plasmashell[11327]: return item.get_secret().decode('utf-8') Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/secretstorage/item.py", line 99, in get_secret Mar 07 23:34:49 plasmashell[11327]: self.session = open_session(self.connection) Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 80, in open_session Mar 07 23:34:49 plasmashell[11327]: output, result = service.call( Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 63, in call Mar 07 23:34:49 plasmashell[11327]: return self.send_and_get_reply(msg) Mar 07 23:34:49 plasmashell[11327]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 07 23:34:49 plasmashell[11327]: File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 58, in send_and_get_reply Mar 07 23:34:49 plasmashell[11327]: raise SecretServiceNotAvailableException(data) from resp Mar 07 23:34:49 plasmashell[11327]: secretstorage.exceptions.SecretServiceNotAvailableException: Remote peer disconnected Mar 07 23:34:49 systemd[9403]: app-protonvpn\x2dapp-9a55dbb58d2c40afa44b5f9a76aabf4b.scope: Consumed 1.028s CPU time. This problem started after an update including Plasma 6.0.1 and qca-2.3.8-1.fc40 https://bodhi.fedoraproject.org/updates/FEDORA-2024-71a4de4732 Since the crashing function QCA::PrivateKey::deriveKey is in qca, that update might be involved. When I ran Proton VPN right after the crash in the same session, I got a message that kwallet hadn't been opened and asking to enter the password. kwalletd6 and Proton VPN didn't crash after entering the password or when I ran Proton VPN again in the same Plasma session. STEPS TO REPRODUCE 1. Boot a Fedora 40 KDE Plasma installation updated to 2024-3-8 with the updates-testing repo enabled 2. Log in to Plasma 6.0.1 on Wayland from sddm 3. Set up the Proton VPN repo and install the program using the instructions at https://protonvpn.com/support/official-linux-vpn-fedora/ Since Proton VPN doesn't build Fedora 40 packages yet as it's in a pre-release stage, I changed two lines in /etc/yum.repos.d/protonvpn-stable.repo to use the Fedora 39 repo before installing it. baseurl = https://repo.protonvpn.com/fedora-39-stable gpgkey = https://repo.protonvpn.com/fedora-39-stable/public_key.asc 5. Make a Proton VPN account at https://protonvpn.com/ There's a free plan available. 6. Start the Proton VPN GUI 7. Enter the Proton VPN user name and password that was previously made. The Proton VPN account information should be stored in kwallet. 8. Log out of Plasma 9. Log in to Plasma 10. Start the Proton VPN GUI OBSERVED RESULT kwalletd6 sometimes crashed in QCA::PrivateKey::deriveKey when starting Proton VPN GUI EXPECTED RESULT No crashes should've happened. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora 40 (available in About System) KDE Plasma Version: 6.0.1 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.