Important News:SafeLogic's CryptoComply Achieves FIPS 140-3 Validation for 28 OEs and Receives Certificate #4781! Read the blog post!
The SafeLogic Blog
White House Calls for Adoption of Memory Safe Programming Languages
March 8, 2024 •Evgeny Gervis
On February 26, 2024, the Office of the National Cyber Director (ONCD) issued a report titled “Back to the Building Blocks: A Path Toward Secure and Measurable Software.” In this report, ONCD argues that software vendors should adopt memory safe programming languages to eradicate and prevent whole classes of software security weaknesses related to insecure memory management.
As a long-time software security practitioner, I was really moved by this edict from the executive branch. First, I must admit that there’s just something cool about reading a report from the highest levels of our government that gets into the nitty gritty details of why programming securely in a language like C is hard and diving into the differences between temporal and spatial memory safety issues. Second, ONCD is spot on in what they are saying on this topic.
I originally got into the software security space over two decades ago. During that time, I’ve been involved in numerous consulting projects where we’ve performed code reviews on millions of lines of code written in languages that lack memory safety, like C and C++. These reviews were performed using various techniques, including tool-based (e.g., static analysis) and manual code reviews.
One thing held constant. Given a sufficiently large and complex code base written in a memory unsafe language, memory-related software security weaknesses would be present that could provide a skilled attacker a way to exploit the software. Interestingly, these issues can creep in even if developers have been trained adequately in software security, even if they use the best static analysis tools, etc. Getting memory management right in languages that give developers complete control of memory is fundamentally difficult.
Correspondingly, the ONCD report correctly stated that a high percentage of CVEs we hear about in the wild could have been prevented if memory safe languages were used. One way to think about it is not giving developers rope they can accidentally hang themselves with. In the past, choosing a memory safe language often involved a tradeoff between security and performance, as memory safe language can be slower. But nowadays, with the advent of performant memory safe languages like Rust, that tradeoff is far less relevant.
So, is it a no-brainer to develop in a memory safe language to eradicate whole classes of security bugs? For new software development, it can be a straightforward choice. Not in every situation, of course, but in many situations. The problem is, what do we do with all the existing code bases written in languages like C and C++? It is a well-known fact that much code lives for a very long time because rewriting it is just too difficult and expensive. What can be done is to look for opportunities to do so when change needs to happen for other reasons. For instance, if your polybutylene pipe has been leaking water under your yard and you need to fix it, you might as well replace it with a copper pipe to avoid future leaks.
In the world of cryptography, we now have a fantastic opportunity to start transitioning to implementations in memory safe programming languages because we already have to work on transitioning to post quantum cryptography (PQC). Much of today’s cryptography is implemented in languages that are not memory safe, and that has caused its share of grief for the world. For instance, the ONCD report mentions the Heartbleed CVE from 2014, which could allow remote attackers to expose sensitive data, such as authentication credentials and secret keys.
The root cause of it, you guessed it, was incorrect memory handling in the TLS heartbeat extension. That is just one example of many. So, suppose we have to rip out much of our cryptography to replace it with different cryptography that will resist cryptanalysis on future quantum computers. In that case, we might as well replace that cryptography with PQC algorithm and protocol implementations written in memory safe languages.
Migration to PQC represents perhaps once in a 50 to 100-year opportunity to do three things. First, of course, it is an opportunity to replace quantum-vulnerable cryptographic infrastructure with post-quantum cryptography. Second, it is an opportunity to build in crypto agility so that future algorithm transitions (which we know will be needed) can happen in a streamlined way. Third, PQC migration represents a phenomenal opportunity to adopt memory safe implementations in both cryptographic primitives and the protocols that use them. If we need to replace all the piping, not only in our front yard but across our entire digital ecosystem, let us choose to go with pipes made from better material to help us prevent future leaks.
Evgeny Gervis
Evgeny is the CEO of SafeLogic.
Popular Posts
Search for posts
Tags
- FIPS 140 (111)
- FIPS validation (85)
- Encryption (70)
- cryptography (68)
- NIST (62)
- CryptoComply (60)
- SafeLogic (58)
- Industry News (54)
- cryptographic module (51)
- Conversations (49)
- CMVP (48)
- RapidCert (46)
- compliance (41)
- Ray Potter (33)
- SafeLogic News (33)
- Event (27)
- federal (27)
- CAVP (23)
- Cybersecurity (23)
- FIPS 140-3 (18)
- OpenSSL (16)
- government (14)
- FedRAMP (13)
- CryptoCompact (12)
- Cryptology (12)
- DoD (12)
- RSA (12)
- healthcare (12)
- partners (12)
- NSA (11)
- post-quantum cryptography (11)
- Cloud (9)
- PQC (9)
- security (9)
- CMMC (8)
- Suite B (8)
- testing (8)
- whitepaper (8)
- Approved Products List (APL) (6)
- HITECH (6)
- ICMC (6)
- lab (6)
- CEO (5)
- NIST 800-171 (5)
- NIST 800-53 (5)
- OpenSSL 3.0 (5)
- iOS (5)
- procurement (5)
- C3PAO (4)
- Common Criteria (4)
- HITECH Act (4)
- deadline (4)
- encrypt (4)
- innovation (4)
- procure (4)
- public sector (4)
- Air Force (3)
- BSAFE (3)
- DFARS (3)
- HIPAA Safe Harbor (3)
- HITECH Safe Harbor (3)
- OpenSSL 1.1.1 (3)
- OpenSSL 3.x (3)
- POA&M (3)
- TLS 1.3 (3)
- magazine (3)
- queue (3)
- transition (3)
- 3PAO (2)
- ACVP (2)
- BAA (2)
- CIO (2)
- CSP (2)
- Cyber Defense Magazine (2)
- Defense Industrial Base (2)
- HIPAA security controls (2)
- Historical Status (2)
- MFA (2)
- OpenSSL 1.0.2 (2)
- SPRS (2)
- StateRAMP (2)
- entropy (2)
- excellence (2)
- finance (2)
- founder (2)
- gold (2)
- leader (2)
- maturity (2)
- overlap (2)
- pilot (2)
- rsa conference (2)
- solution (2)
- sponsors (2)
- sunset (2)
- vendor (2)
- year (2)
- Active Status (1)
- Alliance for Digital Innovation (1)
- Android (1)
- CIO Prime Views (1)
- DHS (1)
- DIU (1)
- DIUx (1)
- DOJ (1)
- DoDIN APL (1)
- Entropy Source Validation (1)
- FCA (1)
- FIPS Compliance (1)
- FISMA (1)
- GSA (1)
- HITRUST (1)
- Matt Cornelius (1)
- Matthew Cornelius (1)
- Maturity Model (1)
- NCCoE (1)
- OMB (1)
- SLED (1)
- SP800-131A (1)
- SP800-90A (1)
- TLS 1.1 (1)
- background (1)
- best (1)
- co-founder (1)
- codies (1)
- congress (1)
- cybertech (1)
- education (1)
- elliptic curve cryptography (1)
- extended (1)
- faq (1)
- fintech (1)
- fiscal (1)
- fiscal year (1)
- fraud (1)
- globee (1)
- hill (1)
- interview (1)
- kratos (1)
- libgcrypt (1)
- national cybersecurity strategy (1)
- opportunities (1)
- parallel (1)
- profile (1)
- public (1)
- representatives (1)
- reseller (1)
- senate (1)
- senators (1)
- simplify (1)
- state (1)
- stealth mode (1)
- story (1)
- terminology (1)
- trophy (1)
- whistleblower (1)
- whistleblowing (1)