linux-sg2042/security/keys/encrypted-keys
Eric Biggers a9dd74b252 KEYS: encrypted: sanitize all key material
For keys of type "encrypted", consistently zero sensitive key material
before freeing it.  This was already being done for the decrypted
payloads of encrypted keys, but not for the master key and the keys
derived from the master key.

Out of an abundance of caution and because it is trivial to do so, also
zero buffers containing the key payload in encrypted form, although
depending on how the encrypted-keys feature is used such information
does not necessarily need to be kept secret.

Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: David Safford <safford@us.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
2017-06-09 13:29:48 +10:00
..
Makefile encrypted-keys: module build fixes 2011-11-16 14:23:14 -05:00
ecryptfs_format.c encrypted-keys: create encrypted-keys directory 2011-09-14 15:22:26 -04:00
ecryptfs_format.h encrypted-keys: create encrypted-keys directory 2011-09-14 15:22:26 -04:00
encrypted.c KEYS: encrypted: sanitize all key material 2017-06-09 13:29:48 +10:00
encrypted.h KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
masterkey_trusted.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00