KEYS: sanitize add_key() and keyctl() key payloads
authorEric Biggers <ebiggers@google.com>
Thu, 8 Jun 2017 13:48:57 +0000 (14:48 +0100)
committerJames Morris <james.l.morris@oracle.com>
Fri, 9 Jun 2017 03:29:48 +0000 (13:29 +1000)
commit57070c850a03ee0cea654fc22cb8032fc3139d39
treebe043744d16a49c9b33fc17f6d1d6f2a6ee89102
parent63a0b0509e700717a59f049ec6e4e04e903c7fe2
KEYS: sanitize add_key() and keyctl() key payloads

Before returning from add_key() or one of the keyctl() commands that
takes in a key payload, zero the temporary buffer that was allocated to
hold the key payload copied from userspace.  This may contain sensitive
key material that should not be kept around in the slab caches.

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>
security/keys/keyctl.c