Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72713 - [iwd] Version 1.19 segfaults

Attached to Project: Community Packages
Opened by Tobias Menzi (TobTobXX) - Thursday, 11 November 2021, 13:50 GMT
Last edited by Jonas Witschel (diabonas) - Monday, 22 November 2021, 23:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Version iwd-1.19-1-x86_64 segfaults on my system, version iwd-1.18-1-x86_64.pkg.tar.zst doesn't.

I compiled it from source and upstream neither upstream 1.19 nor upstream master has the same behaviour.

Additional info:
[iwd.log: Output of /usr/lib/iwd/iwd -d (SSIDs and MAC addresses were removed)]
[coredump.txt: coredumpctl info]

Hardware:
01:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
Subsystem: Intel Corporation Wi-Fi 6 AX200NGW
Flags: bus master, fast devsel, latency 0, IRQ 61, IOMMU group 7
Memory at fea00000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi

Configuration:
/etc/iwd/main.conf:
[General]
EnableNetworkConfiguration=true

[Network]
NameResolvingService=systemd
EnableIPv6=true


And then only some networks in /var/lib/iwd/ with the PSKs.

Steps to reproduce:
- Start the iwd deamon either by directly executing or through systemd.
- Wait about about 5s.
This task depends upon

Closed by  Jonas Witschel (diabonas)
Monday, 22 November 2021, 23:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  ell 0.46-1
Comment by Jonas Witschel (diabonas) - Thursday, 11 November 2021, 14:09 GMT
How did you compile iwd? Arch applies some additional hardening flags during compilation, so this could be an upstream bug that is just "masked" by the fact that the daemon is not aborted without the additional checks that Arch enables. This is at least what the last "terminated by signal SIGSEGV (Address boundary error)" message in your iwd.log seems to point towards.

I cannot reproduce this on my system, so it might depend on your wireless adapter or network as well.
Comment by Jonas Witschel (diabonas) - Thursday, 11 November 2021, 14:47 GMT
Does removing "EnableIPv6=true" from /etc/iwd/main.conf fix the issue? If so, it is probably an upstream bug in ell, cf.iwd@lists.01.org/thread/MUBWZLDUDR4A5HARYKEOCPYPDCNLGMT5/"> https://lists.01.org/hyperkitty/list/iwd@lists.01.org/thread/MUBWZLDUDR4A5HARYKEOCPYPDCNLGMT5/ and  FS#71718 
Comment by Tobias Menzi (TobTobXX) - Friday, 12 November 2021, 13:59 GMT
I just tried it on my work WLAN and the segfault didn't trigger *sigh*. So it might really have sth to do with IPv6, since my work WLAN doesn't assign IPv6 addresses.

As for the how I compiled it, I cloned iwd and ell (seems to be required). And then:

$ ./bootstrap-configure --disable-manual-pages
$ make
$ sudo ./src/iwd

I disabled the man pages bc I encountered an error while generating them. I'd be very surprised if it is related, so I just didn't care.

Gonna try removing the setting later this week...
Comment by Jonas Witschel (diabonas) - Friday, 12 November 2021, 15:41 GMT
One possible way to test whether the issue is related to the compilation flags that Arch applies or whether the bug has been fixed upstream would be using the iwd-git (and ell-git) package from the AUR instead of manually compiling and installing, since that will apply similar hardening flags than the repository package. Even better would be building the packages in a clean chroot (https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot), this will reproduce the way repository packages are built exactly.

If my regarding the upstream bug in ell is correct, building and installing ell-git should fix the issue, even in combination with the iwd 1.19-1 repository package.
Comment by Tobias Menzi (TobTobXX) - Sunday, 14 November 2021, 15:43 GMT
Removing the EnableIPv6=true from the main.conf file did in fact fix the crashes. And it applies to 1.19-2 too btw.

I'll test the AUR versions and the clean build some time next week.
Comment by Jonas Witschel (diabonas) - Sunday, 14 November 2021, 15:59 GMT
That would be great! If it works with ell-git, it's most definitely the ell bug I linked above and we can backport https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=d0f00698245a2dccbd4b853e3d7b94e7a76cd906 to fix it.
Comment by Jonas Witschel (diabonas) - Thursday, 18 November 2021, 23:23 GMT
ell version 0.46 has been released and is now in the testing repositories, including the mentioned patch.
Comment by Tobias Menzi (TobTobXX) - Monday, 22 November 2021, 23:24 GMT
The upgrade of ell from 0.45-1 -> 0.46-1 resolves the issue with any iwd version (1.18 through 1.20).

Should I do further investigation with clean builds or similar?

Thank you for your effort and sorry for the overdue response, I couldn't find time at all the last week.
Comment by Jonas Witschel (diabonas) - Monday, 22 November 2021, 23:28 GMT
No problem, thank you for closing the loop! Since the ell update seems to fix the problem, I guess this was the upstream bug mentioned above that should be fixed now, so I am going to close this issue. Feel free to request a reopen if the segfaults should come back.

Loading...