mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: connac: fix possible NULL-pointer deref in mt76_connac_mcu_uni_bss_he_tlv()
mt76_connac_get_he_phy_cap routine can theoretically return NULL so
check cap pointer before dereferencing it.
Fixes: d0e274af2f2e4 ("mt76: mt76_connac: create mcu library")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/20260621-mt76_connac_get_he_phy_cap-fix-v1-1-ed4ccf7a0363@kernel.org
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
a2c3c698e4
commit
96c2311712
@@ -1501,6 +1501,8 @@ mt76_connac_mcu_uni_bss_he_tlv(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||
struct bss_info_uni_he *he;
|
||||
|
||||
cap = mt76_connac_get_he_phy_cap(phy, vif);
|
||||
if (!cap)
|
||||
return;
|
||||
|
||||
he = (struct bss_info_uni_he *)tlv;
|
||||
he->he_pe_duration = vif->bss_conf.htc_trig_based_pkt_ext;
|
||||
|
||||
Reference in New Issue
Block a user