OSDN Git Service

KEYS: trusted: sanitize all key material
authorEric Biggers <ebiggers@google.com>
Thu, 8 Jun 2017 13:49:18 +0000 (14:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Nov 2017 16:13:11 +0000 (17:13 +0100)
commit939cafad2f5198c8cb4b067e8acbc0e935e4ffdb
treee57153b7be8592aff28dbe49db3fa55ce64095fe
parent75f82a703b309d706d7aa3b370d48ae705a7ee40
KEYS: trusted: sanitize all key material

commit ee618b4619b72527aaed765f0f0b74072b281159 upstream.

As the previous patch did for encrypted-keys, zero sensitive any
potentially sensitive data related to the "trusted" key type before it
is freed.  Notably, we were not zeroing the tpm_buf structures in which
the actual key is stored for TPM seal and unseal, nor were we zeroing
the trusted_key_payload in certain error paths.

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