Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wpa_supplicant: Fix crash on unexpected restarts of wpa_supplicant #931

Merged

Conversation

cfconrad
Copy link
Collaborator

Once wpa_supplicant restart unexpected, wickedd tend to crash, if the wpa_supplicant handler code was currently in one of the
DBus calls. To fix this, we need refcounting for the DBus objects of wpa_supplicant and be aware of such a situation in error handing.

Copy link
Member

@mtomaschewski mtomaschewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please fix indenting in the commit message:

commit 3309697d1dd9eee6470a04c63f84e630695810e9
Author: Clemens Famulla-Conrad <[email protected]>
Date:   Thu Jul 7 22:18:08 2022 +0200

    wpa-supplicant: Add refcounting for ni_wpa_bss_t
    
    Each call on DBus can result in async receving of DBus signals.                                                                                                                                                                         Thus we need to protect our current working object, that it                                                                                                                                                                             do not get removed because of such a signal.

Each call on DBus can result in async receving of DBus signals.
Thus we need to protect our current working object, that it
do not get removed because of such a signal.

Signed-off-by: Clemens Famulla-Conrad <[email protected]>
Each call on DBus can result in async receving of DBus signals.
Thus we need to protect our current working object, that it
do not get removed because of such a signal.
If the wpa_supplicant restart (e.g. segfault), the restart handler cleanup
all internal data structures associated to this wpa_supplicant instance.
With this, the ni_wpa_wif_t->client is set to NULL and we need to cover
this stage in each translate error call.
@cfconrad cfconrad force-pushed the wireless_fix_wpa_supplicant_restart branch from 9f18241 to d7ee347 Compare October 5, 2022 10:48
@cfconrad
Copy link
Collaborator Author

cfconrad commented Oct 5, 2022

Changed the commit message and rebased on top of master.

@mtomaschewski mtomaschewski self-requested a review October 5, 2022 13:31
Copy link
Member

@mtomaschewski mtomaschewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtomaschewski mtomaschewski merged commit 84a3759 into openSUSE:master Oct 5, 2022
@cfconrad cfconrad mentioned this pull request Oct 20, 2022
mtomaschewski added a commit that referenced this pull request Oct 20, 2022
- version 0.6.70
- build: Link as Position Independent Executable (bsc#1184124)
- dhcp4: Fix issues in reuse of last lease (bsc#1187655)
- dhcp6: Add option to refresh lease (jsc#SLE-9492,jsc#SLE-24307)
- dhcp6: Remove address before release (USGv6 DHCPv6_1_2_07b)
- dhcp6: Ignore lease release status (USGv6 DHCPv6_1_2_07e,1_3_03)
- dhcp6: Consider ppp interfaces supported (gh##924)
- team: Fix to configure port priority in teamd (bsc#1200505)
- firewall-ext: No config change on ifdown (bsc#1201053,bsc#118950)
- wireless: Fix SEGV on supplicant restart (gh##931)
- wireless: Add support for WPA3 and PMF (bsc#1198894)
- wireless: Remove libiw dependencies (gh##910)
- client: Fix SEGV on empty xpath results (gh##919) 
- client: Add release options to ifdown/ifreload (jsc#SLE-10249)
- dbus: Clear string array before append (gh##913)
- socket: Fix SEGV on heavy socket restart errors (bsc#1192508)
- systemd: Remove systemd-udev-settle dependency (bsc#1186787)
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Oct 22, 2022
https://build.opensuse.org/request/show/1030243
by user wicked-maintainers + dimstar_suse
- changes: spell fixes
- version 0.6.70
- build: Link as Position Independent Executable (bsc#1184124)
- dhcp4: Fix issues in reuse of last lease (bsc#1187655)
- dhcp6: Add option to refresh lease (jsc#SLE-9492,jsc#SLE-24307)
- dhcp6: Remove address before release (USGv6 DHCPv6_1_2_07b)
- dhcp6: Ignore lease release status (USGv6 DHCPv6_1_2_07e,1_3_03)
- dhcp6: Consider ppp interfaces supported (gh#openSUSE/wicked#924)
- team: Fix to configure port priority in teamd (bsc#1200505)
- firewall-ext: No config change on ifdown (bsc#1201053,bsc#118950)
- wireless: Fix SEGV on supplicant restart (gh#openSUSE/wicked#931)
- wireless: Add support for WPA3 and PMF (bsc#1198894)
- wireless: Remove libiw dependencies (gh#openSUSE/wicked#910)
- client: Fix SEGV on empty xpath results (gh#openSUSE/wicked#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants