From: Andrea Arcangeli <andrea@suse.de>
To: Chris Friesen <cfriesen@nortelnetworks.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
Raphael Rigo <raphael.rigo@inp-net.eu.org>,
linux-kernel@vger.kernel.org
Subject: Re: New do_mremap vulnerabitily.
Date: Thu, 19 Feb 2004 00:46:39 +0100 [thread overview]
Message-ID: <20040218234639.GT4478@dualathlon.random> (raw)
In-Reply-To: <4033E3A4.80509@nortelnetworks.com>
On Wed, Feb 18, 2004 at 05:13:56PM -0500, Chris Friesen wrote:
> Linus Torvalds wrote:
>
> >Fixed in 2.6.3 and 2.4.25 (and, I think, vendor kernels), please upgrade
> >if you allow local shell access to untrusted users.
>
> There is still a call to do_munmap() that does not check the return
> code, called from move_vma(), which in turn is called in do_mremap().
>
> Can that call ever fail and cause Bad Things to happen?
it shouldn't cause bad things, it may generate a corrupt address space
from userspace point of view (the original vma will be stil there), but
it's like if you did one more mmap, so it's only a problem if you can
drive the app to buffer overflow or something like that because of this
corrupted address space. So it's only an userspace issue with real apps,
and with real apps the only thing that can make munamp fail is an oom
which is near to impossible for you to oom the app exactly in this
do_munmap call, the by far highest probability is that the first oom
will happen in the page faults, not in the syscalls.
> If we know that its never going to fail, it might be useful to have a
> comment explaining it so we don't open up more exploits in the future.
the whole code needs a revamp for example for when the pagetables cannot
be allocated and the merging isn't retired (similar problem to the
do_munmap you mentioned above and there are other issues like that),
mremap simply isn't retiring correctly in presence of oom errors, that's
only an userspace issue, no way to exploit the kernel with that, we've
to fix it for 2.6 to provide perfect retirement from oom (basically only
a pratical matter with full overcommit but anyways). For 2.4 where the
thing will go in production the next day, going with the bandaid from
Solar was the simplest and in turn safest solution without risk of
regression.
next prev parent reply other threads:[~2004-02-18 23:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 15:26 Raphael Rigo
2004-02-18 17:56 ` Linus Torvalds
2004-02-18 22:13 ` Chris Friesen
2004-02-18 22:26 ` Linus Torvalds
2004-02-18 23:49 ` Andrea Arcangeli
2004-02-18 23:46 ` Andrea Arcangeli [this message]
2004-02-18 17:08 Ulrich Keil
2004-02-18 18:43 ` Chris Friesen
2004-02-18 20:20 ` Richard B. Johnson
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=20040218234639.GT4478@dualathlon.random \
--to=andrea@suse.de \
--cc=cfriesen@nortelnetworks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raphael.rigo@inp-net.eu.org \
--cc=torvalds@osdl.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®