summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHeyang Tan <thy15333007817@163.com>2026-11-01 15:30:38 +0800
committerJeff Chen <jeff.chen_1@nxp.com>2026-11-03 14:23:57 +0800
commite7c7c4ca5c41c38bcd6bb08ab57f6ce53f4ed0df (patch)
tree66a4a211da837cd007db960630390d381d127b35 /tools/perf/scripts/python
parentbcc5bbaa6de61a0ccaa57228ca233b4390eca27e (diff)
wifi: nxpwifi: validate monitor RX extra-header length
nxpwifi_recv_packet_to_monif() assumes that rxpd_extra_info fits between the rxpd header and the start of the 802.11 frame. It ensures that rx_pkt_offset is at least sizeof(*rxpd), but the following check only proves that sizeof(struct ieee80211_hdr) bytes starting at rx_pkt_offset are present. If a malformed descriptor sets RXPD_FLAG_EXTRA_HEADER with a rx_pkt_offset below sizeof(*rxpd) + sizeof(ext), the 32-byte copy from rxpd + 1 can extend past the descriptor-reported end of the frame. For example, when rx_pkt_offset is sizeof(*rxpd), skb->len can be only sizeof(*rxpd) + sizeof(struct ieee80211_hdr), while the extra-header copy reads through offset sizeof(*rxpd) + sizeof(ext) - 1. Reject such descriptors before copying rxpd_extra_info. A single check next to the existing flag extraction also covers the HE copy site. The normal skb allocation has enough slack that the over-read stays within the allocation, so this is a defensive bounds fix. Signed-off-by: Heyang Tan <thy15333007817@163.com> Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions