summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorAviel Zohar <avielzohar123@gmail.com>2026-04-13 06:31:35 +0300
committerFelix Fietkau <nbd@nbd.name>2026-06-09 10:15:22 +0000
commit4497665cf4f680f8befbe3c980c93917a195d26b (patch)
treed434455d4fac763a80a11beb9a52a3afcb99d2e0 /tools/lib/python
parentc7369a00860a0704461d440e7c3bf9b49bfdbaee (diff)
wifi: mt76: mt7915: validate skb length in txpower SKU query
In mt7915_mcu_get_txpower_sku(), the response skb from mt76_mcu_send_and_get_msg() is used in memcpy without validating its length: For TX_POWER_INFO_RATE: memcpy(res, skb->data + 4, sizeof(res)); where sizeof(res) is MT7915_SKU_RATE_NUM * 2 = 322 bytes. For TX_POWER_INFO_PATH: memcpy(txpower, skb->data + 4, len); In both cases, if the firmware returns a response shorter than the expected size, the memcpy reads beyond the skb data buffer. The data surfaces to userspace via debugfs (txpower_sku and txpower_path). Add length checks for both code paths before the memcpy. Signed-off-by: Aviel Zohar <avielzohar123@gmail.com> Link: https://patch.msgid.link/20260413033136.5417-3-avielzohar123@gmail.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions