Live data from Hacker News

Why the case for Rust is not particularly compelling

tednesday.wordpress.com

11–20 of 45 posts

Re: Why the case for Rust is not particularly compelling

#11
> “What the fuck are we doing in the cases where there are no vunerabilities?”.

Keep using that software? I mean, as an example, I don't really think anyone is rushing to re-implement sel4 in Rust because of security, or to re-implement sqlite, which has an obscene level of testing that is likely ~on-par with Rust's own memory safety guarantees.

So the answer is "don't do anything".

Of course, deciding that something is safe is really hard. I used two examples where the work is or borders on formal verification.

> How you write code, how you design code, what environment you are in, what your domain is, what the complexity of your problem is. None of that matters.

This just isn't true, and it's kind of a confusing argument. First off, Rust is designed with C-interop in mind exactly so that you can partially replace some components in pieces. That's how Firefox has adopted Rust - in places where you can't afford to thinking "well maybe it's secure already".

> How much program wisdom, when it comes to how to design a memory safe program, is being chucked out the window to pursue a “security by language design” approach?

Basically none, speaking as someone who has some security knowledge.

> Having a “secure by design” language SPECIFICALLY to the detriment of everything else is not going to solve your security problems.

Total straw man here, in no way is Rust to the detriment of other security processes, in no way does it obscure our ability to leverage other techniques. Ironically, it's quite the opposite - Rust has been able to leverage dynamic analysis like clang sanitizers for ages, it's pushed fuzzing from "a thing security people do sometimes" to "a library that devs actually use", and even has tools for formal analysis of code (miri). Rust has been eager to adopt new mitigation techniques like safestack or CFG. Rust is far more than language safety.

Skipping over the analogy bit because analogies are a waste of time.

> We need diversity in strategy.

We have it. Rust already does this.

> We need to actually understand what security means and how existing programs that ARE secure, are written that way.

No one disagrees with this.

> Because we could end up in a less secure future, where nobody understands why, with red tape that prevents you from finding out why.

Totally unsupported claim here tbh.

Anyway, I found this all very uncompelling and it sounds like someone who isn't super familiar with computer security opining on the matter.

Beyond that, the value proposition is far more than "Safer than C/C++".

Re: Why the case for Rust is not particularly compelling

#12
post #3

>In programmer world, you really can’t beat this argument. Because programmers are hyper-rational. This may be one of the biggest lies I've ever seen on the internet

This is a great summary-by-quote, I feel fully informed about what to expect if I actually would read the full source text, and based on this excellent summary I am confident I can save reading it for when I've run out of things argue about.

Re: Why the case for Rust is not particularly compelling

#14
Just that in those unknown unknowns lurk many more memory safety issues, that we have not yet discovered and the longer we continue to run that code, the more likely we will some day get hurt by them. Also we don't know anything about safe code, until we have proven it to be safe, either mathematically (difficult!) or by proving a type system sound and using that for implementing things.

Re: Why the case for Rust is not particularly compelling

#15
1. Find one feature of a language and argue that it's really not _that_ great because it introduces costs.

2. Never mention these costs and declare the whole language is "not particularly compelling".

Just as my own aside, before Rust, the "cost" of memory safety was either a garbage collector or infallible programmers.

Re: Why the case for Rust is not particularly compelling

#16
post #3

>In programmer world, you really can’t beat this argument. Because programmers are hyper-rational. This may be one of the biggest lies I've ever seen on the internet

This is a great summary-by-quote, I feel fully informed about what to expect if I actually would read the full source text, and based on this excellent summary I am confident I can save reading it for when I've run out of things argue about.

Would you say I'm being irrational by plucking this one quote out of the post?

Re: Why the case for Rust is not particularly compelling

#17
I'm not sure there's much to take away from this article. The author spends most of his words arguing against himself and then ends with a very confusing paragraph with a vague call to "understand what security means", a reference to "the growing movement toward legislation" (what legislation?), and the implication that we might be less secure, somehow. Maybe there is some subtext I'm supposed to know before reading, but on it's own, overall just incoherent.

Re: Why the case for Rust is not particularly compelling

#18
This article is not very compelling. My main reservations with Rust are (1) the community (2) licensing culture. The community seems to have a drastically different culture compared to the earlier hacker culture, being weirdly obsessed with social justice and anti-libertarian. But this will probably be diluted the more people use it, so it is not a huge problem. The bigger issue is the tendency to use permissive licenses like Apache or MIT instead of GPL. By writing more and more new code under MIT/Apache it undermines the protections we get from GPL'd code. This boils down to a kind of friendliness to corporations and/or authority in general, which, imo, is dangerous to free software. I was also told that the justification for the permissive license is "I would like to get hired by a $BIG_TECH, and letting them use my package without requiring source release helps with that.".

Re: Why the case for Rust is not particularly compelling

#19
Extremely weird and ahistorical. I wouldn't go so far as to say that everyone should use rust, but this argument is against a straw-man. Roughly speaking, it skips over the fact that

1. history has demonstrated that memory bugs are easy to produce and hard to find and 2. even a single memory error can be devastating in terms of data and money and productivity lost

If Rust eliminated most or a large class of memory errors and it was just as productive as C/C++ it would be a no brainer to at least write new, independent, systems in Rust. I think its reasonable to assume that Rust manages to eliminate many memory errors, but whether it comes at too high a cost is the real question, along with the lock in and network effects that our legacy systems have.

This essay basically doesn't address anything real.

Re: Why the case for Rust is not particularly compelling

#20
> This is analagous to World War 2 bomber design (bear with me).

What follows that sentence has to be a contender to win the prize for the most tortured analogy in a programming language discussion. You see, safe languages are bad because they slow you down, and if you're slow, the Nazi anti-air guns (that is, security vulnerabilities) can catch you. You need to code faster to dodge those bullets! Write in C to stop the Nazis!

Earlier in the article, there's a lot of hand-waving that there's a lot of secure software out there that's written in unsafe languages, so memory safety isn't needed. No proof of this. If you make a claim like this, at least be specific and enumerate examples of software for which that's the case. Then we can verify this claim against published vulnerability lists from the past few years. Spoiler: every significant C program has had memory vulnerabilities.

But maybe those aren't important compared to other security issues, which is another a common claim and one that's hinted at here? Maybe C allows you to code fast enough to dodge other kinds of Nazi bullets/vulnerabilities, and that's worth it? Well, people do enumerate stuff like that, and despite most programming nowadays happening on the web, a memory safety issue is still at the top of this list, for example: https://cwe.mitre.org/top25/archive/2023/2023_top25_list.htm...

Perhaps those metaphorical airplanes were still to slow, and the programs that were counted in this should actually have been coded in assembly to be even more secure, what do I know.

Post reply on HN