net/lib80211: scrubbing the buffer for key
Subsystems (3)
PATCH 1/1 net/lib80211: scrubbing the buffer for key
The "key" is not scrubbed. As what peer modules do, the fixes zeros out the key buffer.
Signed-off-by Kangjie Lu <[email protected]>
--- net/wireless/lib80211_crypt_wep.c | 1 + 1 file changed, 1 insertion(+)
net/wireless/lib80211_crypt_wep.c +1 -0
@@ -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;
Signature · 1 line
2.17.1
Johannes Berg
maintainerQuoted 2 lines · Kangjie Lu
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