kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()
@ 2021-06-25 14:58 Dan Carpenter
  2021-06-26  9:43 ` Kalle Valo
  2021-06-26 11:42 ` Felix Fietkau
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-06-25 14:58 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Lorenzo Bianconi, Ryder Lee, Kalle Valo, Matthias Brugger,
	Shayne Chen, linux-wireless, linux-mediatek, kernel-janitors

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")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 863aa18b3024..21769e4f6bc7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -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);
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()
  2021-06-25 14:58 [PATCH] mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal() Dan Carpenter
@ 2021-06-26  9:43 ` Kalle Valo
  2021-06-26 11:42 ` Felix Fietkau
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-06-26  9:43 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Matthias Brugger,
	Shayne Chen, linux-wireless, linux-mediatek, kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> writes:

> 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()
  2021-06-25 14:58 [PATCH] mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal() Dan Carpenter
  2021-06-26  9:43 ` Kalle Valo
@ 2021-06-26 11:42 ` Felix Fietkau
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2021-06-26 11:42 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Lorenzo Bianconi, Ryder Lee, Kalle Valo, Matthias Brugger,
	Shayne Chen, linux-wireless, linux-mediatek, kernel-janitors

On 2021-06-25 16:58, Dan Carpenter wrote:
> 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Felix Fietkau <nbd@nbd.name>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-26 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 14:58 [PATCH] mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal() Dan Carpenter
2021-06-26  9:43 ` Kalle Valo
2021-06-26 11:42 ` Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).