Skip to content
/ linux Public

Commit 3356464

Browse files
LorenzoBianconigregkh
authored andcommitted
wifi: mt76: mt7925: Fix possible oob access in mt7925_mac_write_txwi_80211()
[ Upstream commit c41a9ab ] Check frame length before accessing the mgmt fields in mt7925_mac_write_txwi_80211 in order to avoid a possible oob access. Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260226-mt76-addba-req-oob-access-v1-2-b0f6d1ad4850@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ca1adc0 commit 3356464

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ mt7925_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
671671
u32 val;
672672

673673
if (ieee80211_is_action(fc) &&
674+
skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 &&
674675
mgmt->u.action.category == WLAN_CATEGORY_BACK &&
675676
mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ)
676677
tid = MT_TX_ADDBA;

0 commit comments

Comments
 (0)