Live data from Hacker News

Mitigating Memory Safety Issues in Open Source Software

security.googleblog.com

191–200 of 244 posts

Re: Mitigating Memory Safety Issues in Open Source Software

#191

Earlier quoted context omitted.

That's a problem, but it's one that's more likely to be worked around (most likely: by maintaining unsafe forks for those platforms) than "creating entire new communities of support for another language" or "redesigning whole projects to make GC tenable". I think you might see some full-system rewrites for serverside components where Go will work out. But I think the projects we're talking about, like I said, have en…

Oh, I'm not suggesting that they will use Go–they will use C and I'm just responding to you saying that it is difficult to find situations where Rust is unworkable.

The premise of this story is that ISRG is going to secure funding to essentially bribe people (my words, and I think it's a very good project) to not keep critical software in C anymore.

My guess is what will happen in the cases where Rust is unworkable is that there will be less-secure forks for the obscure platforms.

Re: Mitigating Memory Safety Issues in Open Source Software

#192
post #161
post #3

What is left out of the title is that they do not provide funding to the current authors/maintainers of these open source projects. Instead, they fund an organization that will rewrite these tools. Correct me if I’m wrong, but that’s my understanding of the rather terse article. I would rather have the original maintainers funded and still in control of the many pieces that form the basis of the major Linux distribut…

(Executive Director of ISRG here) > What is left out of the title is that they do not provide funding to the current authors/maintainers of these open source projects. Instead, they fund an organization that will rewrite these tools. This's not what's happening. Here's what is: ISRG plans and coordinates investments in moving open source software to memory safe languages. We have a strong preference for working on th…

so potentially the result is a complete rewrite not involving the original authors in a language the original authors may not be current with, by a contractor code publisher / producer.

given the potential for security theater and general fud and the potency that appeals to authorities such as sponsors like Google can create in the minds of the public, how has this been evaluated in terms of the possibility for widespread disintermediation of the open source software community at large?

Re: Mitigating Memory Safety Issues in Open Source Software

#194
post #126

A worthwhile goal. But not in a memory unsafe language, please. There's hype and there are lies: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Ao...

This is flamebait, and you know it. Stack overflows in Rust are perfectly safe because they hit a guard page.

Re: Mitigating Memory Safety Issues in Open Source Software

#195

Earlier quoted context omitted.

Then you don't know anything about C++, only the C legacy it is built on. Modern C++ has good data structures and good memory management. To be fair actually using those features of C++ instead of the C legacy is still catching on. Most instructors aren't even teaching it. Using C in C++ is like using unsafe everywhere in rust - you can do it, but you lose all the advantages.

Memory safety is not about what a language has . It's about all the things a language doesn't have, doesn't allow.

[deleted]

Re: Mitigating Memory Safety Issues in Open Source Software

#196

Earlier quoted context omitted.

Then you don't know anything about C++, only the C legacy it is built on. Modern C++ has good data structures and good memory management. To be fair actually using those features of C++ instead of the C legacy is still catching on. Most instructors aren't even teaching it. Using C in C++ is like using unsafe everywhere in rust - you can do it, but you lose all the advantages.

Even if you stick to "modern C++" and never use C-style pointers, arrays, enums or unions, it is still trivial to have memory errors in C++.

[deleted]

Re: Mitigating Memory Safety Issues in Open Source Software

#197
post #124

Earlier quoted context omitted.

> This also means that very long-lived platforms will probably be forced to upgrade that library every half year or so in line with the development of rust. As a security library... you really ought to be updating it every half year of so. This has nothing to do with rust though. Rust maintains full backwards compatibility, so even if you upgrade the compiler (which is unlikely on long lived platforms) and not the li…

I think you should reconsider the actual problem, if you do not understand it. The fact that rustc is backwards compatible is great, sure. But it does not solve the problem of distributors. Say you have libfoo-1.0 that uses rust and cargo 1.2 . A distributor that now releases their linux version and wants to ship libfoo-1.0 must consider the requirements for supporting it. This support usually outlives the upstream s…

> Any change in libfoo-1.2 might require a newer version of rust.

In theory perhaps. But in theory this could happen with C or C++ too. In practice, security patches try to be minimal.

Sure, if you're several versions behind you might have more work to do. But you knew you were gonna own that problem when you decided to lag behind.

Re: Mitigating Memory Safety Issues in Open Source Software

#198
post #97

Earlier quoted context omitted.

Nim is not using GC anymore [1], is memory safe and support formal methods [2] It's also introducing isolation [3] to provide safe multithreading similar to Rust's sendable. [1] https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc... [2] https://nim-lang.org/docs/drnim.html [3] https://github.com/nim-lang/RFCs/issues/244

From [1]: > ORC is Nim’s all-new cycle collector based on ARC. It can be considered a full-blown GC since it includes a local tracing phase (contrary to most other tracing GCs which do global tracing). ORC is what you should use when working with Nim’s async because it contains cycles that need to be dealt with. Sooooo unless you > disable the GC and do manual memory management, but then you lose access to most of th…

No. It's an inlined reference counter, not a runtime with dedicated thread and so on. Most people use "GC" to refer to the latter.

Re: Mitigating Memory Safety Issues in Open Source Software

#199
post #126

A worthwhile goal. But not in a memory unsafe language, please. There's hype and there are lies: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Ao...

This is flamebait, ignoring that "nearly perfect detection" and "no detection whatsoever" are very different things.

But also, stack overflows aren't memory unsafe in modern rust. The issue search you want to find memory safety issues is: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Ao...

Re: Mitigating Memory Safety Issues in Open Source Software

#200

Is there a reason why some developers prefer Rust over C++? I often hear that it’s because of Cargo, but in my experience, universal build systems and package managers end up not really solving the problem they are designed to solve, and are a huge attack vector. Anyone who’s tried to deploy their own complex Maven project knows that it’s a true nightmare. C++, on the other hand, has a variety of choices for build sy…

At this point if you stick to a limited subset of C++ and don't go too deep you can get a perfectly safe language which is powerful and performant. If you want a safer language with in my opinion a far better type system than anything Rust could possibly achieve at this point you can use Ada. But why not those two options? Old, smelly and most importantly, difficult to deal with dependencies. You have to actually thi…

Is Ada memory safe in the presence of malloc/free?
Post reply on HN