linux-stable/security/keys
Jarkko Sakkinen 643a663251 KEYS: trusted: Fix migratable=1 failing
commit 8da7520c80 upstream.

Consider the following transcript:

$ keyctl add trusted kmk "new 32 blobauth=helloworld keyhandle=80000000 migratable=1" @u
add_key: Invalid argument

The documentation has the following description:

  migratable=   0|1 indicating permission to reseal to new PCR values,
                default 1 (resealing allowed)

The consequence is that "migratable=1" should succeed. Fix this by
allowing this condition to pass instead of return -EINVAL.

[*] Documentation/security/keys/trusted-encrypted.rst

Cc: stable@vger.kernel.org
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Fixes: d00a1c72f7 ("keys: add new trusted key-type")
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 09:39:53 +01:00
..
encrypted-keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
big_key.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
compat.c KEYS: add SP800-56A KDF support for DH 2017-04-04 22:33:38 +01:00
compat_dh.c KEYS: DH: validate __spare field 2017-07-14 11:01:38 +10:00
dh.c Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name" 2018-09-25 13:28:58 +02:00
gc.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-25 08:37:16 -10:00
internal.h mm: add kvfree_sensitive() for freeing sensitive data objects 2020-06-22 09:05:01 +02:00
Kconfig security/keys: BIG_KEY requires CONFIG_CRYPTO 2017-10-18 09:12:40 +01:00
key.c certs: Fix blacklist flag type confusion 2021-03-04 09:39:44 +01:00
keyctl.c mm: add kvfree_sensitive() for freeing sensitive data objects 2020-06-22 09:05:01 +02:00
keyring.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
permission.c security: keys: Replace time_t/timespec with time64_t 2017-11-15 16:38:45 +00:00
persistent.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
proc.c keys: Fix proc_keys_next to increase position index 2020-04-21 09:03:08 +02:00
process_keys.c keys: Fix dependency loop between construction record and auth key 2019-03-23 20:09:48 +01:00
request_key.c keys: Fix dependency loop between construction record and auth key 2019-03-23 20:09:48 +01:00
request_key_auth.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
sysctl.c security: Convert use of typedef ctl_table to struct ctl_table 2014-04-15 13:39:58 +10:00
trusted.c KEYS: trusted: Fix migratable=1 failing 2021-03-04 09:39:53 +01:00
trusted.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
user_defined.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00