56 points · by tomp · 12y ago · 13 comments
Regarding this project, I know there are tools that help mitigate such issues, but unfortunately there isn't a single mainstream language that would really support this. I wanted such a language for a long time, so I (finally) decided to experiment with making one.
[1] Karthikeyan Bhargavan, Cédric Fournet, Markulf Kohlweiss, Alfredo Pironti, Pierre-Yves Strub: Implementing TLS with Verified Cryptographic Security. IEEE Symposium on Security and Privacy 2013
In practice, this experiment isn't powerful enough for this. To support C, the refined type-checker would have to know how to reason about mutable state, and unless pointers are severely restricted, they would always enable an escape hatch (for the sloppy or rogue programmer). Projects that would help are Cyclone (an attempt at memory-safe C), Rust and VCC [4] (which, however, is focused at concurrency). Altogether, it would be much easier to start with a safer language and design for memory safety and/or verified contracts from the ground up.
Does your system prevent Ariane 5 from exploding too?
If we can get more libraries and implementations to be better engineered with the lessons learned from Heartbleed then that at least reduces the problem surface a bit.
Another problem, of course, is that SMT solvers are only a nascent field; Z3 is fast and supports many theories, but is not free (for commercial use), and other solvers (I tried Alt-Ergo and CVC4) are considerably slower and have much less features.