Re: Security fix for remapping of page 0 (was [PATCH] ChangeZERO_SIZE_PTR to point at unmapped space)

From: Linus Torvalds
Date: Wed Jun 03 2009 - 11:40:19 EST




On Wed, 3 Jun 2009, Christoph Lameter wrote:

> On Wed, 3 Jun 2009, Linus Torvalds wrote:
>
> > The point being that we do need to support mmap at zero. Not necessarily
> > universally, but it can't be some fixed "we don't allow that".
>
> Hmmm... Depend on some capability? CAP_SYS_PTRACE may be something
> remotely related?

But as mentioned several times, we do have the system-wide setting in
'mmap_min_addr' (that then can be overridden by CAP_SYS_RAWIO, so in that
sense a capability already exists).

It defaults to 64kB in at least the x86 defconfig files, but to 0 in the
Kconfig defaults. Also, for some reason it has a "depends on SECURITY",
which means that if you just default to the old-style unix security you'll
lose it.

So there are several ways to disable it by mistake. I don't know what
distros do.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/