* [PATCH] net/lib80211: scrubbing the buffer for key
@ 2019-10-18 4:53 Kangjie Lu
2019-10-18 8:43 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Kangjie Lu @ 2019-10-18 4:53 UTC (permalink / raw)
To: kjlu; +Cc: Johannes Berg, David S. Miller, linux-wireless, netdev, linux-kernel
The "key" is not scrubbed. As what peer modules do, the fixes zeros
out the key buffer.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
net/wireless/lib80211_crypt_wep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/wireless/lib80211_crypt_wep.c b/net/wireless/lib80211_crypt_wep.c
index dafc6f3571db..08e511aaa1ff 100644
--- a/net/wireless/lib80211_crypt_wep.c
+++ b/net/wireless/lib80211_crypt_wep.c
@@ -202,6 +202,7 @@ static int lib80211_wep_set_key(void *key, int len, u8 * seq, void *priv)
if (len < 0 || len > WEP_KEY_LEN)
return -1;
+ memset(wep, 0, sizeof(*wep));
memcpy(wep->key, key, len);
wep->key_len = len;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/lib80211: scrubbing the buffer for key
2019-10-18 4:53 [PATCH] net/lib80211: scrubbing the buffer for key Kangjie Lu
@ 2019-10-18 8:43 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2019-10-18 8:43 UTC (permalink / raw)
To: Kangjie Lu; +Cc: David S. Miller, linux-wireless, netdev, linux-kernel
On Thu, 2019-10-17 at 23:53 -0500, Kangjie Lu wrote:
> The "key" is not scrubbed. As what peer modules do, the fixes zeros
> out the key buffer.
Why do you think this is useful/necessary? Please always describe that
in the commit log.
FWIW, I'm convinced that it's not at necessary at all, looking at how
this is allocated ...
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-18 8:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 4:53 [PATCH] net/lib80211: scrubbing the buffer for key Kangjie Lu
2019-10-18 8:43 ` Johannes Berg
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).