“The development of new product lines for use in service of critical infrastructure or [national critical functions] NCFs in a memory-unsafe language (e.g., C or C++) where there are readily available alternative memory-safe languages that could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety.” Now that's a strong statement.…
I wonder if this is a real solution. "Memory safety" has sure been pushed hard the last few years, but this feels more like a "we need to do something, this is something, we should do this" kind of response than anything that will really address the issue. If security-through-virtualization had been the fad lately, would that have been proposed instead?
Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
61–70 of 100 posts
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#62Earlier quoted context omitted.
Do you have an OS written in a memory safe language with a good security track record we can switch to? If we start building now we might have a prototype by 2030.
There are plenty with good security track records, formal specifications, formal proofs of various security properties, and decades of deployments. SCOMP, GEMSOS, INTEGRITY-178, seL4.
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#63Earlier quoted context omitted.
I think that argument had more merit back when C++ was a much simpler language. I've been programming in C++ since 1991, and the language / standard library are now so complex that it's hard to be 100% confident that I understand the meaning of any non-trivial code.
I have to massively disagree here. I'm far more confident about code written in the modern style of C++ than I am in old school C++. Modern C++ with RAII, smart pointers, constexpr, concepts, and heavy instrumentation is so much easier to reason about. It's actually close to Alexander Stepanov's idealised C++.
IIUC, you're referring to codebases which limit themselves to what's often called "modern C++".
I'm working with codebases that draw from a gnarly combination of older and newer parts of the current language spec.
So in my experience, very few C++ programmers are familiar with every part of the current language spec that has relevance to these codebases.
I.e., their code isn't obviously correct regarding many aspects of correctness, including memory safety.
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#64Earlier quoted context omitted.
I'm a little familiar with TLA+ but it can't verify the actual code you want to run, only a restatement of your intended algorithm. Are there published model checkers that can check real C++? How would they catch double-free or use-after-free or double-throw?
Yep. ESBMC and PolySpace both work for C++. I use CBMC for C. They run an abstract machine model through an SMT solver. Among other things, this abstract machine model tracks memory usage, UAF, aliasing, etc. With custom assertions, it can also cover issues like casting safety, serialization issues, logic errors, etc. More or less, you can build up any proof obligations you need and run them through the model checker…
Does that detect issues at runtime, or prove statically that the code is "safe" (whatever the remit of that definition is here)?
If the former, I guess you're still at the mercy of test coverage and all the pitfalls it entails.
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#65Earlier quoted context omitted.
I wonder if this is a real solution. "Memory safety" has sure been pushed hard the last few years, but this feels more like a "we need to do something, this is something, we should do this" kind of response than anything that will really address the issue. If security-through-virtualization had been the fad lately, would that have been proposed instead?
While these types of failures are the 50-70% problem, 30% left seems like a big problem too and the black-hats will just concentrate more on those if the low hanging fruit are removed with rust, C#, python, whatever
It is true that black hats are going to focus on the remainder pretty much by definition because there’s no other choice. The rest is a problem and it needs a solution. But the fact that it exists is not a sound argument against choosing a memory-safe language.
Current solutions are not ideal but they still eliminate a huge portion of defects. Today we can avoid all the memory issues and we also can focus on the next biggest category of defects. If we’ll keep halving possible defects it won’t take long before software is near defect-free.
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#66Earlier quoted context omitted.
I wonder if this is a real solution. "Memory safety" has sure been pushed hard the last few years, but this feels more like a "we need to do something, this is something, we should do this" kind of response than anything that will really address the issue. If security-through-virtualization had been the fad lately, would that have been proposed instead?
It is not a real solution. The people delivering memory-safe code today do not think their systems are secure against individual, lone attackers, let alone fully-funded state actors. The overwhelming majority of them, all software developers, and software security professionals probably think it is literally impossible to design and develop usable systems secure against such threats, i.e. can achieve the desired requ…
Right. I was around for that era and worked on some of those systems.
NSA's first approach to operating system certification used the same approach they used for validating locks and filing cabinets. They had teams try to break in. If they succeeded, the vendor was told of the vulnerabilities and got a second try. If a NSA team could break in on the second try, the product was rejected.
Vendors screamed. There were a few early successes. A few very limited operating systems for specific military needs. Something for Prime minicomputers. Nothing mainstream.
The Common Criteria approach allows third-party labs to do the testing, and vendors can try over and over until success is achieved. That is extremely expensive.
There are some current successes. [1][2] These are both real-time embedded operating systems.
[1] https://www.acsac.org/2009/program/case/ccsc-Kleidermacher.p...
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#67Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#68“The development of new product lines for use in service of critical infrastructure or [national critical functions] NCFs in a memory-unsafe language (e.g., C or C++) where there are readily available alternative memory-safe languages that could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety.” Now that's a strong statement.…
I think you are being charitable to it. Less charitable version can be "Nobody ever will get fired for buying IBM". :)
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#69Earlier quoted context omitted.
Do you have an OS written in a memory safe language with a good security track record we can switch to? If we start building now we might have a prototype by 2030.
There are plenty with good security track records, formal specifications, formal proofs of various security properties, and decades of deployments. SCOMP, GEMSOS, INTEGRITY-178, seL4.
Re: Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk
#70Earlier quoted context omitted.
There are plenty with good security track records, formal specifications, formal proofs of various security properties, and decades of deployments. SCOMP, GEMSOS, INTEGRITY-178, seL4.
Don’t forget Temple OS