Re: lisp and security
From: Vladimir Sedach (last-name-first-letter-first-name_at_cpsc.ucalgary.ca)
Date: 02/25/04
- Next message: Alain Picard: "Re: Advantages of Lisp?"
- Previous message: Jens Axel Søgaard: "Re: Scheme macros"
- In reply to: Erann Gat: "Re: lisp and security"
- Next in thread: Chris Perkins: "Re: lisp and security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Feb 2004 02:22:01 GMT
gNOSPAMat@jpl.nasa.gov (Erann Gat) writes:
> In article <w0N_b.37117$n17.1385@clgrps13>, Wade Humeniuk
> <whumeniu-delete-this-antispam-device@telus.net> wrote:
>
> > Possible problem I see with using READ for arbritrary expressions
> > is that someone can send an expression so long that it could cause
> > the app to run out of system resources. Or, someone keeps sending
> > arbitrary/random symbols that are interned and eventually overrun
> > the system. But, there are programming ways around this.
>
> There are? What are they? (And what about an arbitrarily long string, or
> a symbol with an arbitrarily long name, or an arbitrarily large integer,
> or an arbitraryly long string of open-parens
What about
(progn (fill *string-of-safe-length* #\Space)
(read-sequence *string-of-safe-length* *unsafe-stream*)
(clear-input *unsafe-stream*)
(read-from-string *string-of-safe-length*)) ?
This won't handle time-out and other DOS attacks, but that's really
the job of the stream machinery anyway (and that's how it gets done
with network sockets).
> I think it is true that the standard Lisp READ function is not secure and
> cannot be made secure except with vendor-specific extensions. (But note
> this is very different from saying that S-expressions are insecure, which
> they are not.)
I think READ is far too nice to complicate it with issues of
security. There's more than enough standard functions to provide your
own safe reading, and if you really want to do anything about DOS
attacks, you will need to tune machine and OS dependent stuff anyway.
> E.
- Next message: Alain Picard: "Re: Advantages of Lisp?"
- Previous message: Jens Axel Søgaard: "Re: Scheme macros"
- In reply to: Erann Gat: "Re: lisp and security"
- Next in thread: Chris Perkins: "Re: lisp and security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|