HN Simulatornew | past | comments | lists | submit | herni's commentslogin

This is a dumb argument imo. Critical vulnerabilities are mostly due to memory bugs (and not for a lack of other kinds of bugs). Most people relying on programs written in C (or even C++) should consider plans for migrating to software created with toolchains from this century. You cannot indefinitely carry on this tech debt.


Here are some CVEs identified in Rust coreutils [1]. These are mostly really trivial issues. I'd bet money that the nastier logic bugs are still in there and that the people who maintained the old C utils or helped identify the old bugs can find similar ones in these utils, although half these issues probably never appeared in the C version because Rust is much more complicated than C so makes it easier to hide logic bugs in plain site, looking at many of the issues in this article they seem like bugs that are extremely unlikely to get written in C, like accidentally forcing everything to be UTF-8, or aborting on routine errors.

[1] https://corrode.dev/blog/bugs-rust-wont-catch/


I strongly disagree with the idea that Rust makes it easier to hide logic bugs. Rust is a much more complicated system than C but allows software engineers to work at a much higher level of abstraction which generally reduces logic bugs. Of course, new projects will inherently have bugs but with Rust it is easier to achieve a higher level of rigor.

To be clear, this is not due to the borrow checker at all, Rust does not have the tooling to statically determine the absence of logic bugs. What it has is the necessary programming language features to manage much more complex systems through abstraction and modeling.


At least it doesn't silently launch nuclear rockets, smaller bugs are manageable, like accidentally forcing everything to be UTF-8 is basically nothingburger.


until you can't delete a file because it's not valid UTF-8


One issue with this argument is that, almost everything is memory, especially in C. It's not really descriptive. If you write a reactionary language like Rust, it may be possible that you just fix one type of issue (with an error type taxonomy that's not very refined), and end up with a language that does not necessarily cause less bugs and vulns, but that causes less vulns that can be classified as that type of issue, while increasing other types of bugs/vulns, either of an existing type, or of a new type that only exists in that new language.

Like are we empirically seeing less Rust CVEs? Adjusted for popularity of software and perhaps age of software.


Are you saying by attempting to reduce certain types of bug category such as memory safety, other types of vulns would suddenly be increased because of it? It sounds to me like you are saying we shouldn't treat common cold because cancer rates might increase. And what do you mean by reactionary?


> It sounds to me like you are saying we shouldn't treat common cold because cancer rates might increase

surprisingly that’s almost not a strawman, I’d support an argument like that, and it’s how medicine works

if a cancer treatment is discovered, it needs to be trialled for side effects, and actually chemotherapy can have side effects that are worse than the cancer, it’s entirely possible for chemo to weaken the immune system and thus increase colds.

so hillariously, yes, that’s almost what I’m saying. but to be precise I’m not saying we shouldn’t cure cancer or solve bugs, just saying that solving one kind of issue doesn’t prove the tech is beneficial overall, and the more generic the problem being solved, the more likely the panacea will fail or have side effects


It’s also never been easier to replace C programs with safe alternatives.


Sure. Where's my rust chromium rewrite then?


I wouldn't be surprised if Google is experimenting with exactly that right now.


I think you misunderstand what a LEAN proof entails.

A statement corresponds to a type and to proof that statement means to show that this type is inhabitetd (i.e., there is actually a value of that type).

A proof is then "just a program" in "just a programming language". Crucially, you do not care what "this program computes" but you care only that the program actually has the given type.

There is no concept of a "bug" in a proof term because you do not actually care what a proof term "computes". You care that it exists and that it is well typed.


How would you characterise the 4833 issues surfaced by this work?

https://proceedings.mlr.press/v306/ammanamanchi26a.html


This might sound pedantic but it is worth being precise here. These kind of issues are either "Proving the wrong statements" or "using dubious axioms". Both of these are issues not issues of the proof. You do not need to understand the proof term to identify such issues nor do you need to understand the proof term to verify their absence.

I am not saying that LEAN proofs are without issues. What I am trying to say is that the proof term itself is not the trusted part.

To be convinced of a proof, an expert will have to (1) review the definitions, (2) review the axioms, and (3) trust the kernel.

Issues can arise in all 3 but the proof itself is untrusted.

Definitions in a formal language are hard and error prone. Axioms are mostly not an issue. Most LEAN proofs should only make use of the three standard axioms (Choice, Propext, and Quotient soundness) and it is well studied what these axioms mean. Actual bugs happen in 3. Kernel bugs can for example mean that the kernel incorrectly checks a proof of "False". Kernel bugs do happen but there are measures against it (e.g., using multiple kernels to check your proof) and it is quite rare for a human to accidentally trigger one. LLMs have accidentally triggered kernel bugs in the past.


They should be fixed?


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: