summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorAviel Zohar <avielzohar123@gmail.com>2026-04-13 06:31:34 +0300
committerFelix Fietkau <nbd@nbd.name>2026-06-09 10:15:21 +0000
commitc7369a00860a0704461d440e7c3bf9b49bfdbaee (patch)
treea97ee73d72d9d7bbaf548f3fdc80cf27869df5dc /tools/lib/python
parenta1152244702bb31b64650e5ca8308142286c0e4a (diff)
wifi: mt76: mt7925: validate skb length in testmode query
In mt7925_tm_query(), the response skb from mt76_mcu_send_and_get_msg() is used in a memcpy without validating its length: memcpy(evt_resp, skb->data + 8, MT7925_EVT_RSP_LEN); where MT7925_EVT_RSP_LEN is 512. If the firmware returns a response shorter than 520 bytes (8 + 512), this reads beyond the skb data buffer. The over-read data is then returned to userspace via nla_put() in mt7925_testmode_dump(). Add a length check before the memcpy to ensure the skb contains sufficient data. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Aviel Zohar <avielzohar123@gmail.com> Link: https://patch.msgid.link/20260413033136.5417-2-avielzohar123@gmail.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions