For years, memory safety was something security teams worried about and product teams didn’t. That has changed. Government security agencies across the Five Eyes now recommend memory-safe languages, and US guidance from CISA and the FBI asked software manufacturers to publish a memory-safety roadmap for existing products by 1 January 2026. That guidance is not law — but customers, insurers and procurement teams increasingly ask the question, and “we’re thinking about it” is no longer a good answer.
Why it matters
Memory-safety bugs — buffer overflows, use-after-free, out-of-bounds reads — have historically accounted for a large share of serious vulnerabilities in C and C++ software. Both Microsoft and the Chromium project have reported figures around 70% for their severe security bugs.
The most useful data point for planning, though, comes from Android. Google reported that memory-safety vulnerabilities fell from 76% of Android vulnerabilities in 2019 to 24% in 2024 — not by rewriting old code, but by writing new code in memory-safe languages. Vulnerabilities concentrate in new and recently changed code; old code that has been exercised for years gets safer over time.
The lesson: you don’t need to rewrite everything. You need to stop adding new memory-unsafe code in the places that matter, and harden what stays.
What a credible roadmap contains
- An inventory ranked by exposure. Parsers, network-facing services and anything handling untrusted input come first. Internal batch tools come last.
- A policy for new code. Which components must be written in a memory-safe language from now on, and what counts as an exception.
- Hardening for code that stays in C/C++. The roadmap should say how existing code gets safer, not just how it eventually gets replaced.
- Milestones and metrics. For example: share of new code in memory-safe languages, number of components behind safe interfaces, memory-safety bugs found per quarter.
- Ownership. Named owners and a review date. A roadmap nobody owns is a press release.
Hardening the C++ you keep
Most organisations will run significant C++ for a decade or more, so this part pays off immediately:
- Move to a current compiler and standard, and turn on warnings as errors for new code.
- Run AddressSanitizer and UndefinedBehaviorSanitizer in CI test runs.
- Add coverage-guided fuzzing (libFuzzer, AFL++) to every parser and protocol handler.
- Enable hardened standard-library modes and compiler hardening flags in release builds.
- Adopt bounds-checked access and modern ownership idioms in code review guidelines.
Introducing Rust where it pays
The best first Rust component is usually small, exposed and well-specified — a file-format parser, a protocol decoder, a sandboxed plugin. It should have clear inputs and outputs, so the C++/Rust boundary stays narrow.
Get the interop right early. Tools like cxx and bindgen make the boundary explicit; the important work is deciding who owns memory on each side and keeping unsafe code small, reviewed and tested. Measure performance before and after — Rust is typically competitive with C++, but you want evidence, not assumptions.
A realistic first quarter
| Weeks | Outcome |
|---|---|
| 1–2 | Inventory, exposure ranking, draft roadmap |
| 3–6 | Sanitisers and fuzzing in CI; first bugs found and fixed |
| 6–10 | First Rust component behind a safe interface, in production behind a flag |
| 10–12 | Roadmap published with metrics and owners |
That is enough to answer the customer question honestly — and to start measurably reducing risk.