wifi: mt76: mt7996: fix NULL pointer dereference in mt7996_mcu_sta_bfer_he

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ma Ke <make24@xxxxxxxxxxx>

commit f503ae90c7355e8506e68498fe84c1357894cd5b upstream.

Fix the NULL pointer dereference in mt7996_mcu_sta_bfer_he
routine adding an sta interface to the mt7996 driver.

Found by code review.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Ma Ke <make24@xxxxxxxxxxx>
Link: https://patch.msgid.link/20240813081242.3991814-1-make24@xxxxxxxxxxx
Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -1300,6 +1300,9 @@ mt7996_mcu_sta_bfer_he(struct ieee80211_
 	u8 nss_mcs = mt7996_mcu_get_sta_nss(mcs_map);
 	u8 snd_dim, sts;
 
+	if (!vc)
+		return;
+
 	bf->tx_mode = MT_PHY_TYPE_HE_SU;
 
 	mt7996_mcu_sta_sounding_rate(bf);


Patches currently in stable-queue which might be from make24@xxxxxxxxxxx are

queue-6.6/drivers-media-dvb-frontends-rtl2830-fix-an-out-of-bo.patch
queue-6.6/wifi-mt76-mt7921-check-devm_kasprintf-returned-value.patch
queue-6.6/wifi-mt76-mt7915-check-devm_kasprintf-returned-value.patch
queue-6.6/wifi-mt76-mt7615-check-devm_kasprintf-returned-value.patch
queue-6.6/wifi-mt76-mt7996-fix-null-pointer-dereference-in-mt7996_mcu_sta_bfer_he.patch
queue-6.6/asoc-rt5682s-return-devm_of_clk_add_hw_provider-to-t.patch
queue-6.6/asoc-rt5682-return-devm_of_clk_add_hw_provider-to-transfer-the-error.patch
queue-6.6/spi-ppc4xx-handle-irq_of_parse_and_map-errors.patch
queue-6.6/drivers-media-dvb-frontends-rtl2832-fix-an-out-of-bo.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux