[linux] Fwd: Re: 2.2.0 SECURITY (fwd)

Marek Simon simon na sun.mtf.stuba.sk
Čtvrtek Leden 28 11:50:22 CET 1999


forwardnute z bugtraq-u
chmod

----------  Predaná správa  ----------
Subject: Re: 2.2.0 SECURITY   (fwd)
Date: Wed, 27 Jan 1999 19:19:01 +0000
From: Alan Cox <alan na LXORGUK.UKUU.ORG.UK>


> Later on down the thread there are other people then Dan Burcaw who say
> that the bug crashes their boxes too.
>
> I suggest reading the thread on Linux Kernel archives for more
> information.  See information at the bottof of forwarded message for
> information.

Yep its real bug. The relevant info for early adopters is:


From:	MOLNAR Ingo <mingo na chiara.csoma.elte.hu>
To:	linux-kernel na vger.rutgers.edu, linux-smp na vger.rutgers.edu
cc:	Linus Torvalds <torvalds na transmeta.com>, Alan Cox <alan na lxorguk.ukuu.org.uk>, "David S. Miller" <davem na dm.cobaltmicro.com>
Subject: [patch] 'coredump crash' fixed

it was a very subtle bug and has nothing to do with coredumps at all, but
it's very rare and the invalid coredump ELF layout accidentally triggered
the bug.

with the attached patch applied i get:

[root na moon /root]# ldd core
        not a dynamic executable
[root na moon /root]#

just as expected. The reason why we crash and why it made the kernel
reboot in such a nasty way was that munmap() did just a tad more work than
necessary and we zapped 0xc0000000's page table entry ... that is a pretty
vital piece of 4M virtual space on Linux ;) (erm, just dont ask me how i
managed to debug this ;)

-- mingo, running a hopefully much safer kernel now ;)

--- linux/mm/mmap.c.orig	Wed Jan 27 14:09:31 1999
+++ linux/mm/mmap.c	Wed Jan 27 14:06:09 1999
@@ -558,7 +558,7 @@
 	unsigned long start, unsigned long end)
 {
 	unsigned long first = start & PGDIR_MASK;
-	unsigned long last = (end & PGDIR_MASK) + PGDIR_SIZE;
+	unsigned long last = ((end-1) & PGDIR_MASK) + PGDIR_SIZE;

 	if (!prev) {
 		prev = mm->mmap;





Další informace o konferenci linux