59 points · by nickpsecurity · 9y ago · 33 comments
The more time goes by, and the more ubiquitous our computing devices become, the crazier it seems not to take this approach. It sounds like Fuchsia is (might be?) a step in the right direction… I'm excited to see what happens there.
We have so much power it's obscene. We're producing SHA-1 collisions without damaging or analyzing the algorithm, just using brute force. Why not take that approach to kernel security?
I'd sooner trust code whose quintillion input and output states have been exhaustively brute-forced over a few months (so that literally every possible path and value that code can take has ACTUALLY been run), than code which has been formally proven to be correct but without having been subject to such a test.
No.
Take a simple function that has two 64-bit numbers as input and one output; your sixteen 4Ghz cores would take over 11 billion times the current age of the universe to verify it.
You can, instead, do things like symbolic execution... and it turns out, that kind of thing is often a big part of "formally proven correct".
Only FOSS project actively soliciting and sometimes integrating best-of-breed components from high-assurance field is Genode OS framework. They recently went AGPL, though, for non-proprietary license. That's not promising... The others stopped getting any maintenance or their people and/or I.P. get poached into corporate circles.
Uh oh. Another OpenSSL bug.
If you're running OpenSSL in a container or VM, there's a good chance of repeatability.
afaik openssl removed a bunch of those uninitialized uses, not sure if all of them. But openssl never exclusively relied on them. There once was a "famous" bug, but it affected only openssl in debian, not openssl itself, where such an occurrence was fixed in a wrong way.
Plus (at least in Rust) in order to ever do anything useful, you have to use unsafe anyway, usually in the most complex bits of code that have the most potential for subtle memory errors. Personally that's the biggest problem I have with it: it seems like it helps avoid issues a lot, but only in the easy cases where I'm very confident I can avoid them anyway. In the really tricky subtle cases (or even fairly basic things like cyclic data structures, which are not niche) the compiler throws up its hands. Those, honestly, are the cases where I want compiler help.
That's not to say I don't think it's useful. In fact, making all the easy cases trivial does mean you can focus your effort, analysis, thought, design, whiteboard space, etc. on the trickier cases. But it's not anywhere near as useful as it is sometimes claimed to be.
Until we have perfect AI writing all our code, it's going to be pretty difficult to fix the other cases. That's what code reviews and extensive unit tests are for.