Buffer overflow vulnerabilities have been around ever since security professionals started reporting networking issues and they continue to be a prevalent defect in memory-safe software design that can lead to system compromise.

These vulnerabilities can lead to data corruption, sensitive data exposure, program crashes, and unauthorized code execution. Threat actors frequently exploit these vulnerabilities to gain initial access to an organization’s network and then pivot and move laterally.

In an effort to help users to fend off these types of attacks, the Cybersecurity and Infrastrucure Security Agency (CISA) and the Federal Bureau of Investigation (FBI) released a Secure by Design Alert, Eliminating Buffer Overflow Vulnerabilities, as part of their cooperative Secure by Design Alert series.

Despite the existence of well-documented, effective mitigations for buffer overflow vulnerabilities, manufacturers continue to use unsafe software development practices that allow these vulnerabilities to persist.

Moreover, to prevent buffer overflow vulnerabilities, the following secure by design practices should end up implemented, according to the guidance.

Schneider Bold

Where feasible, use memory-safe languages when developing software to shift the burden of memory management from the developer to the programming language’s built-in safety features.

Phased Transition Plan

Manufacturers should develop and implement a phased transition plan for increasing memory-safe language usage. Ideally, this plan should include using memory-safe languages to develop new code and – over time and when feasible – transition their software’s most highly privileged/exposed code to memory-safe languages. While transitioning to memory-safe languages, manufacturers should also consider leveraging technologies to limit memory safety vulnerabilities in their existing code bases.

Enable compiler flags that implement compile time and runtime protections against buffer overflows.

Regularly run unit tests with an instrumented toolchain such as AddressSanitizer and MemorySanitizer that exercises source code with runtime checks for buffer overflows and other memory safety issues. In a codebase with significant unit test coverage, such tools can detect many (but not all) memory safety related issues before they become a vulnerability.

Conduct aggressive adversarial product testing, including static analysis, fuzzing, and manual reviews to ensure the quality and security of code throughout the development lifecycle.

Publish a memory-safety roadmap outlining how the manufacturer plans to develop new products with memory-safe languages and migrate code to memory safe languages in a prioritized manner.

Conduct root cause analysis of past vulnerabilities, including buffer overflows, to spot trends and patterns. Where possible, take actions to eliminate entire classes of vulnerabilities across products, rather than the superficial causes.

Click here for more on the buffer overflow guidance.

Pin It on Pinterest

Share This