ath12k: NULL dereference in ath12k_link_sta_rhash_delete() when an MLO station is removed during recovery

Christopher Griffin christophergriffin05 at gmail.com
Fri Nov 13 19:30:36 PST 2026


Hello,

I hit a kernel panic on an AP with three QCN9274 hw2.0 on PCIe that are
grouped into one hardware group through the WSI graph (IPQ9574 board,
one AP MLD across 2.4, 5 and 6 GHz).

Software: OpenWrt main, kernel 6.18.60, wireless stack from backports
7.2 with OpenWrt's ath12k patches (none of them touch the functions
named below), hostapd from OpenWrt main, firmware
WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 on all three chips.

Seen once; I have not tried to reproduce it yet. This report and the
source analysis in it were written with Claude, an AI coding assistant.

What happened

1. A multi-link client (Intel BE200, links on 6 GHz and 5 GHz,
   association link 6 GHz) was connected and passing traffic normally.

2. The 6 GHz link of the AP MLD was restarted alone (OpenWrt "wifi
   reload" after a channel width change on that radio). hostapd logged
   "Announce the removal of ap-mld0 on phy phy1.0 before its restart"
   and CTRL-EVENT-LINK-STA-REMOVED link_id=0. The driver logged (the
   prefix "ath12k_wifi7_pci 0002:01:00.0:" is shortened to "0002:",
   that is the 6 GHz chip; "0003:" is the 5 GHz chip; client addresses
   are masked):

   0002: Timeout in receiving vdev delete response
   0002: removing stale peer xx:xx:xx:xx:xx:2a from vdev_id 0

   From here the client was still associated (hostapd listed it on the
   5 GHz link, the client showed both links), but no frame reached it
   any more. That is the first problem: the station is neither moved
   nor removed.

3. Two minutes later the client disconnected and reconnected:

   0002: failed to clear all peer keys for vdev 1: -2
   0002: failed to find the peer to stop rx aggregation
   ap-mld0: HW problem - can not stop rx aggregation for
         xx:xx:xx:xx:xx:27 tid 0
   0002: mac station xx:xx:xx:xx:xx:2a disconnect for vdev 1 without
         any connected station
   0002: failed to get peer assoc conf event for xx:xx:xx:xx:xx:2b
         vdev 1
   0002: Failed to associate station: xx:xx:xx:xx:xx:2b
   0002: unable to move link sta 0 of sta xx:xx:xx:xx:xx:2b from
         state 2 to 3
   0002: failed to send WMI_PEER_DELETE cmd
   0002: failed to delete peer vdev_id 1 addr xx:xx:xx:xx:xx:2b
         ret -108
   0003: failed to send WMI_PEER_DELETE cmd
   0003: failed to delete peer vdev_id 0 addr xx:xx:xx:xx:xx:2a
         ret -108
   mhi mhi2: Requested to power ON
   (then mhi1 and mhi3: all three devices of the group restart)

4. About six seconds into that recovery:

   Unable to handle kernel read from unreadable memory at virtual
     address 0000000000000000
   Internal error: Oops: 0000000096000005 [#1] SMP
   CPU: 3 UID: 101 PID: 2306 Comm: hostapd
     Tainted: G O 6.18.60 #0 NONE
   pc : ath12k_link_sta_rhash_delete+0x3c/0x220 [ath12k]
   lr : ath12k_mac_op_sta_state+0xe18/0x1764 [ath12k]
   Call trace:
    ath12k_link_sta_rhash_delete+0x3c/0x220 [ath12k] (P)
    ath12k_mac_op_sta_state+0xe18/0x1764 [ath12k]
    drv_sta_state+0x80/0x3e4 [mac80211]
    sta_set_sinfo+0x1158/0x1194 [mac80211]
    sta_info_destroy_addr_bss+0x34/0x48 [mac80211]
    ieee80211_del_station+0x1c/0x54 [mac80211]
    nl80211_del_station+0xdc/0x144 [cfg80211]
    genl_family_rcv_msg_doit+0xcc/0x140
    ...
   Code: f9641035 f9642037 79505418 79505819 (f94002b4)
   Kernel panic - not syncing: Oops: Fatal exception in interrupt

What the cause of the panic looks like

ath12k_core_reconfigure_on_crash() starts by calling
ath12k_link_sta_rhash_tbl_destroy(ab), which frees the table and sets
ab->rhead_sta_addr to NULL. The table is created again in
ath12k_core_start() once the firmware is back. In that window user
space can still delete a station. For an MLO station
ath12k_mac_ml_station_remove() calls ath12k_link_sta_rhash_delete() for
every link without looking at the device state, and
ath12k_link_sta_rhash_remove() passes ab->rhead_sta_addr straight to
rhashtable_remove_fast(). With the table pointer NULL that is the read
at address 0. ath12k_link_sta_rhash_insert() and
ath12k_link_sta_find_by_addr() use the pointer the same way.

Questions

- Is the table meant to be torn down at the start of recovery while
  mac80211 still holds stations, or should the entries be flushed and
  the table kept until the stations are gone?
- Would a guard in the insert/remove/lookup helpers (table pointer
  NULL, return -ENOENT) be acceptable as a fix, or should the station
  remove path skip the per-device cleanup while the device is in
  recovery? I can test either on this board.
- Separately, is a restart of a single link of an AP MLD (step 2)
  expected to leave multi-link stations in that state with this
  firmware, or should the station be dropped?

I can provide the full console log.

Hardware and firmware: QCN9274 hw2.0 PCI
WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1

Thanks,
Christopher Griffin



More information about the ath12k mailing list