Memory safety vulnerabilities are among the most prevalent classes of software vulnerability, which can generate substantial costs for software manufacturers and consumers related to patching, incident response, and other efforts.

To that end, security agencies across the globe recommend software manufacturers create memory safe roadmaps, including plans to address memory safety in open source software (OSS).

In an effort to help protect open source code, those agencies just now released guidance to provide organizations with findings on the scale of memory safety risk in selected OSS in “Exploring Memory Safety in Critical Open Source Projects” provided by the Cybersecurity and Infrastructure Security Agency (CISA), Federal Bureau of Investigation, Australian Signals Directorate’s Australian Cyber Security Centre, and Canadian Cyber Security Center.

The guidance provides a starting point for software manufacturers to create memory safe roadmaps, including plans to address memory safety in external dependencies which commonly include OSS. Additionally, “Exploring Memory Safety in Critical Open Source Projects” also aligns with the 2023 National Cybersecurity Strategy and corresponding implementation plan. Furthermore, that plan discusses investing in memory safety and collaborating with the open source community — including establishing the interagency Open Source Software Security Initiative (OS3I) and investment in memory-safe programming languages.

Schneider Bold

During the course of its research, the agencies explored a set of critical open source projects to determine the extent to which they end up written in memory-unsafe languages. Moreover, memory-unsafe languages require developers to properly manage memory use and allocation. Furthermore, mistakes, which inevitably occur, can result in memory-safety vulnerabilities such as buffer overflows and use after free.

Additionally, successful exploitation of these types of vulnerabilities can allow attackers to take control of software, systems, and data. Moreover, memory-safe languages shift the abstraction layer and responsibility for writing memory-safe code from the developer to the compiler or interpreter, vastly reducing opportunities to introduce memory-safety vulnerabilities.

  • Upon analyzing a list of 172 projects derived from the Open Source Security Foundation (OpenSSF) Securing Critical Projects Working Group’s List of Critical Projects, the agencies found:
  • 52 percent of the projects contain code written in a memory-unsafe language.
  • 55 percent of the total lines of code (LoC) for all projects ended up written in a memory-unsafe language.
  • The largest projects are disproportionately written in memory-unsafe languages. Of the ten largest projects by total LoC, each has a proportion of memory unsafe LoC above 26 percent. The median proportion using memory-unsafe languages across the ten projects is 62.5 percent and four of the ten project proportions exceed 94 percent.
  • Dependency analysis of three projects written in memory-safe languages demonstrated that each one depended on other components written in memory- unsafe languages.

Additionally, CISA said all organizations and software manufacturers should review the methodology and results found in the guidance to:

  1. Reduce memory safety vulnerabilities
  2. Make secure and informed choices
  3. Understand the memory-unsafety risk in OSS
  4. Evaluate approaches to reducing this risk
  5. Continue efforts to drive risk-reducing action by software manufacturers

Furthermore, to learn more on how to create memory safety roadpmaps, click here for more on the guidance.

Pin It on Pinterest

Share This