[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <451E3C0C.10105@aknet.ru>
Date: Sat, 30 Sep 2006 13:42:36 +0400
From: Stas Sergeev <stsp@...et.ru>
To: Arjan van de Ven <arjan@...radead.org>
Cc: Linux kernel <linux-kernel@...r.kernel.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Hugh Dickins <hugh@...itas.com>,
Ulrich Drepper <drepper@...hat.com>, Valdis.Kletnieks@...edu
Subject: Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
Hello.
Arjan van de Ven wrote:
>>/ wants to be able to mark more partitions as noexec,/
> .... and then execute from them!
> that's what is bothering me most about all of this.
Do you mean "execute with ld.so", or "execute with PROT_EXEC mmap"?
I think for ld.so problem to cease existing, it is enought to do
simply "chmod 'go-x' ld.so". For this to work I tried opening the
loader with fsuid=0, like in the attached hack. Chmodding ld.so
also prevents the one from executing the binaries for which he have
no execute permission, which is what an mmap hack doesn't solve.
"execute with PROT_EXEC mmap" argument simply doesn't hold -
MAP_PRIVATE|MAP_ANONYMOUS with read() will always work, as well
as the mprotect it seems.
View attachment "binfmt_elf.c.diff" of type "text/plain" (681 bytes)
Powered by blists - more mailing lists