Re: [PATCH] KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings

2017-04-03 Thread David Howells
Eric Biggers wrote: > @@ -135,6 +135,9 @@ int install_thread_keyring_to_cred(struct cred *new) > { > struct key *keyring; > > + if (new->thread_keyring) > + return -EEXIST; > + > keyring = keyring_alloc("_tid", new->uid, new->gid, new, >

Re: [PATCH] KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings

2017-04-03 Thread David Howells
Eric Biggers wrote: > @@ -135,6 +135,9 @@ int install_thread_keyring_to_cred(struct cred *new) > { > struct key *keyring; > > + if (new->thread_keyring) > + return -EEXIST; > + > keyring = keyring_alloc("_tid", new->uid, new->gid, new, >

[PATCH] KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings

2017-04-01 Thread Eric Biggers
From: Eric Biggers Running the following program as an unprivileged user exhausts kernel memory by leaking thread keyrings: #include int main() { for (;;)

[PATCH] KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings

2017-04-01 Thread Eric Biggers
From: Eric Biggers Running the following program as an unprivileged user exhausts kernel memory by leaking thread keyrings: #include int main() { for (;;) keyctl_set_reqkey_keyring(KEY_REQKEY_DEFL_THREAD_KEYRING); } Fix