]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit77ee21aca4d655f1e374e7eb8686c4fcd2f23dfe
treebe043744d16a49c9b33fc17f6d1d6f2a6ee89102
parent06839339aaa7ce732aaffd48ffec0948f23f0836
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