Skip to contentSkip to conversation

crypto: AF_ALG: zeroize key data

PATCH In review Stephan Mueller 2 participants 2 messages Dec 23, 2014 – Dec 25, 2014 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: AF_ALG: zeroize key data

alg_setkey should zeroize the sensitive data after use.

---
 crypto/af_alg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/af_alg.c +1 -1
index a8ff3c4..76d739d 100644
@@ -188,7 +188,7 @@ static int alg_setkey(struct sock *sk, char __user *ukey,
 	err = type->setkey(ask->private, key, keylen);
 
 out:
-	sock_kfree_s(sk, key, keylen);
+	sock_kzfree_s(sk, key, keylen);
 
 	return err;
 }
Signature · 1 line
2.1.0
maintainer
#1 lore raw
Quoted 3 lines · Stephan Mueller

alg_setkey should zeroize the sensitive data after use.

Patch applied.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt