Bug 502287 - KDEConnectd crashes on FIPS machine
Summary: KDEConnectd crashes on FIPS machine
Status: RESOLVED DUPLICATE of bug 453875
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-01 15:09 UTC by Joe Kale
Modified: 2025-05-21 03:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Kale 2025-04-01 15:09:57 UTC
Application: kdeconnectd (21.12.3)

Qt Version: 5.15.3
Frameworks Version: 5.92.0
Operating System: Linux 5.15.0-135-fips x86_64
Windowing System: X11
Distribution: Ubuntu 22.04.5 LTS
DrKonqi: 5.24.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
Starting a new KDE session via `plasma_session`

- Unusual behavior I noticed:
KDEConnect Daemon crashed

- Custom settings of the application:
I'm using an Ubuntu 22.04 FIPS machine. I believe that this is core to the issue, as there are logs indicating that KDEConnect daemon fails to read a cert stored in ~/.config/kdeconnect. Indeed, this cert is an empty file. However, when I disable FIPS, or more accurately, fake FIPS being disabled by bind-mounting over `/proc/sys/crypto`, the certificate is populated, and KDEConnect does not seem to crash.

More interestingly, if I re-enable FIPS (un-bind-mount), it KDEConnect still does not crash.

Even if KDEConnect cannot support FIPS-approved crypto, the behavior should not be to generate an empty certificate file, then segfault when reading said empty file, which AFAICT is what's happening. If the file in `~/.config/kdeconnect` is malformed in any way, I'd expect KDEConnect to handle that gracefully and bail-out instead of segfaulting.

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Connect Daemon (kdeconnectd), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f311c099e96 in KdeConnectConfig::deviceId() () at /lib/x86_64-linux-gnu/libkdeconnectcore.so.21
#5  0x00007f311c09ebc7 in NetworkPacket::createIdentityPacket(NetworkPacket*) () at /lib/x86_64-linux-gnu/libkdeconnectcore.so.21
#6  0x00007f311c08aac9 in LanLinkProvider::broadcastToNetwork() () at /lib/x86_64-linux-gnu/libkdeconnectcore.so.21
#7  0x00007f311ab62793 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f311ab667fe in QTimer::timeout(QTimer::QPrivateSignal) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f311ab5833f in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f311b6b0713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f311ab2ae3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f311ab833eb in QTimerInfoList::activateTimers() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f311ab83cec in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f3118c51d3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007f3118ca72b8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f3118c4f3e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007f311ab840b8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f311ab2975b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f311ab31cf4 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x0000556a918e1f9e in  ()
#21 0x00007f311a200d90 in __libc_start_call_main (main=main@entry=0x556a918e1b70, argc=argc@entry=1, argv=argv@entry=0x7fffa6f8b6a8) at ../sysdeps/nptl/libc_start_call_main.h:58
#22 0x00007f311a200e40 in __libc_start_main_impl (main=0x556a918e1b70, argc=1, argv=0x7fffa6f8b6a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffa6f8b698) at ../csu/libc-start.c:392
#23 0x0000556a918e2225 in _start ()
[Inferior 1 (process 2778301) detached]

Possible duplicates by query: bug 498125, bug 487707, bug 484576, bug 481760, bug 473351.

Report to https://bugs.kde.org/
Comment 1 cwo 2025-05-10 07:56:39 UTC
Thank you for the bug report! This seems to be the same crash as bug 476422, which I suspect is in turn another variant of  481760.

There have been no reports of this happening on a KDE Connect version from the last year or so (and plenty from before) so the issue is most likely fixed. The version you're using is over three years old.

*** This bug has been marked as a duplicate of bug 476422 ***
Comment 2 cwo 2025-05-10 08:00:52 UTC
Sorry, that should have been bug 453875.

*** This bug has been marked as a duplicate of bug 453875 ***