News for hackers. Stuff that matters.
Re:Woo: Fast HTTP Server in Common Lisp by bayesianhorse on Saturday December 27, 2014 @04:09AM (#8802135)
Lately I began to study information security in more detail. Isn't the "code is data" philosophy of common lisp a nightmare for a web server?
Re:Woo: Fast HTTP Server in Common Lisp by hga on Saturday December 27, 2014 @10:31AM (#8802800)
Classically, "code is data" is used upfront, in creating macros that manipulate Lisp code as data, before sending the result to the interpreter or compiler like normal functions and data. Ideally you develop your own Domain Specific Language that provides power in expression and execution for what you're trying to do.

As implied in other answers in the subthread, nowhere in this paradigm does random input data get treated as something that can safely be executed. READ in Lisp Machines is mentioned because reader macros like #. allow data in the form being read to be evaluated, which in this domain is an obvious big no-no.

As early as 1983, I think earlier, it was recognized that things like eval servers were a bad idea if accessible by the outside world.

Re:Woo: Fast HTTP Server in Common Lisp by bayesianhorse on Sunday December 28, 2014 @02:50PM (#8807211)
So, I am really just a beginner. To me it seems to be the case that attackers may find a way to break out of a particular data processing instruction and execute arbitrary lisp code.

If you say, this can't be so, you may well be right...

Re:Woo: Fast HTTP Server in Common Lisp by hga on Monday December 29, 2014 @08:09AM (#8809593)
As I understand it, unless you're using a Lisp with an reader macro that calls eval, or your code calls eval, and you allow arbitrary input into that code while running vs. loading/compiling, it's just not going to happen.
Re:Woo: Fast HTTP Server in Common Lisp by sanxiyn on Saturday December 27, 2014 @04:13AM (#8802148)
No. Interpreting untrusted data as code can be pretty dangerous. Lisp is usually about interpreting trusted data as code, which is no problem.
Re:Woo: Fast HTTP Server in Common Lisp by SamReidHughes on Saturday December 27, 2014 @04:12AM (#8802145)
The web server isn't calling "eval," is it?
Re:Woo: Fast HTTP Server in Common Lisp by eudox on Saturday December 27, 2014 @07:27AM (#8802375)
As a fun aside: The Symbolics network code called READ on untrusted data on more than one occasion.
Re:Woo: Fast HTTP Server in Common Lisp by lispm on Saturday December 27, 2014 @08:18AM (#8802451)
Have you seen that code?

I just searched through sys:network; and sys:ip-tcp; in Genera 8.3 and the only use of READ was in an Eval server.

Re:Woo: Fast HTTP Server in Common Lisp by ScottBurson on Saturday December 27, 2014 @03:24PM (#8803789)
I distinctly recall, c. 1983, that 'read' was called as part of the NFILE protocol.

The reason I noticed was that I had created a package that did not use 'lisp:', and therefore 'nil' was no longer 'lisp:nil', which broke the NFILE client.

Maybe this got fixed sometime between then and 8.3. (Or maybe NFILE was ripped out altogether?)

I also recall that Jeff Schiller found some remote vulnerabilities. I don't know if they involved 'read', but they certainly could have. Again, this was long before 8.3.

Re:Woo: Fast HTTP Server in Common Lisp by lispm on Saturday December 27, 2014 @05:00PM (#8804117)
Are you sure? There is a READ command in NFILE, but there are no obvious calls to READ.

Symbols could have been created or looked up by other means...

Re:Woo: Fast HTTP Server in Common Lisp by eudox on Saturday December 27, 2014 @08:37AM (#8802490)
I read it on a tweet somewhere.
Re:Woo: Fast HTTP Server in Common Lisp by lispm on Saturday December 27, 2014 @10:31PM (#8805054)
Then it must be true.
Re:Woo: Fast HTTP Server in Common Lisp by avodonosov on Saturday December 27, 2014 @11:41AM (#8803032)
No