[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090628204046.GA21363@infradead.org>
Date: Sun, 28 Jun 2009 16:40:46 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Julien Tinnes <jt@....org>
Cc: hch@...radead.org, security@...nel.org, taviso@....lonestar.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch 1/1] personality handling: fix PER_CLEAR_ON_SETID for
security reasons
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 :))
--
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