Skip to contentSkip to conversation

mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()

PATCH In review Dan Carpenter 3 participants 3 messages Jun 25, 2021 – Jun 26, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()

Zero out all the unused members of "req" so that we don't disclose stack information.

Fixes 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -1
index 863aa18b3024..21769e4f6bc7 100644
@@ -3481,7 +3481,7 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
 		u8 idx;
 		u8 rsv[4];
 		__le32 len;
-	} req;
+	} req = {};
 	struct sk_buff *skb;
 
 	skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, sizeof(req) + len);
Signature · 7 lines
2.30.2


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#1 lore raw
Quoted 5 lines · Dan Carpenter

Zero out all the unused members of "req" so that we don't disclose stack information.

Fixes 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")

Felix, should I take this directly to wireless-drivers? If yes, please ack.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

Zero out all the unused members of "req" so that we don't disclose stack information.

Fixes 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek