Skip to content

Commit 69dcc19

Browse files
nbd168gregkh
authored andcommitted
wifi: mt76: mt7996: add missing check for rx wcid entries
[ Upstream commit 4a522b0 ] Non-station wcid entries must not be passed to the rx functions. In case of the global wcid entry, it could even lead to corruption in the wcid array due to pointer being casted to struct mt7996_sta_link using container_of. Fixes: 7464b12 ("wifi: mt76: mt7996: rework mt7996_rx_get_wcid to support MLO") Link: https://patch.msgid.link/20250827085352.51636-3-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 98fa445 commit 69dcc19

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7996

1 file changed

+1
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt7996/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static struct mt76_wcid *mt7996_rx_get_wcid(struct mt7996_dev *dev,
6262
int i;
6363

6464
wcid = mt76_wcid_ptr(dev, idx);
65-
if (!wcid)
65+
if (!wcid || !wcid->sta)
6666
return NULL;
6767

6868
if (!mt7996_band_valid(dev, band_idx))

0 commit comments

Comments
 (0)