crypto: af_alg - zeroize key data
authorStephan Mueller <smueller@chronox.de>
Tue, 23 Dec 2014 08:34:03 +0000 (09:34 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Dec 2014 21:33:36 +0000 (08:33 +1100)
alg_setkey should zeroize the sensitive data after use.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c

index a8ff3c44e13ca6ec0ad3aadbca1988665857da16..76d739d08211892c37f2f1be5162fa6c58ad0187 100644 (file)
@@ -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;
 }