keys: Fix request_key() lack of Link perm check on found key

The request_key() syscall allows a process to gain access to the 'possessor'
permits of any key that grants it Search permission by virtue of request_key()
not checking whether a key it finds grants Link permission to the caller.

Signed-off-by: David Howells <[email protected]>
This commit is contained in:
David Howells 2019-06-19 16:10:15 +01:00
commit 504b69eb3c
2 changed files with 14 additions and 0 deletions

View file

@ -433,6 +433,10 @@ The main syscalls are:
/sbin/request-key will be invoked in an attempt to obtain a key. The
callout_info string will be passed as an argument to the program.
To link a key into the destination keyring the key must grant link
permission on the key to the caller and the keyring must grant write
permission.
See also Documentation/security/keys/request-key.rst.