fscrypt: zeroize fscrypt_info before freeing
authorEric Biggers <ebiggers@google.com>
Wed, 9 Oct 2019 23:34:17 +0000 (16:34 -0700)
committerEric Biggers <ebiggers@google.com>
Mon, 21 Oct 2019 20:22:08 +0000 (13:22 -0700)
commit6f99756dab5ba23e5dc74cd4ad24edd53af39beb
tree6a804de11a982e65238d1e3b8271427e31c1d580
parent1565bdad59e97f31cfc7b065bc0fc77e9549e62d
fscrypt: zeroize fscrypt_info before freeing

memset the struct fscrypt_info to zero before freeing.  This isn't
really needed currently, since there's no secret key directly in the
fscrypt_info.  But there's a decent chance that someone will add such a
field in the future, e.g. in order to use an API that takes a raw key
such as siphash().  So it's good to do this as a hardening measure.

Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/keysetup.c