Show HN: Simple refined types implementation that can prevent Heartbleed
github.com
github.com
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?
And perhaps it was. But if SPARK83, to take one system amongst others, did not prevent Heartbleed, I don't see how your system “can prevent Heartbleed”. It can't, because Heartbleed is not written in the language at https://github.com/tomprimozic/type-systems/blob/master/refi...
Describing your github repository with the words “can prevent Heartbleed” is disingenuous and unscientific. You should keep the dramatic hyperbole for the grant proposals.
I know, that's why I cited a bunch of them in the README file.
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.