linux/drivers/net/wireless/intersil/p54
Heyang Tan db7b86bd97 wifi: p54: validate firmware record lengths
The p54 firmware parser accesses component ID and component version
records without checking that their lengths cover the fields being read.
A malformed record can therefore make the parser read past the record.

Validate the component ID and component version record lengths before
accessing their data. The descriptor record is also checked against the
shortest descriptor length found in the supported firmware images.

Reject descriptor values that underflow the RX offset or produce an empty
RX range before updating the driver state.

Assisted-by: LLM Codex
Signed-off-by: Heyang Tan <thy15333007817@163.com>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
Link: https://patch.msgid.link/20260918083349.891-1-thy15333007817@163.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-09-21 16:30:25 +02:00
..
eeprom.c wifi: p54: require a full exp_if record in PDR_INTERFACE_LIST 2026-09-04 10:12:59 +02:00
eeprom.h wifi: p54: Replace zero-length array of trailing structs with flex-array 2022-11-22 12:17:12 +02:00
fwio.c wifi: p54: validate firmware record lengths 2026-09-21 16:30:25 +02:00
Kconfig wifi: p54: update stale wireless wiki URLs 2026-07-06 12:59:05 +02:00
led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
lmac.h p54: Replace zero-length array with flexible-array member 2020-03-23 19:01:13 +02:00
main.c wifi: p54: Fix memory leak in p54_beacon_update() 2026-01-27 13:43:14 +01:00
Makefile
p54.h wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback() 2025-05-21 09:26:27 +02:00
p54pci.c wifi: p54: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-06-12 15:01:09 +03:00
p54pci.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
p54spi_eeprom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
p54spi.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
p54spi.h p54spi: convert to devicetree 2026-05-20 12:05:04 +02:00
p54usb.c wifi: p54: update stale wireless wiki URLs 2026-07-06 12:59:05 +02:00
p54usb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
txrx.c wifi: p54: validate RX frame length in p54_rx_eeprom_readback() 2026-07-06 14:11:07 +02:00