lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+YXJx0AVvdk6op=odzYRoM6+kSQFnuJsLSCTT9=wjqAxg@mail.gmail.com>
Date:	Mon, 19 Oct 2015 12:41:53 +0200
From:	Dmitry Vyukov <dvyukov@...gle.com>
To:	syzkaller@...glegroups.com
Cc:	David Howells <dhowells@...hat.com>, james.l.morris@...cle.com,
	serge@...lyn.com, keyrings@...r.kernel.org,
	linux-security-module@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	Kostya Serebryany <kcc@...gle.com>,
	Alexander Potapenko <glider@...gle.com>,
	Andrey Konovalov <andreyknvl@...gle.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	Julien Tinnes <jln@...gle.com>, Kees Cook <keescook@...gle.com>
Subject: Re: GPF in keyring_destroy

On Mon, Oct 19, 2015 at 12:33 PM, David Howells <dhowells@...hat.com> wrote:
> Dmitry Vyukov <dvyukov@...gle.com> wrote:
>
>> > Does the attached patch fix it for you?
>>
>> Yes, it fixes the crash for me.
>
> I have an additional patch to prevent keyrings from being constructed by
> request_key() at all (though it can still search for them).  Could you give
> this a spin in addition to the previous one also?

Do you mean in addition or instead of the previous one? From your
description, it sounds like it alone should prevent the crash.


> Thanks,
> David
> ---
> commit 27874345bb8d2c39f3d493607a86ecbfcb100405
> Author: David Howells <dhowells@...hat.com>
> Date:   Mon Oct 19 11:20:28 2015 +0100
>
>     KEYS: Don't permit request_key() to construct a new keyring
>
>     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.
>
>     Signed-off-by: David Howells <dhowells@...hat.com>
>
> diff --git a/security/keys/request_key.c b/security/keys/request_key.c
> index 486ef6fa393b..0d6253124278 100644
> --- a/security/keys/request_key.c
> +++ b/security/keys/request_key.c
> @@ -440,6 +440,9 @@ static struct key *construct_key_and_link(struct keyring_search_context *ctx,
>
>         kenter("");
>
> +       if (ctx->index_key.type == &key_type_keyring)
> +               return ERR_PTR(-EPERM);
> +
>         user = key_user_lookup(current_fsuid());
>         if (!user)
>                 return ERR_PTR(-ENOMEM);
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller+unsubscribe@...glegroups.com.
> To post to this group, send email to syzkaller@...glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller/17443.1445250818%40warthog.procyon.org.uk.
> For more options, visit https://groups.google.com/d/optout.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