search
HomeTechnology peripheralsAIThe White House issued a document calling on developers to abandon C and C++: Rust was 'hand-picked' for memory safety

Recently, the White House Office of the National Cyber ​​Director (ONCD) made an important point in a 19-page report: developers should use memory-safe programming languages, such as the Rust language. The report points out that choosing a memory-safe programming language is a key way to ensure that software is developed in a secure-by-design manner.

ONCD also pointed out that the recommendations in the report were developed in collaboration with technology companies, academia and other institutions, and have the support of a number of well-known technology companies, including HP, Accenture and Palantir.

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

Report address: https://www.whitehouse.gov/wp-content/uploads/2024/02/Final-ONCD-Technical- Report.pdf

In fact, this is not the first time that an official US agency has called for the abandonment of C and C.

Last December, the U.S. Cybersecurity and Infrastructure Agency (CISA), together with other agencies, released a "Memory Security Roadmap Guidance", pointing out C and C as memory incompatible Safe programming languages ​​emphasize that software developers should adopt other memory-safe programming languages ​​such as Rust and Java. The purpose of this guide is to increase awareness of memory safety issues in software development and encourage the adoption of more reliable programming languages ​​to reduce potential security vulnerabilities. CISA specifically emphasizes the importance of adopting memory-safe programming languages ​​as this helps reduce the risk of malicious attacks and data leaks. This move is also to promote the development of the software development industry in a more secure and reliable direction,

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

Source: https://www.cisa.gov /sites/default/files/2023-12/The-Case-for-Memory-Safe-Roadmaps-508c.pdf

Abandon C and C, turn to Rust, just for memory safety

It is important to emphasize the use of memory-safe programming languages ​​because memory safety prevents problems such as buffer overflows and dangling pointers, which can lead to bugs and vulnerabilities. Therefore, it is crucial to understand the concept of memory safety.

How harmful is memory insecurity? In 2019, Microsoft security engineers reported that approximately 70% of security issues were caused by memory safety issues. In 2020, Google reported similar data for bugs discovered in the Chromium browser.

For programming languages, both C and C allow arbitrary pointer arithmetic using direct memory addresses without bounds checking. The report states that experts have found some programming languages, represented by C and C, that both lack memory safety-related features and are highly pervasive in some critical systems. Therefore, C and C are considered "unsafe" programming languages.

Corresponding to C and C, Rust is considered a classic example of a memory-safe programming language. Rust is a systems programming language focused on safety, especially concurrency safety. It supports multi-paradigm languages ​​such as functional, imperative and generic programming paradigms, and deep learning frameworks such as TensorFlow also use it as an excellent front-end language.

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

In the 2021 annual developer survey report of the programmer question and answer website Stack Overflow, the Rust language became the most popular programming language among developers. One of the reasons Rust is popular in the systems programming world is that it can help eliminate memory-related security vulnerabilities.

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

Rust’s memory safety features have long been verified by the industry. In April 2021, Google announced that Android would add support for the Rust language. The reason is that memory safety bugs in C and C are the most difficult sources of bugs to solve, and Google has invested a lot of effort and resources to detect, fix and mitigate such bugs, and effectively prevent a large number of bugs from entering Android versions.

However, despite these efforts, memory safety bugs remain the primary cause of stability issues, chronically accounting for approximately 70% of Android's critical security vulnerabilities. Therefore, Google added a 3rd option, Rust, for operating system developers.

Dan Grossman, professor of computer science at the University of Washington, said that for decades, everyone has understood the dangers of C and C, and now it is finally a good time to promote memory-safe programming languages. After all, there are practical and mature ones. alternative plan.

He also believes that getting rid of C and C will not be accomplished overnight, especially in embedded systems. However, this process is expected to accelerate as other programming languages ​​such as Rust become more widely used in systems software.

Regarding the official attitude towards C and C, more people don’t seem to buy it.

Some people think that modern C is memory safe, and all operating systems are programmed in C or C. Some people also believe that even though C is not memory safe, modern C has more "guardrails" and is low-cost or even free of charge.

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

For Rust, which has been "handpicked" for memory safety, some people feel that its level of support is not that high. , nor worthy of integration into government systems.

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

In addition to Rust, what other memory-safe programming languages ​​​​

November 2022, United States National The National Security Agency (NSA) has published a cybersecurity information sheet detailing the programming languages ​​it considers memory safe

  • Rust
  • Go
  • ##C
  • #Java
  • Swift
  • JavaScript
  • Ruby
  • Python
  • Delphi/Object Pascal
  • Ada

How popular are the above programming languages? The programming language popularity index TIOBE in February 2024 shows that in terms of programming, Python ranks first, C# ranks fifth, Java ranks fourth, JavaScript ranks sixth, Go ranks eighth, and Delphi/Object Pascal ranks 12th. Swift ranked 16th, Rust ranked 18th, and Ruby barely ranked 20th.

As you can see, most of the languages ​​selected by the NSA are in the top 20, only Ada is not in the top 10, but there are only 5 in the top ten.

The White House issued a document calling on developers to abandon C and C++: Rust was hand-picked for memory safety

