[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28638.1460481505@warthog.procyon.org.uk>
Date: Tue, 12 Apr 2016 18:18:25 +0100
From: David Howells <dhowells@...hat.com>
To: Kees Cook <keescook@...omium.org>
Cc: dhowells@...hat.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Serge Hallyn <serge.hallyn@...ntu.com>,
Willy Tarreau <w@....eu>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] exec: clarify reasoning for euid/egid reset
Kees Cook <keescook@...omium.org> wrote:
> - /* clear any previous set[ug]id data from a previous binary */
> + /*
> + * Since this can be called multiple times (via prepare_binprm),
> + * we must clear any previous work done when setting set[ug]id
> + * bits from any earlier bprm->file uses (for example when run
> + * first for a script then for its interpreter).
> + */
> bprm->cred->euid = current_euid();
> bprm->cred->egid = current_egid();
I would further add that this is where we deal with setuid scripts.
David
Powered by blists - more mailing lists