diff --git a/[refs] b/[refs] index e88c0c9e8695..4f95388b167c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9d1ac65a9698513d00e5608d93fca0c53f536c14 +refs/heads/master: 3d96406c7da1ed5811ea52a3b0905f4f0e295376 diff --git a/trunk/security/keys/keyctl.c b/trunk/security/keys/keyctl.c index 3868c6700b58..60924f6a52db 100644 --- a/trunk/security/keys/keyctl.c +++ b/trunk/security/keys/keyctl.c @@ -1305,7 +1305,8 @@ long keyctl_session_to_parent(void) goto not_permitted; /* the keyrings must have the same UID */ - if (pcred->tgcred->session_keyring->uid != mycred->euid || + if ((pcred->tgcred->session_keyring && + pcred->tgcred->session_keyring->uid != mycred->euid) || mycred->tgcred->session_keyring->uid != mycred->euid) goto not_permitted;