News for hackers. Stuff that matters.
Re:The next circle of security hell by goodmythical on Monday November 23, 2026 @11:33AM (#50614677)
Multiple studies have found that drivers are deliberately more careful in cases of percieved or actual danger. The metaphorical extension being that someone driving with a chef's knife instead of an airbag is quite motivated to avoid hitting things.

I'm not sure why this wouldn't generalize to other behaviors including coding, and that's the argument against the "language1" is safer than "language2" discussion. Left with only that distinction, the coder is less likely to take extra precautions just as Americans who are safer wearing their seatbelt choosing to travel above the speed meant to be safe for the road and it's inhabitants, ignoring the fact that their seatbelt does not protect pedestrains or fauna.

That the lanuage does technically offer a statistical safety advantage provides no assurance against foot-gunning, despite offten being portrayed as such.

Re:The next circle of security hell by TheDong on Monday November 23, 2026 @11:49AM (#50614970)
The analogy you have at the start there doesn't match this situation because rust doesn't make it _harder_ to write memory safety bugs in the normal course of coding, it makes it impossible (excluding unsafe code, which truly is exceptional).

I don't know if there's really a good analogy for driving cars because it would have to be a completely eliminated class of error, like "drivers drive slower and are less likely to hit potholes when they perceive danger, i.e. on a road with many potholes, however if we eliminated all potholes in existence, drivers hit even fewer potholes".

Anyway, humans stopped coding sometime this year, so it's all kinda a moot point.

Re:The next circle of security hell by magnio on Monday November 23, 2026 @11:54AM (#50615053)
No one gives a shit how much care driver takes, only how common they cause accidents and how severe the injuries are. If wearing seatbelts increases accidents by 20% (which is a wild assumption already) but decreases injuries by 50% then that's worth it.

Same with coding: no one cares if you abstain from ASan and UBSan if the end result has no memory safety bug. Unfortunately, times and times and times and times again have shown that thinking "I just need to write perfect C code" does not help reduce memory safety bugs, while using Rust does.

Why? Because making a Rust program with more intricate memory access rules compile is way way more annoying than in C. This is intended.

> That the lanuage does technically offer a statistical safety advantage provides no assurance against foot-gunning

The zero-cost memory safety provided by Rust is enforced by the compiler restricting all kinds of foot-gunning, sometimes even stupidly (unlike in GC languages where the GC just cleans up all the bullet wounds). Saying Rust let users foot-gun themselves easily is one thing, but saying it's easier to foot-gun in Rust than in C is unfathomable.

Re:The next circle of security hell by arrowsmith on Monday November 23, 2026 @12:00PM (#50615164)
And yet we put airbags in cars
Re:The next circle of security hell by whatevaa on Monday November 23, 2026 @12:14PM (#50615449)
We call them footguns, but no foots are actually shot. At least not to the people who are responsible for avoiding them. Car accidents however can be life changing. So analogy to driving doesn't hold.
Re:The next circle of security hell by AnIrishDuck on Monday November 23, 2026 @12:22PM (#50615567)
> The metaphorical extension being that someone driving with a chef's knife instead of an airbag is quite motivated to avoid hitting things.

This analogy does not hold up. Nobody sane would seriously advocate that everybody drive around with a chef's knife just because it makes the driver more careful.

Humans make mistakes. We are exposed to the mistakes of other humans. There are factors that are out of our control.

The only serious approach to safety given this reality is defense in depth. Removing layers of defense because "it will make the humans behave more carefully" in other layers is fallacious reasoning.

Re:The next circle of security hell by AnthonyMouse on Monday November 23, 2026 @01:38PM (#50616786)
> Nobody sane would seriously advocate that everybody drive around with a chef's knife just because it makes the driver more careful.

That is the sort of thing some people advocate in the vehicle case though. They suggest reducing visibility etc. on purpose even though it actually makes it harder to avoid a collision because some drivers overcompensate and then the e.g. -15% you get from people being more cautious is more than the +12% you get from drivers not being able to see pedestrians as easily.

But there are a few problems with the theory. The first is that they hardly ever do long-term studies, and then people may not stay more cautious once they get used to the change even though you've permanently reduced visibility. The second is that if you make a road feel more dangerous then some people would avoid the road, and then you measure fewer collisions on it because it has less traffic, but you're only moving the collisions somewhere else while still actually reducing visibility on that road.

And the third is that it's a false dichotomy. There are ways to make a road less dangerous other than making it feel more dangerous, and we should prefer those over the ones that impose countervailing costs.

Re:The next circle of security hell by dralley on Monday November 23, 2026 @04:25PM (#50619551)
Who is the "they" that argue these things?
Re:The next circle of security hell by vhiremath4 on Monday November 23, 2026 @12:47PM (#50615979)
It might not generalize because the injuries sustained by software security bugs are less personal and irreversible than a car crash?
Re:The next circle of security hell by darksaints on Monday November 23, 2026 @01:41PM (#50616824)
And even if that driver drove around extremely carefully with the chefs knife instead of an airbag, the death rate would undoubtedly be higher at any comparable level of utility. The only safe way to drive like that is to not drive at all.
Re:The next circle of security hell by 3uruiueijjj on Monday November 23, 2026 @01:46PM (#50616907)
Regardless of the actual statistics regarding seatbelts, the analogy makes very little sense.

As a programmer I am not the driver. If I was, I might truly be more careful. But the drivers are people far away that I don't know and don't really care about.

Re:The next circle of security hell by MattPalmer1086 on Monday November 23, 2026 @01:57PM (#50617130)
Because there is no real negative personal consequence for shipping unsafe code faster. To the contrary, that behaviour is often rewarded by organisations.
Re:The next circle of security hell by AnthonyMouse on Monday November 23, 2026 @02:03PM (#50617260)
Isn't that the actual problem though? It doesn't matter if you use Rust if you use "unsafe" everywhere because it's faster than doing it right.
Re:The next circle of security hell by dwattttt on Monday November 23, 2026 @02:07PM (#50617311)
It's not perfect or absolute, but the unsafe way in Rust is often harder. As the simplest example, raw pointer operations have less syntactic sugar, so using them is less ergonomic.

Other avenues for bad are still there though.

Re:The next circle of security hell by AnthonyMouse on Monday November 23, 2026 @02:20PM (#50617553)
> As the simplest example, raw pointer operations have less syntactic sugar, so using them is less ergonomic.

It's more typing, but it's also less thinking because you get the code to compile immediately. And if you don't like typing then that's easy, just write "unsafe" once inside a function that you can call in 500 different places.

At some point you have to actually care or it's not going to work out.

Re:The next circle of security hell by dralley on Monday November 23, 2026 @04:24PM (#50619531)
Have you ever written Rust, much less unsafe Rust? It does not sound like you have, to be honest.
Re:The next circle of security hell by dwattttt on Monday November 23, 2026 @04:35PM (#50619698)
> just write "unsafe" once inside a function that you can call in 500 different places

It's usually the opposite. If you're being forced to write unsafe, odds are there's a crash bug about to appear (the word "forced" was very specifically chosen, I've been in both of these positions quite a few times).

And if you're not being forced to write unsafe, not writing it really is easier. Precedence of operations means that if you want to call a method/access a field of a raw pointer, it's a minimum of `(*a).` to reference it. A reference is just the `.`.

Re:The next circle of security hell by dralley on Monday November 23, 2026 @04:09PM (#50619336)
My frustration with many anti-anti Rust arguments is that they are basically strawmans. "Use unsafe because it's faster"
Re:The next circle of security hell by shanemhansen on Monday November 23, 2026 @03:24PM (#50618705)
I think you're not thinking your analogy through.

I've made a plugin to valgrind that stabs the engineer with a knife when they do unsafe things. Does the engineer accomplish their next task with rust or C?

Re:The next circle of security hell by pcwalton on Monday November 23, 2026 @04:53PM (#50619930)
Fortunately, we have statistics to show that actually Rust does reduce memory safety vulnerabilities, so we don't have to speculate about whether it actually helps.