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: <7e0fb38c0906031251h6844ea08y2dbfa09a7f46eb5f@mail.gmail.com>
Date:	Wed, 3 Jun 2009 15:51:16 -0400
From:	Eric Paris <eparis@...isplace.org>
To:	Christoph Lameter <cl@...ux-foundation.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Larry H." <research@...reption.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>, linux-mm@...ck.org,
	Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
	pageexec@...email.hu
Subject: Re: Security fix for remapping of page 0 (was [PATCH] Change 
	ZERO_SIZE_PTR to point at unmapped space)

On Wed, Jun 3, 2009 at 3:42 PM, Christoph Lameter
<cl@...ux-foundation.org> wrote:
> On Wed, 3 Jun 2009, Eric Paris wrote:
>
>> NAK  with SELinux on you now need both the SELinux mmap_zero
>> permission and the CAP_SYS_RAWIO permission.  Previously you only
>> needed one or the other, depending on which was the predominant
>> LSM.....
>
> CAP_SYS_RAWIO is checked so you only need to check for mmap_zero in
> SELinux.

You misunderstand.  As it stands today if you use SELinux you need
only the selinux mmap_zero permission.  If you use capabilities you
need CAP_SYS_RAWIO.

With your patch SELinux policy would now have to grant CAP_SYS_RAWIO
everywhere it grants mmap_zero.  This not not acceptable.  Take notice
that with SELinux enabled cap_file_mmap is never called.....


>> Even if you want to argue that I have to take CAP_SYS_RAWIO in the
>> SELinux case what about all the other places?  do_mremap?  do_brk?
>> expand_downwards?
>
> brk(0) would free up all the code? The others could be added.

The 'right'est fix is as Alan suggested, duplicate the code

from security/capability.c::cap_file_mmap()
to include/linux/security.h::securitry_file_mmap()

-Eric
--
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