[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0906031542180.20254@gentwo.org>
Date: Wed, 3 Jun 2009 15:45:57 -0400 (EDT)
From: Christoph Lameter <cl@...ux-foundation.org>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"Larry H." <research@...reption.com>, 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, 3 Jun 2009, Alan Cox wrote:
> This appears to break the security models as they can no longer replace
> the CAP_SYS_RAWIO check with something based on the security model.
Right it would be fixed like CAP_SYS_NICE.
>
> > @@ -1043,6 +1046,9 @@ unsigned long do_mmap_pgoff(struct file
> > }
> > }
> >
> > + if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO))
> > + return -EACCES;
> > +
>
> You can't move this bit here
The same code is executed in security_file_mmap right now which is the
next function called at this spot.
> > error = security_file_mmap(file, reqprot, prot, flags, addr, 0);
>
> You need it in the default (no security) version of security_file_mmap()
> in security.h not hard coded into do_mmap_pgoff, and leave the one in
> cap_* alone.
But that would still leave it up to the security "models" to check
for basic security issues.
--
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