lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV Lynx/MSIE denial-of-service


From: Klaus Weide
Subject: Re: LYNX-DEV Lynx/MSIE denial-of-service
Date: Tue, 11 Mar 1997 16:00:29 -0600 (CST)

On Tue, 11 Mar 1997, Larry W. Virden, x2487 wrote:

> What is a file of 'infinite length'?  That's some disk drive I guess.
> Or is it a broken cgi that just keeps going and going?
> 
> In any case, please _don't_ put arbitrary limits into lynx ; I would
> just as soon see no limits put in myself and just have lynx stop when it
> can't go any further.
> 
> Perhaps some limits could be conditionally compiled in for platforms which
> don't do virtual memory as cleanly as others.

On most (all?) Unix-like systems, and I am sure on others like VMS, there
are external means to limit a process's resource consumption.  For
example, on Unix try (depending on your shell) `ulimit' or `limit'.
Here is what bash-2.0 on Linux says:

$ help ulimit
ulimit: ulimit [-SHacdflmnpstuv] [limit]
    Ulimit provides control over the resources available to processes
    started by the shell, on systems that allow such control.  If an
    option is given, it is interpreted as follows:

        -S      use the `soft' resource limit
        -H      use the `hard' resource limit
        -a      all current limits are reported
        -c      the maximum size of core files created
        -d      the maximum size of a process's data segment
        -f      the maximum size of files created by the shell
        -l  the maximum size a process may lock into memory
        -m      the maximum resident set size
        -n      the maximum number of open file descriptors
        -p      the pipe buffer size
        -s      the maximum stack size
        -t      the maximum amount of cpu time in seconds
        -u      the maximum number of user processes
        -v      the size of virtual memory

    If LIMIT is given, it is the new value of the specified resource.
    Otherwise, the current value of the specified resource is printed.
    If no option is given, then -f is assumed.  Values are in 1024-byte
    increments, except for -t, which is in seconds, -p, which is in
    increments of 512 bytes, and -u, which is an unscaled number of
    processes.

So let's try it..

$ ulimit -S -d 1000
[...]

Read 200156 bytes of data.


GridText.c split_line: out of memory.  Aborting...

Memory exhausted!  Program aborted!

$

Of course a value higher than 1000 kBytes may be more appropriate in real
life.

If there is no way on MS Windows machines to prevent a system crash when
too much data is read (which I find hard to believe), then that's
MicroSoft's problem...

   Klaus


;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]