From: Christoph Hellwig <hch@infradead.org>
To: Julien Tinnes <jt@cr0.org>
Cc: hch@infradead.org, security@kernel.org, taviso@sdf.lonestar.org,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/1] personality handling: fix PER_CLEAR_ON_SETID for security reasons
Date: Sun, 28 Jun 2009 16:40:46 -0400 [thread overview]
Message-ID: <20090628204046.GA21363@infradead.org> (raw)
In-Reply-To: <deb7a2310906261127v2fd1564elb823716ae03fc0d4@mail.gmail.com>
On Fri, Jun 26, 2009 at 08:27:40PM +0200, Julien Tinnes wrote:
> Hello,
>
> We have found that the current PER_CLEAR_ON_SETID mask on Linux
> doesn't include neither ADDR_COMPAT_LAYOUT, nor MMAP_PAGE_ZERO.
>
> The current mask is READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE.
>
> We believe it is important to add MMAP_PAGE_ZERO, because by using
> this personality it is possible to have the first page mapped inside a
> process running as setuid root. This could be used in those scenarios:
I agree.
> Less importantly, we believe ADDR_COMPAT_LAYOUT should also be added
> since on x86 32bits it will in practice disable most of the address
> space layout randomization (only the stack will remain randomized).
Agree on this on, too.
> -#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE)
> +#define PER_CLEAR_ON_SETID
> (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE|ADDR_COMPAT_LAYOUT|MMAP_PAGE_ZERO)
#define PER_CLEAR_ON_SETID \
(READ_IMPLIES_EXEC | \
ADDR_NO_RANDOMIZE | \
ADDR_COMPAT_LAYOUT | \
MMAP_PAGE_ZERO)
to make it a little more readable (and work around your mailer
corrupting long lines :))
prev parent reply other threads:[~2009-06-28 20:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 18:27 Julien Tinnes
2009-06-28 20:40 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090628204046.GA21363@infradead.org \
--to=hch@infradead.org \
--cc=jt@cr0.org \
--cc=linux-kernel@vger.kernel.org \
--cc=security@kernel.org \
--cc=taviso@sdf.lonestar.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®