linux-stable/security/keys
Jarkko Sakkinen 2910038c09 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 10:26:44 +01:00
..
encrypted-keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
big_key.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
compat.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
compat_dh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gc.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
internal.h mm: add kvfree_sensitive() for freeing sensitive data objects 2020-06-17 16:40:23 +02:00
Kconfig request_key improvements 2019-07-08 19:19:37 -07:00
key.c certs: Fix blacklist flag type confusion 2021-03-04 10:26:29 +01:00
keyctl.c mm: add kvfree_sensitive() for freeing sensitive data objects 2020-06-17 16:40:23 +02:00
keyctl_pkey.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
keyring.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
Makefile KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2] 2018-10-26 09:30:46 +01:00
permission.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
persistent.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
proc.c keys: Fix proc_keys_next to increase position index 2020-04-21 09:04:58 +02:00
process_keys.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
request_key.c keys: ensure that ->match_free() is called in request_key_and_link() 2019-08-30 11:10:55 -07:00
request_key_auth.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
sysctl.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
trusted.c KEYS: trusted: Fix migratable=1 failing 2021-03-04 10:26:44 +01:00
user_defined.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00