From: Andy Isaacson <adi@hexapodia.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Rik van Riel <riel@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 1/3] MAP_NOZERO - implement a new VM_NOZERO/MAP_NOZERO page retirement policy
Date: Wed, 27 Jun 2007 23:19:11 -0700 [thread overview]
Message-ID: <20070628061911.GA16986@hexapodia.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0706262127300.26540@alien.or.mcafeemobile.com>
On Tue, Jun 26, 2007 at 09:32:44PM -0700, Davide Libenzi wrote:
> > Because an SUID program can change its UID back.
> >
> > At least, one that was SUID root. OTOH, any
> > program running as root can change UID, so we
> > should probably not allow root to get nonzeroed
> > pages.
>
> Well, root can in general access the whole system in any case. At the
> moment, root cannot access othe UIDs pages. Only their own. And this
> differs from standard security policies where root can access everything.
> Pages used internally by the kernel, cannot be reused by anyone.
But MAP_NOZERO adds a new possible information leak from root out to the
non-root user. If root does
setuid(newuid);
exec(...);
exit(1);
and there are MAP_NOZERO pages which contain sensitive information,
a process running as newuid would be able to race the exec with
PTRACE_ATTACH and extract the sensitive information. Without MAP_NOZERO
the information leak is limited to information which was in the setuid
program's address space (and presumably, setuid programs are written to
be careful about such things).
That said, I think I like the idea of MAP_NOZERO. Could it be
generalized to some kind of "free pool" rather than keyed off of uid?
-andy
next prev parent reply other threads:[~2007-06-28 6:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 2:44 [patch 1/3] MAP_NOZERO - implement a new VM_NOZERO/MAP_NOZERO page retirement policy Davide Libenzi
2007-06-27 3:03 ` Rik van Riel
2007-06-27 3:28 ` Davide Libenzi
2007-06-27 4:18 ` Rik van Riel
2007-06-27 4:32 ` Davide Libenzi
2007-06-28 6:19 ` Andy Isaacson [this message]
2007-06-28 14:27 ` Rik van Riel
2007-06-28 18:24 ` Davide Libenzi
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=20070628061911.GA16986@hexapodia.org \
--to=adi@hexapodia.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
/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