linux/drivers/net/wireless/mediatek/mt76/mt7996
Lu Huang 52f6a065e0 wifi: mt76: mt7996: fix uninitialized buf read in mt7996_variant_fem_init()
When the eFuse block covering MT7976C_EFUSE_OFFSET is invalid,
mt7996_mcu_get_eeprom() returns -EINVAL without writing buf, but
mt7996_variant_fem_init() tolerates -EINVAL and keeps running, so
buf[idx] == 0xc reads uninitialized stack memory.  A stale 0x0c byte
misclassifies a 0x7976 aDie as 7976C, selects MT7996_FEM_INT and the
wrong default EEPROM, overriding valid calibration data.  Only consult
the eFuse byte when the read succeeded; with an invalid eFuse, fall
back to the three explicit aDie version checks.

Fixes: e8cb33ad54 ("wifi: mt76: mt7996: add support for more variants")
Cc: stable@vger.kernel.org
Signed-off-by: Lu Huang <huanglu@kylinos.cn>
Link: https://patch.msgid.link/20260930085435.1424493-1-huanglu@kylinos.cn
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-10-06 11:50:52 +02:00
..
coredump.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
coredump.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
debugfs.c wifi: mt76: Drop unneeded mt76_register_debugfs_fops() return checks 2026-06-09 10:34:02 +00:00
dma.c wifi: mt76: mt7996: Fix NULL pointer dereference in mt7996_init_tx_queues() 2026-06-09 10:15:20 +00:00
eeprom.c wifi: mt76: mt7996: validate default EEPROM firmware size 2026-07-31 12:25:38 +00:00
eeprom.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
init.c wifi: mt76: mt7996: fix uninitialized buf read in mt7996_variant_fem_init() 2026-10-06 11:50:52 +02:00
Kconfig wifi: mt76: fix airoha_npu dependency tracking 2026-07-22 06:13:31 +00:00
mac.c wifi: mt76: mt7996: reject iTWT setup requests from MLD stations 2026-08-01 14:49:43 +00:00
mac.h wifi: mt76: mt7996: offload radar threshold initialization 2026-03-23 09:14:42 +00:00
main.c wifi: mt76: use ALTX queue for packets to disassociated stations 2026-10-06 11:50:52 +02:00
Makefile wifi: mt76: mt7996: Add NPU offload support to MT7996 driver 2025-11-24 14:37:54 +01:00
mcu.c wifi: mt76: mt7996: handle UNI PS sync events 2026-08-01 15:22:41 +00:00
mcu.h wifi: mt76: mt7996: fix struct mt7996_mcu_wed_rro_ba_delete_event layout 2026-10-06 11:50:52 +02:00
mmio.c wifi: mt76: mt7996: handle UNI PS sync events 2026-08-01 15:22:41 +00:00
mt7996.h wifi: mt76: mt7996: leave PS when a 4-address connection is established 2026-08-01 14:49:36 +00:00
npu.c wifi: mt76: mt7996: Store DMA mapped buffer addresses in mt7996_npu_hw_init() 2026-03-23 09:23:01 +00:00
pci.c wifi: mt76: mt7996: remove redundant pdev->bus check in probe 2026-06-09 10:15:22 +00:00
regs.h wifi: mt76: mt7996: fix MIB TX aggregation counter registers for mt7990 2026-08-01 14:49:42 +00:00