security/keys: properly zero out sensitive key material in big_key
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 20 Sep 2017 14:58:38 +0000 (16:58 +0200)
committerDavid Howells <dhowells@redhat.com>
Mon, 25 Sep 2017 22:31:41 +0000 (23:31 +0100)
commit910801809b2e40a4baedd080ef5d80b4a180e70e
treeb69813553e15cbf2dce12cfd929afdf3f1602b60
parente007ce9c59bddd1e67b94bc29036d920f5c5428a
security/keys: properly zero out sensitive key material in big_key

Error paths forgot to zero out sensitive material, so this patch changes
some kfrees into a kzfrees.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Eric Biggers <ebiggers3@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Kirill Marinushkin <k.marinushkin@gmail.com>
Cc: security@kernel.org
Cc: stable@vger.kernel.org
security/keys/big_key.c