Should engineers, admittedly lacking an absolute solution to traffic fatalities, forego seeking designs and materials that reduce the frequency and consequences of failure?
Rust delivers a higher degree of memory safety. It is a better tool in the tool box and arguing that engineers should ignore it because their efforts are inherently flawed won't work, any more than arguing that a new headlamp or traffic light design is futile.
Also, you should understand now what you're up against. The legacy stack is riddled with flaws; every day we face a deluge of security notices, some large fraction of which are caused by memory safety problems. In other words, your opponents in this debate have an endless supply of ammunition.
Good luck with that.
> nobody has a solution to fix the problem today.
You're entire premise revolves around 0.01% of the population. That's not a good basis.
There's about 34,000 automobile related deaths annually in the US[1]. There's about 323,000,000 people in the US.[2]
The point I'm making, is let's not get carried away with exaggerating how "bad" a "problem" is. According to the CDC, more people die annually from accidental poisoning (about 39,000) than automobile related accidents - but I don't hear all the calls to "solve" that problem.
Will things be "safer" written in Rust? Maybe. Does Rust solve everything? Absolutely not. Yes, a lot of bugs are "unsafe" memory access issues, but a lot of bugs are not. Re-writing everything in a pet language that happens to be popular today in 2016 is not a good call. Rust is fairly new, and nobody has any idea if it will stand the test of time. C has, clearly.
Instead of getting out our pitchforks, we should rally to guarantee these critical projects are fully funded and staffed with full time developers. That alone, will yield far greater results than some lofty goal of completely re-writing 100's of thousands of lines of code which have been working, tested, and matured for almost 3 decades.
A huge number are. For example: https://www.cvedetails.com/vulnerability-list/vendor_id-72/p...
> That alone, will yield far greater results than some lofty goal of completely re-writing 100's of thousands of lines of code which have been working, tested, and matured for almost 3 decades.
Windows, the popular Web browser engines, and antivirus software are all examples of systems software that are very well funded. But they still regularly fall to memory safety problems. The converse is also interesting to look at: djbdns and qmail are examples of poorly funded software, but they have had very few memory safety problems.
I agree with the general principle that funding helps security overall, though.
Mine is the basis of billions of dollars of engineering and untold amounts of legislative and regulatory efforts around the planet. A lot of people seem to think it's a pretty important basis.
let's not get carried away with exaggerating how "bad" a "problem" is
On one hand you ask others not to exaggerate, next you're talking about pitchforks. The story we're discussing is about someone reimplementing one little 300 line procedure. I made no more of Rust than to call it a better tool in the toolbox. Calm yourself; these pitchfork wielding exaggerators you speak of are fictions inside your head.
stand the test of time. C has, clearly
The buffer overflows, dangling pointers, double frees, use after frees and leaks recorded daily as CVEs is the most demonstrative thing time has revealed about C et al. If C had past the test of time Rust wouldn't exist.
I think that's pretty good evidence of the grandparent's point: no, you're never going to make anything completely safe, but society can and does put a lot of effort toward harm reduction.
This is of course just my view and is heavily skewed towards what I usually do, which is Games and Web Apps. It also depends on how you qualify a bug. (Is a panic a bug? Might or might not be.)
To continue that train of thought: I have a feeling Rust will change what one would consider a bug (inside the Rust ecosystem at least). Since you do not actually corrupt memory most of the time (minus unsafe shenanigans) you actually do not get a lot of cases where you get a crash and you don't know why. RUST_BACKTRACE always told me where something panicked which is pretty much always sufficient to debug since you just have to verify your invariants you thought were correct when you for example 'unwrap' or call panic! yourself.
There are cogent arguments to be made about why Rust isn't a panacea. (I have a few I'm partial to, like integer overflow / truncation bugs.) But if you want people to listen to those arguments, make them.
Visit https://www.cvedetails.com/vulnerability-list/vendor_id-72/p.... Count the number of memory safety issues. The first five, for example, are all memory safety problems.
Of course memory safety is one small piece of the entire puzzle. That's why Rust has features besides just being a memory-safe version of C.
You can have 2 components written in 100% safe language with no memory corruption and no race conditions.
You can have security critical race conditions that arise out of the interaction of same components.
How is Rust or whatever solving this? It doesn't.
Actually, yes, it does. The borrow checker composes. Two correct Rust components for race conditions and memory safety will indeed compose together correctly. That's a great deal of the point of the whole thing, after all.
I don't think you've been keeping up with the state of the art in the last few years. Maybe less yelling and more listening is called for here.
For a language that certainly has the mindset, look at Erlang. Unikernels and Erlang will do more for actual security than a million monkeys cranking out perfectly safe Rust code.
"Decreasing an attacker's surface" is pragmatically, bullshit. No competent attacker (and that doesn't include just nation states these days) will be deterred by a decreased attack surface.
Also, proving a program "correct" (for some definition of correctness that presumably includes "secure") is undecidable, ergo there cannot be such a thing as a "100% secure language". No, not even Erlang, nor Haskell, nor anything which is remotely close to Turing-complete. So all we can do is, in fact, decrease the attack surface.
You often don't even need Turing completeness.
If you give me a more concrete example, besides "you can have race conditions," I can give you a more concrete way Rust fixes it, besides "you can use types."
The race conditions I refer to DO NOT EXIST in the static pieces of code written in Rust or whatever ivory tower language. They are EMERGENT pieces of DYNAMIC behavior that only manifest at RUNTIME due to subsystem interactions.
And by subsystem I don't just mean pieces of code...
You're citing a hardware flaw as a reason not to pursue programming tools and techniques that produce fewer software defects? That's a false dichotomy; we don't forego researching cancer treatments just because some of the people that are saved will end up getting shot.
Earlier you wrote "Security is all or nothing".
That's another amazingly bad point of view. There is no "all." Nothing is absolutely secure. There is only raising the bar. Important things are provided more protection than less important things. That is the best that can ever be achieved. Since your premise relies on a fiction your conclusions about the value of Rust are meaningless.
Rowhammer is basically mitigated if you don't let untrusted processes run CLFLUSH, right? That's sort of orthogonal to your choice of programming language (which might be your point, but then, I'm not sure I believe that Erlang or unikernels solves this either). It requires a world in which you've got something Native Client-like wrapping all userspace processes, which definitely seems like a good goal to work towards, and also seems easier to implement reliably in Rust than in C.
I am trying to shift my thinking, but all I'm hearing is "No it can't." Can you explain why it can't?
I see you've used it. I think it sets a bad tone for an argument.
Let me begin by introducing my premise: Rust will do NOTHING for security, it is not an improvement in any way, and at least as far as security is concerned, it will lead to at best colossal time waste, at worst actively damage the cause by misdirection, making ppl feel warm and fuzzy, providing illusion of security.
What??? B-b-but memory safety, I hear you say. How can this even be possible I hear you cry.
Memory safety (assuming that Rust completely solves it, which it absolutely DOES NOT) is but one (small) piece of the entire puzzle. In the same way that the skilled craftsman knows that he can't build a castle on top of sand, the skilled (and security conscious) software engineer should realize that memory corruption (and race conditions in the same unit/process) are not the foundation of the security chain. I dare say that a lot of the bugs exploited out there today (but not necessarily made public), are pure LOGIC bugs (that include race conditions) that stem from the interactions between extremely complex autonomous subsystems. Rust is simply operating at a too high-level abstraction layer to deal with any of these issues. This is the logical progression of Sergey Bratus's weird machines taken to the next level.
Some examples:
The Linux kernel. Any UNIX operating system taken as a whole. Any Windows taken as a whole. Any OSX system.
Anything built on top any of the above. Anything built on combinations of any of the above. Weird machines are not limited to isolated units, you know, they very well exhibit EMERGENT behavior.
Are you starting to get the picture now?
And then of course we still have the bugs that stem from unsafe languages, as long as there's a path that cuts through all the intermediate layers of "safe" code. Graphics drivers and webgl anyone? Truetype in the kernel?
Rust has plenty of things in its favor but to position it as a cure for issues that it doesn't even know how to address is a colossal mistake. We have given rise to a beast that threatens to consume us all. It's one thing to despair due to the immense complexity of the domain and quite another to step into an imaginary realm and solve illusionary problems that we create just to feel "safe".