security/keys: properly zero out sensitive key material in big_key
commit2f9be92dfffec82fbaebc9ff32c749b5764fea19
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 20 Sep 2017 14:58:38 +0000 (20 16:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2017 07:44:00 +0000 (5 09:44 +0200)
tree64ead67877247657df358198b7bdc08a4e57ae9d
parentb60f791ef32db376d55f047748615baee9dc63ef
security/keys: properly zero out sensitive key material in big_key

commit 910801809b2e40a4baedd080ef5d80b4a180e70e upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/keys/big_key.c