Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895716 - sys-apps/fwupd-1.8.10 segmentation fault on fwupdtool get-devices
Summary: sys-apps/fwupd-1.8.10 segmentation fault on fwupdtool get-devices
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-02-21 11:35 UTC by aleck
Modified: 2023-03-06 22:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info.txt,7.11 KB, text/plain)
2023-02-21 11:36 UTC, aleck
Details
logging: fwupdtool get-devices (fwupdtool-get-devices.txt,33.43 KB, text/plain)
2023-02-21 11:37 UTC, aleck
Details
fwupdtool get-devices with gdb (fwupdtool-get-devices-gdb.txt,15.57 KB, text/plain)
2023-02-21 11:38 UTC, aleck
Details
Kernel Config (config,217.90 KB, text/plain)
2023-02-21 11:38 UTC, aleck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aleck 2023-02-21 11:35:57 UTC
After running fwupdtool get-devices the program crashes with a segmentation fault. The logfile is attached. 

Interesting is the message before the segfault: fu_strsplit: assertion 'sz > 0' failed

I also gets an segfault when running the service /etc/init.d/fwupd start

In the syslog I see following entries for both tries:

Feb 21 12:24:05 localhost kernel: fwupdtool[22982]: segfault at 0 ip 00007f16bd9d0fbd sp 00007ffe6be37380 error 4 in libfwupdplugin.so[7f16bd9be000+60000] likely on CPU 5 (core 2, socket 0)
Feb 21 12:24:05 localhost kernel: Code: 69 31 ff ff 48 8b 74 24 08 49 89 c4 48 85 f6 74 8b 48 8b 7c 24 10 48 ff ce b9 ff ff ff ff 48 8d 15 a5 ed 04 00 e8 13 18 ff ff <48> 8b 38 49 89 c7 48 85 ff 74 67 31 db 4c 8d 2d ff 75 05 00 66 66


I'm not aware if I need any special kernel configuration for using fwupd. I've attached my kernel-config, too.

Reproducible: Always

Steps to Reproduce:
1. run fwupdtool get-devices

Actual Results:  
Segfault

Expected Results:  
runs to the end
Comment 1 aleck 2023-02-21 11:36:35 UTC
Created attachment 853486 [details]
emerge --info
Comment 2 aleck 2023-02-21 11:37:43 UTC
Created attachment 853488 [details]
logging: fwupdtool get-devices
Comment 3 aleck 2023-02-21 11:38:02 UTC
Created attachment 853490 [details]
fwupdtool get-devices with gdb
Comment 4 aleck 2023-02-21 11:38:45 UTC
Created attachment 853492 [details]
Kernel Config
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 17:00:28 UTC
Could you report it upstream at https://github.com/fwupd/fwupd/issues and link it here please? Thanks!
Comment 6 aleck 2023-02-22 19:05:22 UTC
Thank you very much, I've opened a bug: 

https://github.com/fwupd/fwupd/issues/5575
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 22:34:21 UTC
heh, fixed already. Patch: https://github.com/fwupd/fwupd/commit/a754f93ff83fe0ce03a0ebce6c0b1485cf11dffc.
Comment 8 Larry the Git Cow gentoo-dev 2023-02-24 16:50:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c97f3a2803370134a89c1df8f2110f24e7cef4c

commit 2c97f3a2803370134a89c1df8f2110f24e7cef4c
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-02-24 11:38:37 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-02-24 16:49:56 +0000

    sys-apps/fwupd: add 1.8.11
    
    Closes: https://bugs.gentoo.org/895716
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 sys-apps/fwupd/Manifest                            |   1 +
 .../fwupd/files/fwupd-1.8.11-installed_tests.patch | 406 +++++++++++++++++++++
 sys-apps/fwupd/fwupd-1.8.11.ebuild                 | 197 ++++++++++
 3 files changed, 604 insertions(+)
Comment 9 aleck 2023-03-06 17:30:24 UTC
There is still another bug for this, that is now fixed in upstream, please see 
https://github.com/fwupd/fwupd/issues/5575

Thanks a lot for your work.
Comment 10 Larry the Git Cow gentoo-dev 2023-03-06 22:06:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d5d8540cfb53f55d192ff0867ba4d96b14062a5

commit 3d5d8540cfb53f55d192ff0867ba4d96b14062a5
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-03-06 21:57:43 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-03-06 22:06:05 +0000

    sys-apps/fwupd: backport the 2nd part of fwupdtool get-devices segfault fix
    
    Closes: https://bugs.gentoo.org/895716
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 .../files/fwupd-1.8.11-empty_kernel_cmdline.patch  |  19 ++
 sys-apps/fwupd/fwupd-1.8.11-r1.ebuild              | 194 +++++++++++++++++++++
 2 files changed, 213 insertions(+)