[6919] in bugtraq

home help back first fref pref prev next nref lref last post

Re: PTE bug.. more..

daemon@ATHENA.MIT.EDU (pedward@WEBCOM.COM)
Mon Jun 8 18:01:05 1998

Date: 	Sun, 7 Jun 1998 00:25:27 -0700
Reply-To: pedward@WEBCOM.COM
From: pedward@WEBCOM.COM
X-To:         Alex <hawk@ascu.unian.it>
To: BUGTRAQ@NETSPACE.ORG
In-Reply-To:  <Pine.LNX.3.96.980606103952.1378A-100000@ascu.unian.it> from
              "Alex" at Jun 6, 98 10:48:55 am

Alex, (I'm cc'ing this to bugtraq to further educate people, and set the
comment I first made, right)

 I have located the positive source of the bug and am working on a patch.
The setrlimit will not work to prevent this.  You can only limit the number
of processes a person can launch, to limit the havoc they can cause.

The bug stems from the way Linux manages PGD, PMD, and PTE structures.  At
this time, Linux only deallocates PTEs when it frees page ranges.  PMD and
PGD structures are not checked for use when entries are freed from them.

I am working on a patch against 2.1 series kernels, which will be backported
to the 2.0 series.

So, to summarize:  It is a bug in that PMD and PGD structures are not
deallocated when they have dropped to 0 usage; no usage count can be
easily added to these because they are not "structures" in the normal
sense.  I have an algorithm that works for a small percentage of cases,
I'm working on the rest, and I should have a working patch soon (I hope :).

--Perry

>
> Good day!
> I've tried to use ulimit (setrlimit) as you suggest but really nothing of
> what you've said worked to me.
> If for example two or more users launch  ptebug  on my Linux system
> there is no way to block them, and they for sure will hang the computer
> after a while.
> I tried to limit everything ( number of process, virtual memory size, cpu
> limit ) but nothing avoid my system to crash.
> So I think that Sed (p6mip300@infop6.cicrp.jussieu.fr) has discovered a
> really serious bug and at the moment I can't see any fix for it
> ( of course I can deny the use of shell to the users but is not what I
> want )
>
> bye
>
> --
> Alex   |  mailto:hawk[at]ascu.unian.it |  http://www.ascu.unian.it/~hawk
> SySadm |  [ascu|studenti|www].unian.it |  phone/fax       +39-71-2204491
>
> [To err is human, to moo bovine.]
>
>


--
Perry Harrington        System Software Engineer    zelur xuniL  ()
http://www.webcom.com  perry.harrington@webcom.com  Think Blue.  /\

home help back first fref pref prev next nref lref last post