Commit bf5238b2 authored by Felix Fietkau's avatar Felix Fietkau

mt76: add sanity check for a-mpdu rx wcid index

Avoid dereferencing invalid ids
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 237312c5
......@@ -644,7 +644,7 @@ mt76_airtime_flush_ampdu(struct mt76_dev *dev)
return;
wcid_idx = dev->rx_ampdu_status.wcid_idx;
if (dev->rx_ampdu_status.wcid_idx != 0xff)
if (wcid_idx < ARRAY_SIZE(dev->wcid))
wcid = rcu_dereference(dev->wcid[wcid_idx]);
else
wcid = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment