On Fri, Dec 15, 2017 at 12:44:17PM -0800, Eric Biggers wrote:
From: David Howells dhowells@redhat.com
commit 911b79cde95c7da0ec02f48105358a36636b7a71 upstream. [Please apply to 3.18-stable and 4.1-stable.]
If request_key() is used to find a keyring, only do the search part - don't do the construction part if the keyring was not found by the search. We don't really want keyrings in the negative instantiated state since the rejected/negative instantiation error value in the payload is unioned with keyring metadata.
Now the kernel gives an error:
request_key("keyring", "#selinux,bdekeyring", "keyring", KEY_SPEC_USER_SESSION_KEYRING) = -1 EPERM (Operation not permitted)
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: Eric Biggers ebiggers@google.com
security/keys/request_key.c | 3 +++ 1 file changed, 3 insertions(+)
Now applied to 3.18, thanks.
greg k-h