NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/60665: run: hot-plugging USB wifi crashes due to use of if_attach
>Number: 60665
>Category: kern
>Synopsis: run: hot-plugging USB wifi crashes due to use of if_attach
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 29 01:10:01 +0000 2026
>Originator: coypu
>Release: NetBSD 11.0_BETA
>Organization:
>Environment:
NetBSD 11.0_BETA NetBSD 11.0_BETA (GENERIC) #0: Mon Oct 20 14:11:07 UTC 2025 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Note: this is clearly an issue that affects multiple USB wifi adapters.
I have plugged a run(4) device after booting, with wpa_supplicant/dhcpcd already running.
It attempted to use the driver immediately as it was published, before some structs were initialized, causing a null deref crash with the following backtrace:
mutex_enter() at netbsd:mutex_enter+0xc
run_ioctl() at netbsd:run_ioctl+0x87
doifioctl() at netbsd:doifioctl+0xad3
sys_ioctl() at netbsd;sys_ioctl+0x1fa
syscall() at netbsd:syscall+0x9d
--- syscall (number 54) ---
netbsd:syscall+0x9d:
hot-pluggable wifi probably can't get away with the use of if_attach at all.
Drivers that don't have this issue (e.g. urtwn) split the calls:
if_initialize
ieee80211_ifattach
... finish initializing ...
if_register
>How-To-Repeat:
Hot plug a run(4) with wpa_supplicant running.
>Fix:
Home |
Main Index |
Thread Index |
Old Index