]> git.ipfire.org Git - thirdparty/openwrt.git/commit
wifi-scripts: ucode: fix null dereference for 6GHz-only radios 23496/head
authordastarothx <darkastalier@gmail.com>
Sat, 23 May 2026 16:40:20 +0000 (12:40 -0400)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 24 May 2026 11:14:17 +0000 (13:14 +0200)
commit903310097b458087e7d8095aea5cbcb70159cc7b
treede57c06444376ba380ced26a24255f8bfd1e64a7
parent67a870c9c61ff66f850b66d1dc581109ae852f83
wifi-scripts: ucode: fix null dereference for 6GHz-only radios

he_phy_cap and he_mac_cap in phy_capabilities are only populated inside
the iftype_data loop. On 6GHz-only radios (e.g. QCN9074/ath11k_pci),
when capability bytes are unavailable they remain null, causing null
dereferences in device_htmode_append():

  Reference error: left-hand side expression is null
  if (!(he_phy_cap[3] & 0x80))

Initialise both to [] before the loop and guard the consumer side with
?? [] so bitwise checks conservatively disable beamformer/beamformee/twt
features rather than crashing.

Link: https://github.com/openwrt/openwrt/issues/23488
Signed-off-by: dastarothx <darkastalier@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23496
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc