In a new report, the National Security Agency urges organizations to drop some commonly used programming languages such as C and C++ due to programmer error leading to exploitable memory-based vulnerabilities.
The agency’s guidance, “Software Memory Safety” Cybersecurity Information Sheet, highlights how malicious cyber actors exploit poor memory management issues to access sensitive information and use to execute unauthorized code and wreak havoc on the software supply chain.
Neal Ziring, the agency’s cybersecurity technical director, says in a press release that these memory management issues have been exploited for decades and are still far too common.
“We have to consistently use memory safe languages and other protections when developing software to eliminate these weaknesses from malicious cyber actors,” Ziring says.
According to the NSA, Microsoft and Google have each said that software memory safety issues are behind about 70% of their vulnerabilities, and memory management issues can also lead to technical and performance issues.
To help prevent those problems, NSA recommends that organizations use “memory safe” languages and bolster protection through code-hardening defenses.
“While the use of added protections to nonmemory safe languages and the use of memory safe languages do not provide absolute protection against exploitable memory issues, they do provide considerable protection,” the agency’s report says. “Therefore, the overarching software community across the private sector, academia, and the U.S. Government have begun initiatives to drive the culture of software development towards utilizing memory safe languages.
According to the agency, those “memory safe” languages include C#, Go, Java, Ruby, Rust and Swift. These can help prevent programmers from introducing certain types of memory-related issues since memory is managed as part of the language and doesn’t rely on the programmer adding code to implement protections.
In addition, the NSA says memory safe languages provide differing degrees of memory usage protections, so available code hardening defenses, such as compiler options, tool analysis, and operating system configurations, should be used for their protections as well.
“By using memory safe languages and available code hardening defenses, many memory vulnerabilities can be prevented, mitigated, or made very difficult for cyber actors to exploit,” the agency says in the guide.
If you enjoyed this article and want to receive more valuable industry content like this, click here to sign up for our digital newsletters!