Bug 431079 - Segmentation fault when mounting baloosearch:/
Summary: Segmentation fault when mounting baloosearch:/
Status: RESOLVED FIXED
Alias: None
Product: kiofuse
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.0.0
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: a.saoutkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-02 19:52 UTC by a.saoutkin
Modified: 2021-01-10 15:18 UTC (History)
2 users (show)

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


Attachments
backtrace (6.49 KB, text/plain)
2021-01-02 19:52 UTC, a.saoutkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a.saoutkin 2021-01-02 19:52:37 UTC
Created attachment 134483 [details]
backtrace

SUMMARY
KIO FUSE produces a segmentation fault when browsing in baloosearch

STEPS TO REPRODUCE
1. Have kio-fuse runnning
2. dbus-send --session --print-reply --type=method_call --dest=org.kde.KIOFuse /org/kde/KIOFuse org.kde.KIOFuse.VFS.mountUrl string:baloosearch:/
3. 

OBSERVED RESULT
Segmentation Fault

EXPECTED RESULT
No Crash

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Kernel Version: 5.8.0-33-generic
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-5820K CPU @ 3.30GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVF1

ADDITIONAL INFORMATION
Baloo is likely to require a fix as well as it returns odd information about itself in its UDSEntry. However, the crash can easily be avoided.
Comment 1 Bug Janitor Service 2021-01-02 20:09:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/kio-fuse/-/merge_requests/43
Comment 2 Bug Janitor Service 2021-01-07 21:55:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/kio-fuse/-/merge_requests/44
Comment 3 a.saoutkin 2021-01-07 21:58:32 UTC
Git commit 1ee510baa80c834bbcf77a008e5668dbf3eccf4d by Alexander Saoutkin.
Committed on 07/01/2021 at 21:53.
Pushed by asaoutkin into branch 'master'.

Check return value of createNodeFromUDSEntry()

createNodeFromUDSEntry() can return a nullptr, which it does when
passed any URL from the baloosearch protocol.

M  +5    -0    kiofusevfs.cpp

https://invent.kde.org/system/kio-fuse/commit/1ee510baa80c834bbcf77a008e5668dbf3eccf4d
Comment 4 Fabian Vogt 2021-01-10 15:18:33 UTC
Git commit d69959e226b1b49a1fc2d1a566acd4fdde0f97c3 by Fabian Vogt.
Committed on 10/01/2021 at 15:18.
Pushed by fvogt into branch 'master'.

UDS_URL is not meant for links, Use UDS_TARGET_URL instead

The KIO documentation for UDS_URL says:
`use UDS_TARGET_URL if you want "links" to unrelated urls.`
So the use of UDS_URL here was probably wrong.
Switching to UDS_TARGET_URL fixes mounting of some slaves such as baloosearch,
which set UDS_URL to the URL of the entry itself for some reason.

M  +5    -3    kiofusevfs.cpp

https://invent.kde.org/system/kio-fuse/commit/d69959e226b1b49a1fc2d1a566acd4fdde0f97c3