5 ms·
It may also relevant to mention the language-theoretic security research program ("LANGSEC"). http://langsec.org/ http://langsec.org/ They've pointed out that
by schoen 12y ago
It may also relevant to mention the language-theoretic security research program ("LANGSEC").
http://langsec.org/ http://langsec.org/
They've pointed out that the difficulty of parsing, and in a sense our overconfidence that we can just code up parsers for random languages and input formats when we need them, is a pretty pervasive source of security bugs.
A lot of those bugs can occur when you have two different parsers that have a different notion of what language they're supposed to recognize, so it's possible to construct an input whose meaning the two parsers disagree on. That can have pretty serious ramifications if, for example, the first parser is deciding whether a requested action is authorized and the second parser is carrying out the action!
I'm kind of sad about this because I love whipping up regular expressions to extract data even from things that regular expressions technically can't handle correctly. But there's a good argument to be made that this habit is playing with fire much of the time, at least in systems that will end up handling untrusted input. And the Shellshock bug is a recent example of the way that your intuitions about whether your software will "handle untrusted input" in some use case can go out of date.
- dkarapetyan 12y agoSee also this paper: http://www.ieee-security.org/TC/SPW2014/papers/5103a198.PDF http://www.ieee-security.org/TC/SPW2014/papers/5103a198.PDF. The authors implement a pdf file format parser and find bugs in pretty much all of the existing implementations. Basically pdf is a pretty shitty file format with several ill-defined corner cases. This is one of the reasons PDFs tend to be vectors for security breaches.
- nly 12y agoHow comforting it is that the paper is presented as a PDF ;)
- schoen 12y agoThe lead author (Andreas Bogk) presented an earlier version of this work at the Chaos Communication Camp in 2011 ("Certified Programming With Dependent Types"). http://events.ccc.de/camp/2011/Fahrplan/events/4426.en.html http://events.ccc.de/camp/2011/Fahrplan/events/4426.en.html I went to that talk, and found it to be probably the most advanced and difficult math lecture I'd ever attended! (I was very grateful to see such mathematical sophistication brought to bear to protect PDF users, which is almost all of us.)