From: Petr Baudis <pasky@ucw.cz>
To: Diego Calleja <grundig@teleline.es>,
Robert.L.Harris@rdlg.net, vherva@niksula.hut.fi, ihaquer@isec.pl,
cliph@isec.pl
Cc: linux-kernel@vger.kernel.org
Subject: mremap() bug IMHO not in 2.2
Date: Mon, 5 Jan 2004 23:55:08 +0100 [thread overview]
Message-ID: <20040105225508.GM2093@pasky.ji.cz> (raw)
In-Reply-To: <20040105182607.GB2093@pasky.ji.cz>
Dear diary, on Mon, Jan 05, 2004 at 07:26:07PM CET, I got a letter,
where Petr Baudis <pasky@ucw.cz> told me, that...
> Dear diary, on Mon, Jan 05, 2004 at 06:10:53PM CET, I got a letter,
> where Diego Calleja <grundig@teleline.es> told me, that...
> > El Mon, 5 Jan 2004 13:26:23 -0200 (BRST) Marcelo Tosatti <marcelo.tosatti@cyclades.com> escribió:
> >
> > > On Mon, 5 Jan 2004, Robert L. Harris wrote:
> > > > Just read this on full disclosure:
> > > >
> > > > http://isec.pl/vulnerabilities/isec-0013-mremap.txt
> > [...]
> > > It is possible that the problem is exploitable. There is no known public
> > > exploit yet, however.
> > >
> > > 2.4.24 includes a fix for this (mm/mremap.c diff)
> >
> > It names 2.2 too. Is there a fix for 2.2?
>
> I'm trying to investigate that right now. In 2.2, mremap() doesn't yet
> take yet the new_addr argument, therefore the "official" 2.4 fix
> wouldn't apply at all to it. There are four possibilities:
>
> * The isec.pl guys just made a mistake.
>
> * 2.2's get_unmapped_area() can return dangerous pages for len == 0,
> whilst the 2.4's get_unmapped_area() cannot. (I'm not sure, looking into
> that code right now.)
>
> * 2.4's fix is incorrect.
>
> * I'm missing something obvious.
Actually, after looking at the code again, I'm now quite convinced 2.2
has not this particular vulnerability. In order for the exploit to work,
you'd need mremap() to relocate you.
But mremap() won't take newaddr argument, so you can't get yourself
relocated explicitly. And mremap() will not relocate yourself implicitly
to some random spot neither, because since newlen is zero, it will
always trigger the shrinking code, which will just munmap() and bail
out.
ihaquer, any comments? Is there something we don't know about? If not,
please correct your announcement.
Kind regards,
--
Petr "Pasky" Baudis
.
The brain is a wonderful organ; it starts working the moment you get up
in the morning, and does not stop until you get to work.
.
Stuff: http://pasky.or.cz/
next prev parent reply other threads:[~2004-01-05 22:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-05 14:54 mremap bug and 2.4? Robert L. Harris
2004-01-05 15:21 ` Erik Mouw
2004-01-05 15:26 ` Marcelo Tosatti
2004-01-05 15:42 ` Robert L. Harris
2004-01-05 17:10 ` Diego Calleja
2004-01-05 18:23 ` Tomas Szepe
2004-01-05 18:26 ` mremap() bug and 2.2? Petr Baudis
2004-01-05 22:55 ` Petr Baudis [this message]
2004-01-05 23:36 ` mremap() bug IMHO not in 2.2 Linus Torvalds
2004-01-05 23:58 ` Valdis.Kletnieks
2004-01-06 0:08 ` Linus Torvalds
2004-01-06 2:14 ` Tomas Szepe
2004-01-06 9:22 ` Martin Loschwitz
2004-01-06 20:36 ` mremap() bug indeed not in 2.2 (confirmed) Petr Baudis
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=20040105225508.GM2093@pasky.ji.cz \
--to=pasky@ucw.cz \
--cc=Robert.L.Harris@rdlg.net \
--cc=cliph@isec.pl \
--cc=grundig@teleline.es \
--cc=ihaquer@isec.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=vherva@niksula.hut.fi \
/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®