diff options
| author | Eric Biggers <ebiggers@google.com> | 2017-06-08 14:48:03 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-07-06 11:55:27 +0200 |
| commit | 40a5cfef92ebb9a02d4f144f23a1332b8b9767f1 (patch) | |
| tree | 90843532728216f99a96590535fa69b2433c654d /security/selinux | |
| parent | bea72d30fde596918d9e6235d002a7a4f2f40d19 (diff) | |
KEYS: put keyring if install_session_keyring_to_cred() fails
[ Upstream commit d636bd9f12a66ea3775c9fabbf3f8e118253467a ]
In join_session_keyring(), if install_session_keyring_to_cred() were to
fail, we would leak the keyring reference, just like in the bug fixed by
commit 23567fd052a9 ("KEYS: Fix keyring ref leak in
join_session_keyring()"). Fortunately this cannot happen currently, but
we really should be more careful. Do this by adding and using a new
error label at which the keyring reference is dropped.
Change-Id: I64759c98ddd80a842e3c8399ec4e215448d0ea09
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security/selinux')
0 files changed, 0 insertions, 0 deletions
