Live data from Hacker News

The Case for Memory Safe Roadmaps

nsa.gov

91–100 of 427 posts

Re: The Case for Memory Safe Roadmaps

#91

Earlier quoted context omitted.

Oh boy... Nothing is mandated here. These are just suggestions from experts. Don't take them if you don't want to.

wait for gov contract projects mandate them in the fine prints, it's a signal that is serious enough for anyone interested in doing any software-related business with gov, for them, this is nearly the same as 'mandated'

I for one would prefer that government projects set this kind of requirement. I don't want my government software implemented in C++. If they are the customer they should require that the projects do everything they can to eliminate bugs caused by memory unsafety. Using a Memory Safe language is one of the easiest ways to do so.

Re: The Case for Memory Safe Roadmaps

#92

"Undefined behavior" in general is a nightmare. After memory safety, the next target should be the enforcement of underflow/overflow trapping. With the exception of the intentional use to implement modular arithmetic, underflow/overflow should always be an error condition.

The main problem with signed overflow being UB is that it's an opportunity for compilers to blatantly do adversarial language lawyering against the programmer in order to enable optimisations.

When it comes to unsigneds, there's no such problem (and this is in fact the real reason why anything that can be unsigned in C/C++ should be unsigned).

Re: The Case for Memory Safe Roadmaps

#93
post #22

Earlier quoted context omitted.

Really, the only memory unsafe languages still in use are C and C++. If it weren't for the behemoth of legacy code we'd really have this problem more-or-less licked. Unfortunately, that behemoth is still rampaging across the landscape. "Rewrite it in Rust" gets a bit of pushback, perhaps even justified, but at this point in time I'll take anything that just reduces that behemoth in size. The journey of a thousand mil…

>Really, the only memory unsafe languages still in use are C and C++. Ada, Fortran, assembly?

Fortran doesn’t even have dynamic memory allocation, so it’s inherently safe.

Re: The Case for Memory Safe Roadmaps

#94
post #22

Earlier quoted context omitted.

Really, the only memory unsafe languages still in use are C and C++. If it weren't for the behemoth of legacy code we'd really have this problem more-or-less licked. Unfortunately, that behemoth is still rampaging across the landscape. "Rewrite it in Rust" gets a bit of pushback, perhaps even justified, but at this point in time I'll take anything that just reduces that behemoth in size. The journey of a thousand mil…

>Really, the only memory unsafe languages still in use are C and C++. Ada, Fortran, assembly?

Fortran is probably as bad as C, and Ada isn't truly memory safe - they link to Ada/Spark which is but that doesn't seem to have much widespread use.

https://www.adacore.com/about-spark

Re: The Case for Memory Safe Roadmaps

#96
post #6

Their "Appendix: Memory Safe Languages" lists: C#, Go, Java, Python, Rust & Swift

It's unfortunate that there's no mention that not all these languages are equally safe.

Go isn't memory safe when using goroutines. See: Golang data races to break memory safety: https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...

Re: The Case for Memory Safe Roadmaps

#98

Earlier quoted context omitted.

Next thing they'll be giving requirements for people building bridges, houses, and gas and electricity fittings. Seriously, I think the time has long since passed software needs regulating. It's a major part of modern society, and as far as I'm aware, most people aren't opposed to building standards in principle.

The wild west had a lot less danger and death than Hollywood makes it out to seem. Likewise, I'm going to miss the internet and computing as we know it now when it's regulated to shit like everything else. Nothing nice ever lasts. Complete safety, or actual freedom. Pick one. You can't have both.

Please don't insult the 2014 government safety film 'A Million Ways to Die in the West'.

Re: The Case for Memory Safe Roadmaps

#99

Isn't C++ with RAII reasonably safe? I tried to learn/like Rust but it's against how I use to think. If no friendlier safe high speed programming language appears, I rather use C/C++ and trade safety for friendliness.

If you have no users then go for it. However if you do then you are doing those users a disservice by exposing them to unnecessary risk.

Maybe the risk is mitigated in other ways. Your software runs as a cli and not a service. It doesn't process outside input. It is run in an ironclad sandbox.

But honestly, if you think the way C++ with RAII want's you to then you should already be following the rules that Rust want's you to follow for the most part.

Re: The Case for Memory Safe Roadmaps

#100
post #6

Their "Appendix: Memory Safe Languages" lists: C#, Go, Java, Python, Rust & Swift

[flagged]

I agree that it is not a mandate yet. NSA does have some interesting insight and expertise they acquire in this area.

Time and time again, we see experts make recommendations, then legislation and rules make it mandatory.

A burning example is most of NIST special publications. NIST makes no rules, mandates and such. Yet, mandates (e.g.,DFARS, DEAR) point to the recommendation as the requirement.

Right now there are two of these playing out in the cybersecurity field - zero trust and passwordless authentication.

So those who down this comment, you are right, it is not a mandate. Those who up this comment, you are right, it is likely to become a mandate.

Post reply on HN