From: Alexander Wuerstlein <snalwuer@cip.informatik.uni-erlangen.de>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, arw@arw.name
Subject: Re: [PATCH] Check files' signatures before doing suid/sgid [2/4]
Date: Thu, 21 Jun 2007 19:46:13 +0200 [thread overview]
Message-ID: <20070621174612.GG9741@cip.informatik.uni-erlangen.de> (raw)
In-Reply-To: <1182446983.2704.4.camel@laptopd505.fenrus.org>
On 070621 19:33, Arjan van de Ven <arjan@infradead.org> wrote:
> On Thu, 2007-06-21 at 19:25 +0200, Alexander Wuerstlein wrote:
> > On 070621 19:21, Arjan van de Ven <arjan@infradead.org> wrote:
> > > On Thu, 2007-06-21 at 18:02 +0200, Alexander Wuerstlein wrote:
> > > > Modified task_struct to hold a 'signed flag' which is set on exec(), inherited
> > > > on fork() and checked during exec before giving the new process suid/sgid
> > > > privileges.
> > > >
> > >
> > >
> > >
> > > do you also check the signature of glibc and every other shared library
> > > that the app uses (or dlopens)? if not.. the entire exercise is rather
> > > pointless...
> >
> > We do check that, that is patch [3/4].
> >
> > Of course we can only check mmap-ed files, if there is no file like with JIT
> > compilers we are out of luck.
>
> or if the process uses read() not mmap().
If a process uses read() it needs some executable and writable memory. We do
check for this in mprotect(). There is a problem with the i386-architecture,
because it allows execution of any readable page (except with newer
processors). But beyond that ugliness of i386, it should not be possible to
execute anything without us noticing it (hopefully).
Scripting languages are of course problematic. In the suid-case you could just
call anyone insane who wants to use a suid-shellscript. But in other cases one
might want signed binaries for, we do have a problem. With java or shell one
would need an interpreter/vm which is signed and reasonably trustworthy itself
and checks the signature of the shellscript or classfile it executes. The
(probably not all too complicated) writing of such an interpreter is left as an
exercise to the reader ;)
Ciao,
Alexander Wuerstlein.
next prev parent reply other threads:[~2007-06-21 17:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 16:02 Alexander Wuerstlein
2007-06-21 17:17 ` Arjan van de Ven
2007-06-21 17:25 ` Alexander Wuerstlein
2007-06-21 17:29 ` Arjan van de Ven
2007-06-21 17:46 ` Alexander Wuerstlein [this message]
2007-06-21 18:49 ` Arjan van de Ven
2007-06-21 21:40 ` Johannes Schlumberger
2007-06-23 18:01 ` Jan Engelhardt
2007-06-25 10:54 ` Johannes Schlumberger
-- strict thread matches above, loose matches on Subject: below --
2007-06-21 15:55 [PATCH] signed binaries support [0/4] Johannes Schlumberger
2007-06-22 18:25 ` [PATCH] Check files' signatures before doing suid/sgid [2/4] Alexander Wuerstlein
2007-06-22 19:36 ` Satyam Sharma
2007-06-24 22:58 ` Alexander Wuerstlein
2007-06-25 23:53 ` Satyam Sharma
2007-06-26 0:27 ` Alexander Wuerstlein
2007-06-26 2:13 ` Satyam Sharma
2007-06-23 17:54 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070621174612.GG9741@cip.informatik.uni-erlangen.de \
--to=snalwuer@cip.informatik.uni-erlangen.de \
--cc=arjan@infradead.org \
--cc=arw@arw.name \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®