[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1160304945.3000.175.camel@laptopd505.fenrus.org>
Date: Sun, 08 Oct 2006 12:55:45 +0200
From: Arjan van de Ven <arjan@...radead.org>
To: Stas Sergeev <stsp@...et.ru>
Cc: Ulrich Drepper <drepper@...hat.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Jakub Jelinek <jakub@...hat.com>,
Linux kernel <linux-kernel@...r.kernel.org>,
Hugh Dickins <hugh@...itas.com>,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [patch] honour MNT_NOEXEC for access()
On Sun, 2006-10-08 at 13:11 +0400, Stas Sergeev wrote:
> Hello.
>
> Arjan van de Ven wrote:
> >> but ld.so seems to be
> >> the special case - it is a kernel helper after all,
> > in what way is ld.so special in ANY way?
> It is a kernel helper. Kernel does all the security
> checks before invoking it. However, when invoked
> directly, it have to do these checks itself. So it is
> special in a way that it have to do the security checks
> which otherwise only the kernel should do.
wrong.
It's "special" only a little bit when the kernel invokes it, but not
really. The *application* is what decides to use which file. And for
example LSB application use another ld.so than the normal one.
(So that the LSB ld.so can translate from the LSB abi to what is on the
system).
But when invoked manually.. there is even LESS special about it... it
could be ANY file on the system. And it's no different from any other
file in /bin, /usr/bin etc etc
> Otherwise, please tell me, how can you solve the problem
> of ld.so started directly, can execute the files you do
> not have an exec permission for?
> The MNT_NOEXEC hack of
> mmap doesn't solve that.
denying PROT_EXEC of non-"x" files does (somewhat). It's never fool
proof obviously, as long as you need to allow jits.
> Then ld.so can just use that to solve all those permission
> problems.
this is just entirely a wrong assumption; one based on the assumption
that ld.so is something special, that it isn't.
--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
-
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