Source: https://www.tiobe.com/tiobe-index/

The report also calls for better measurement of software security. ONCD believes: Better metrics enable technology providers to better plan for, predict and mitigate vulnerabilities before they become a problem.

The report also reviews the Apollo 13 mission, which NASA classified as a "successful failure." The mission itself suffered a catastrophic failure, and the three astronauts made temporary repairs and mitigated some of the problems in order to return home safely. The report states: Memory security codes are very important to the space program. Human exploration of space should use a memory-safe language, a language that is as close to the kernel as possible to avoid future accidents.

As more and more of the world becomes digital, better coding becomes increasingly important, and bad code can be used maliciously.

Rust Language

Rust language is a general-purpose, compiled programming language led by Mozilla. The design criteria are "safety, concurrency, and practicality" and supports functional, concurrent, procedural, and object-oriented programming styles.

The most prominent advantage of the Rust language is that it can provide memory safety guarantees without additional performance loss. In the development process of traditional system-level programming languages ​​(C/C++), crashes or bugs caused by various memory errors often occur, such as null pointers, wild pointers, memory leaks, memory out-of-bounds, segfaults, data races, and iterations. Device failure, etc.

Memory problems are a major hidden danger affecting program stability and security, and are a major factor affecting development efficiency. The two major technology giants Google and Microsoft have stated that 70% of program security issues in their important products are caused by memory issues, and both giants are considering using the Rust language to solve memory safety issues.

In addition, Rust also has excellent cross-platform capabilities, supports cross-compilation, and is also friendly to embedded environments.

However, the Rust language also has some tricky shortcomings.

First of all, due to some special syntax in Rust, it is slightly difficult for beginners to get started, such as "lifetime". In comparison, languages ​​such as Python and Java are simpler and easier to learn. But if you already know the C language, learning the Rust language is much easier because it borrows a lot of C syntax.

Secondly, the compiler checking of the Rust language is very strict, and most of the development process is spent solving compilation problems. However, once the compilation is passed, developers do not need to worry about memory safety, memory leaks and other headaches, and only need to focus on business logic.

The above is the detailed content of The White House issued a document calling on developers to abandon C and C++: Rust was 'hand-picked' for memory safety. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
What is Graph of Thought in Prompt EngineeringWhat is Graph of Thought in Prompt EngineeringApr 13, 2025 am 11:53 AM

Introduction In prompt engineering, “Graph of Thought” refers to a novel approach that uses graph theory to structure and guide AI’s reasoning process. Unlike traditional methods, which often involve linear s

Optimize Your Organisation's Email Marketing with GenAI AgentsOptimize Your Organisation's Email Marketing with GenAI AgentsApr 13, 2025 am 11:44 AM

Introduction Congratulations! You run a successful business. Through your web pages, social media campaigns, webinars, conferences, free resources, and other sources, you collect 5000 email IDs daily. The next obvious step is

Real-Time App Performance Monitoring with Apache PinotReal-Time App Performance Monitoring with Apache PinotApr 13, 2025 am 11:40 AM

Introduction In today’s fast-paced software development environment, ensuring optimal application performance is crucial. Monitoring real-time metrics such as response times, error rates, and resource utilization can help main

ChatGPT Hits 1 Billion Users? 'Doubled In Just Weeks' Says OpenAI CEOChatGPT Hits 1 Billion Users? 'Doubled In Just Weeks' Says OpenAI CEOApr 13, 2025 am 11:23 AM

“How many users do you have?” he prodded. “I think the last time we said was 500 million weekly actives, and it is growing very rapidly,” replied Altman. “You told me that it like doubled in just a few weeks,” Anderson continued. “I said that priv

Pixtral-12B: Mistral AI's First Multimodal Model - Analytics VidhyaPixtral-12B: Mistral AI's First Multimodal Model - Analytics VidhyaApr 13, 2025 am 11:20 AM

Introduction Mistral has released its very first multimodal model, namely the Pixtral-12B-2409. This model is built upon Mistral’s 12 Billion parameter, Nemo 12B. What sets this model apart? It can now take both images and tex

Agentic Frameworks for Generative AI Applications - Analytics VidhyaAgentic Frameworks for Generative AI Applications - Analytics VidhyaApr 13, 2025 am 11:13 AM

Imagine having an AI-powered assistant that not only responds to your queries but also autonomously gathers information, executes tasks, and even handles multiple types of data—text, images, and code. Sounds futuristic? In this a

Applications of Generative AI in the Financial SectorApplications of Generative AI in the Financial SectorApr 13, 2025 am 11:12 AM

Introduction The finance industry is the cornerstone of any country’s development, as it drives economic growth by facilitating efficient transactions and credit availability. The ease with which transactions occur and credit

Guide to Online Learning and Passive-Aggressive AlgorithmsGuide to Online Learning and Passive-Aggressive AlgorithmsApr 13, 2025 am 11:09 AM

Introduction Data is being generated at an unprecedented rate from sources such as social media, financial transactions, and e-commerce platforms. Handling this continuous stream of information is a challenge, but it offers an

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools