Fact-checked by Grok 2 weeks ago

Memory safety

Memory safety is a property of programming languages and systems that prevents software from accessing memory in unauthorized or invalid ways, thereby avoiding common bugs such as buffer overflows, use-after-free errors, and dangling pointers that can lead to crashes, , or security vulnerabilities. This guarantee ensures that memory operations remain within defined bounds and lifetimes, making programs more reliable and secure without relying on manual checks by developers. Key types of memory safety violations include spatial errors, like reading or writing beyond the boundaries of allocated memory buffers, and temporal errors, such as accessing freed memory or using uninitialized data. These issues arise primarily in low-level languages that provide , allowing programmers flexibility but also exposing them to risks if not handled meticulously. Memory safety bugs account for a significant portion of software vulnerabilities, with estimates indicating they cause approximately 70% of such issues across major platforms. For instance, historically around 70% of Microsoft's security vulnerabilities in the late stemmed from memory safety problems, though this reduced to about 50% by 2023; a 2019 study attributed 60-70% to and macOS ecosystems, while in the figure was around 70-90% in the late but has since fallen below 20% as of 2025 through adoption of memory-safe languages like . These examples highlight the pervasive impact on consumer and enterprise software, though ongoing efforts are driving reductions. Programming languages are classified as memory-safe if they enforce these protections at compile time or runtime, including managed languages like Java, Python, JavaScript, C#, Swift, and Go, which use techniques such as garbage collection and bounds checking. In contrast, languages like C and C++ are not inherently memory-safe, though mitigations like address sanitizers, fuzzing tools, and modern idioms can reduce risks in those environments. Emerging systems languages, notably Rust, achieve memory safety without garbage collection through ownership and borrowing rules verified by the compiler. Addressing memory safety has become a priority, particularly for , with the U.S. government's Office of the National Cyber Director issuing calls in 2023 to promote memory-safe languages in to curb endemic cybersecurity threats. Despite progress through tools like DARPA's AI-assisted translation of C code to and defenses such as memory reshuffling techniques, transitioning legacy codebases—billions of lines strong in sectors like —remains challenging and may span decades.

Fundamentals

Definition

Memory safety is a of programming languages and systems that guarantees a cannot invalid memory locations, thereby preventing undefined behavior arising from memory-related errors without requiring explicit checks. This guarantee ensures that all memory es occur only within allocated regions and respect the intended capabilities of pointers, such as their base addresses and bounds. In essence, memory safety supports local reasoning about correctness by isolating state changes to reachable memory, avoiding interference with unreachable or unallocated areas. The scope of memory safety primarily applies to programming languages and their runtimes, where it enforces protections against improper memory manipulation. Languages like and are considered unsafe because they permit direct memory access via raw pointers, allowing programmers to bypass bounds and potentially access invalid locations. In contrast, memory-safe languages such as , , and incorporate mechanisms like automatic bounds checking and ownership models to prevent such accesses at or . This distinction arose in the context of early systems, where in low-level languages exposed programs to frequent errors. Memory safety is distinct from related concepts like and resource safety. Type safety focuses on ensuring that operations on data adhere to their declared types, preventing misuse such as treating an as a pointer, whereas memory safety specifically targets valid memory addressing regardless of type. Resource safety, on the other hand, addresses the proper acquisition and release of resources with finite lifetimes, such as files or locks, extending beyond memory to avoid leaks or double-frees in a broader sense. A classic example of a memory safety violation is a , where a program writes data beyond the allocated bounds of an , potentially corrupting adjacent memory. For instance, in C, the code int buf[5]; buf[10] = 42; could overwrite unrelated variables or return addresses, leading to unpredictable behavior. In memory-safe languages like , array access is enforced through bounds checking; attempting lst = [1,2,3]; lst[10] raises an IndexError at runtime, preventing invalid access.

Core Principles

Memory safety encompasses mechanisms that prevent programs from accessing memory locations outside their intended bounds or after deallocation, thereby avoiding spatial and temporal errors. Core principles include bounds checking to enforce spatial safety by verifying that memory accesses, such as array indices, stay within allocated limits, either at compile time or runtime, and halting execution on violations to prevent overflows and underflows. For temporal safety, automatic memory management techniques like garbage collection—used in languages such as Java and Python—track and reclaim unused memory, preventing use-after-free errors and dangling pointers without manual deallocation. Alternatively, ownership and lifetime tracking, as in Rust, ensure resources are managed through compile-time rules to avoid invalid accesses. In concurrent environments, aliasing rules help prevent data races by restricting simultaneous mutable access to the same , ensuring modifications are serialized and maintaining consistency.

Historical Development

Origins

In the pre-1960s era of computing, was predominantly manual, requiring programmers to explicitly allocate and deallocate locations in for early machines like the IBM 704. This process involved direct manipulation of addresses, often leading to frequent errors such as buffer overflows, where data exceeded allocated bounds, and leaks, where unused was not reclaimed, resulting in gradual resource exhaustion. Early high-level languages like , introduced in 1957, offered some abstraction but still relied on static allocation of fixed-size arrays, exacerbating issues in resource-constrained environments with limited core , typically measured in kilobytes. Fragmentation—both internal (wasted space within blocks) and external (scattered free spaces preventing large allocations)—emerged as a foundational problem, as programmers devised ad-hoc overlay schemes to swap code segments between main and slower drums or tapes, complicating program execution and reliability. The marked a shift toward automated mechanisms to address these manual management pitfalls, with the introduction of garbage collection in high-level languages. John McCarthy developed the first garbage collector for in 1959, as part of its implementation on the , to automatically reclaim memory from objects no longer referenced by the program, thereby mitigating leaks and fragmentation without programmer intervention. This innovation, detailed in McCarthy's seminal work on recursive functions, represented an early recognition of memory safety as a core concern, enabling dynamic list structures in while reducing the cognitive burden of manual deallocation. By the early , garbage collection had influenced other languages, serving as a precursor to broader safety principles in memory handling. Concurrent with these language-level advances, the advent of systems in the 1960s underscored the need for memory isolation to support multitasking. The operating system, initiated in 1965 and first operational in 1969, pioneered segmented , where programs operated in protected address spaces to prevent interference between concurrent users. This design highlighted foundational isolation requirements, as manual memory sharing in multi-user environments amplified risks of inadvertent overwrites and fragmentation across processes. Multics' approach to hierarchical memory structures and protection rings laid groundwork for recognizing memory safety as essential for system reliability in shared computing.

Key Milestones

The , released on November 2, 1988, marked the first major real-world exploitation of a vulnerability, targeting the fingerd daemon on Unix systems to propagate across the early . This self-replicating infected an estimated 6,000 machines, representing approximately 10% of the roughly 60,000 hosts connected to the at the time, causing widespread slowdowns and prompting the formation of the first (CERT) to coordinate defenses. In the , the technique of stack-smashing attacks gained prominence as attackers learned to overwrite return addresses on the call stack to redirect program , building on earlier concepts to enable remote code execution. These attacks were detailed in seminal publications like the 1996 Phrack article "Smashing the Stack for Fun and Profit," which popularized the method among security researchers and adversaries. Concurrently, format string vulnerabilities emerged as a related threat, allowing attackers to read or write arbitrary memory by abusing unchecked printf-like functions; CERT issued early advisories on such issues starting in the late , highlighting their prevalence in network services like SSH and . The 2000s saw increased formal recognition of memory safety issues through standards like the (CWE), launched by in 2006 to categorize software weaknesses, including CWE-119 for improper bounds and related memory errors. A landmark incident was the 2014 vulnerability (CVE-2014-0160) in the library, a over-read that exposed up to 64 kilobytes of server memory per request, potentially leaking private keys, passwords, and session cookies from affected systems. This flaw impacted an estimated 17% of HTTPS-protected web servers worldwide, affecting millions of users and organizations, and underscored the risks of memory errors in widely used cryptographic software. In the , industry leaders quantified the scale of memory safety problems, with reporting in 2019 that approximately 70% of the security vulnerabilities it remediates via CVEs stem from memory safety issues in C and C++ code. Similarly, revealed that over 70% of severe security bugs in during this period were memory safety related, driving the browser's adoption of safer coding practices, such as integrating memory-safe languages like for new components starting around 2019 to reduce vulnerability surfaces.

Classification of Errors

Spatial Errors

Spatial errors in memory safety refer to invalid accesses to memory locations due to violations of allocated bounds, distinguishing them from temporal errors that involve accesses after deallocation or during invalid states. These errors occur when a program reads from or writes to memory addresses outside the intended spatial limits of objects like buffers or arrays, potentially corrupting adjacent data structures or control information. Spatial errors are prevalent in languages like and that lack built-in bounds checking, making them a primary source of vulnerabilities in systems software. Buffer overflows represent the most common form of spatial errors, where data is written beyond the end of an allocated , overwriting subsequent regions. This can lead to corruption if the buffer is on the , altering return addresses or local variables, or corruption if on the , disrupting allocation like chunk sizes in dynamic managers. For instance, the classic strcpy function copies a source string into a destination without verifying the destination's , allowing an oversized input to overflow and potentially execute arbitrary code if the overwritten includes executable regions. overflows are particularly exploited in attacks like , where attackers flood the with oversized allocations to increase the density of malicious payloads, facilitating control-flow hijacks when an overflow redirects execution. Buffer underflows, the counterpart to overflows, involve writing to or reading from locations before the start of an allocated , similarly corrupting preceding . These errors arise from negative calculations or misaligned pointer arithmetic, often affecting or adjacent objects, and are noted as a significant in C/C++ applications due to unchecked array accesses. Underflows can enable similar exploit primitives as overflows, such as data leakage or , but are less frequently discussed because they manifest in less predictable layouts. Integer overflows contribute to spatial errors by causing miscalculations in buffer indices or sizes, leading to unintended bounds violations. When an arithmetic operation exceeds the representable range of an type, it wraps around, potentially allocating insufficient space or computing an invalid that triggers an or underflow. For example, adding lengths in a allocation without overflow checks can result in a too-small , allowing subsequent writes to spill over. Such vulnerabilities have been documented in media processing libraries, where unchecked sums in index computations enable heap-based . Detecting spatial errors poses significant challenges because they often produce no immediate symptoms, executing silently until exploited through specific inputs that reveal corruption effects like crashes or breaches. Static struggles with pointer and dynamic allocations, while runtime detection requires overhead-intensive , limiting its use in environments. These silent failures contribute to their persistence as the top class in C/C++ codebases, with empirical studies showing they account for a substantial portion of reported issues.

Temporal Errors

Temporal errors in memory safety arise from invalid temporal access to memory, where a program attempts to use resources after their deallocation or outside their intended lifecycle, leading to and potential vulnerabilities. These errors contrast with spatial errors by focusing on timing and lifecycle mismatches rather than boundary violations. Common manifestations include use-after-free, double-free, and dangling pointers, each disrupting the proper sequencing of memory allocation and release in low-level languages like and . Use-after-free occurs when a continues to access a pointer to that has already been deallocated, often because the pointer was not updated or cleared after freeing the resource. This can result in reading or writing to invalid locations, which may have been reallocated for other purposes, leading to , crashes, or exploitation such as . For instance, in heap management systems like glibc's malloc implementation, a use-after-free might allow an attacker to manipulate freed chunks in the , overwriting critical metadata and enabling further inconsistencies. Double-free happens when the same block is deallocated twice, typically due to flawed handling or confusion over responsibilities, corrupting the memory allocator's internal data structures such as free lists or bins. This inconsistency can propagate to subsequent allocations, causing fragmentation, unexpected reallocation of the same block, or even buffer overflows that enable code execution. In practice, double-free often compounds with use-after-free if the erroneous second free leaves dangling references intact. Dangling pointers refer to pointers that continue to hold addresses of deallocated objects, creating latent risks that turn into active errors upon dereference and often serving as the root cause of use-after-free incidents. These pointers violate temporal safety by outliving their referents, potentially leading to the interpretation of attacker-controlled data as valid program structures. typically involves nullifying pointers post-deallocation, though this does not prevent all propagation paths. Temporal errors like these tend to compound over program execution, as initial corruptions in metadata or pointer states can trigger cascading s in unrelated operations, amplifying reliability issues and enabling sophisticated exploits. For example, a single use-after-free may invalidate allocator invariants, causing subsequent double-frees or invalid accesses that propagate silently until a critical occurs.

Impacts

Security Consequences

Memory unsafety introduces exploitable vulnerabilities that attackers leverage to compromise systems, often through spatial errors such as buffer overflows, which allow by overwriting adjacent memory regions with malicious payloads. This can enable , granting attackers control over the affected process or system. For instance, buffer overflows have been a primary in numerous exploits, permitting attackers to redirect program flow and inject . Temporal errors, like use-after-free, facilitate information leaks by accessing deallocated memory that may contain sensitive data, such as cryptographic keys or user credentials, without triggering immediate crashes. These leaks can expose confidential information, aiding further attacks like privilege escalation. Real-world statistics underscore the prevalence of these vulnerabilities. Microsoft reported that approximately 70% of the security vulnerabilities it fixed and assigned CVEs to stemmed from memory safety issues. Similarly, analysis by Google's Project Zero found that 67% of zero-day vulnerabilities exploited in the wild during 2021 were memory safety related, with a significant portion targeting iOS and macOS ecosystems. The Heartbleed vulnerability, a buffer over-read in the OpenSSL library, exemplified this risk by affecting roughly 17% of HTTPS servers worldwide upon its 2014 disclosure, enabling widespread data exfiltration from secure connections. Attackers frequently chain memory safety flaws with bypass techniques to amplify impact, such as defeating (ASLR) to predict memory locations for precise . The 2017 WannaCry outbreak illustrates this, exploiting a in Windows SMBv1 (known as ) to self-propagate across networks, infecting over 200,000 systems in 150 countries and evading mitigations through worm-like behavior. The economic toll of such exploits is substantial, with breaches attributed to memory unsafety costing billions globally. WannaCry alone inflicted an estimated $4 billion in financial and productivity losses, including disrupted healthcare and manufacturing operations. remediation efforts, involving certificate revocations and system updates, added tens of millions more in direct costs to businesses, highlighting the broader fiscal burden of these vulnerabilities. Recent analyses as of 2025 indicate progress, with memory safety vulnerabilities comprising less than 20% of total vulnerabilities in some major products due to increased adoption of safe languages and tools.

Reliability Effects

Memory unsafety in software systems frequently manifests as crashes, often triggered by invalid memory accesses such as dereferencing null pointers or accessing freed memory regions. These errors commonly result in segmentation faults, which abruptly terminate program execution and halt system operations. Such crashes introduce significant unpredictability during debugging, as the failure symptoms may appear distant from the root cause due to the non-deterministic nature of memory corruption propagation. In production environments, these incidents disrupt service continuity, requiring manual intervention or restarts that exacerbate operational overhead. Beyond immediate failures, memory unsafety can lead to data corruption through silent overwrites, where erroneous writes alter program state without triggering detectable errors. For instance, buffer overflows in C or C++ code may overwrite adjacent memory areas, leading to incorrect computations or inconsistent data outputs that persist undetected until they cascade into broader system malfunctions. This type of corruption undermines the integrity of calculations in safety-critical applications, potentially propagating errors through dependent modules and resulting in unreliable results over time. Performance degradation represents another key reliability impact, primarily from memory leaks that cause gradual resource exhaustion. Unreleased memory allocations accumulate, increasing heap usage until available memory is depleted, which forces excessive paging or and slows system responsiveness. Additionally, repeated allocations and deallocations without proper can induce memory fragmentation, where free memory becomes scattered into non-contiguous blocks, complicating future allocations and further reducing allocation efficiency. Real-world examples illustrate these effects in high-stakes domains. In web applications, undetected memory leaks in server-side code have led to halts and unplanned downtime; production leaks in cloud-based services can escalate to full unavailability after prolonged operation.

Approaches

Language Mechanisms

Programming languages incorporate various built-in mechanisms to enforce memory safety, preventing common errors such as buffer overflows, dangling pointers, and use-after-free vulnerabilities at or . These features range from automatic to static checks on resource lifetimes and access bounds, allowing developers to write safer code without manual intervention in allocation and deallocation. Garbage collection (GC) is a prominent runtime mechanism for automatic , reclaiming memory occupied by unreachable objects to eliminate manual deallocation and associated errors like double frees or leaks. In , the (JVM) implements generational GC, which divides the heap into young and old generations to efficiently collect short-lived objects while minimizing pauses for long-lived ones. employs a combination of for immediate deallocation and a cyclic GC to detect and resolve reference cycles that reference counting alone cannot handle, ensuring comprehensive memory reclamation without explicit programmer intervention. This approach in both languages inherently prevents use-after-free and issues by automating lifetime management. Bounds checking on arrays and similar data structures is another compile-time or runtime safeguard, verifying that index accesses remain within declared limits to avert spatial memory errors like buffer overruns. The Ada programming language mandates bounds-checked array indexing as part of its type system, raising a Constraint_Error exception if an index exceeds the array's bounds, thereby enforcing safe access without runtime overhead in optimized code paths. This feature, integral to Ada's design for high-reliability systems, catches invalid accesses early and prevents undefined behavior, contrasting with unchecked languages like C. Ownership and borrowing rules provide compile-time guarantees against temporal memory errors by tracking resource lifetimes and access permissions. In Rust, the ownership model assigns each value a single owner responsible for its deallocation, while borrowing allows temporary references under strict rules enforced by the borrow checker—a static analyzer that rejects code permitting multiple mutable references or use after a borrow's scope ends. This prevents data races, dangling pointers, and invalid mutations at compile time, enabling safe concurrency without a garbage collector. Region-based memory management offers an alternative to traditional by statically defining memory regions with explicit lifetimes, allowing bulk deallocation and finer control. The language, a safe dialect of , uses regions to group allocations, where pointers are typed to specific regions and checked at to ensure they do not outlive their region's scope, thus avoiding leaks and invalid accesses without runtime overhead. 's region inference and tagged unions further support safe low-level programming by restricting pointer arithmetic to region bounds. While these mechanisms enhance safety, they introduce trade-offs in and . Garbage collection, for instance, incurs runtime pauses during collection cycles, where the mutator threads halt to allow marking and sweeping, potentially disrupting applications; generational collectors mitigate this by tuning pause frequency against throughput, but overhead can reach 10-20% in allocation-intensive workloads. Compile-time checks like Rust's borrow checker or Ada's bounds verification may require code restructuring, increasing development time, though they eliminate entire classes of runtime errors. Region-based systems balance this by reducing deallocation costs through scoped bulk freeing, but demand precise region annotations to avoid errors.

Tools and Protections

Sanitizers are runtime tools integrated into compilers like and to detect memory errors in and C++ programs. AddressSanitizer (), developed by , instruments code to identify spatial errors such as buffer overflows on the , , and globals, as well as temporal errors like use-after-free accesses, by maintaining a shadow memory map that tracks valid memory regions. It operates with minimal false positives and has been widely adopted in for and testing. Valgrind is a dynamic framework that provides detailed detection of leaks, invalid accesses, and uninitialized value usage through its Memcheck , which uses bit-level tracking of states during program execution. Memcheck simulates the program's execution on a synthetic CPU, intercepting operations to verify their validity, making it effective for uncovering subtle errors in legacy codebases. Hardware-based protections enhance memory safety at the system level. The (MMU) enforces page-level protections by translating virtual addresses to physical ones and restricting access based on permissions like read-only or no-execute, preventing unauthorized modifications or executions that could exploit memory errors. (ASLR) complements this by randomly positioning key memory regions such as the , , and libraries at load time, increasing the difficulty of predicting addresses for exploitation attempts like buffer overflows. Static analyzers scan source code without execution to identify potential memory errors. Coverity, a commercial tool, uses dataflow analysis to detect issues like memory leaks and buffer overruns by modeling code paths and variable lifetimes, and it has been applied to large-scale projects to uncover defects in billions of lines of code. These tools can be used alongside language mechanisms for comprehensive protection in unsafe languages, though they introduce trade-offs. For instance, AddressSanitizer typically incurs about a 2x runtime slowdown and increased memory usage due to instrumentation and shadow mapping. Valgrind's overhead is higher, typically 10–50 times slower, owing to its full simulation approach. Static tools like Coverity add no runtime cost but may produce false positives requiring manual review.

Recent Advances

Policy Initiatives

In December 2024, the White House Office of the National Cyber Director (ONCD) reiterated its call for federal agencies to prioritize memory-safe languages like in to mitigate vulnerabilities in government systems. This builds on the ONCD's February 2024 technical report, which recommended migrating legacy codebases from unsafe languages such as and to memory-safe alternatives, emphasizing 's borrow checker to prevent common errors like buffer overflows and use-after-free bugs. In June 2025, the Cybersecurity and Infrastructure Security Agency (CISA) and the National Security Agency (NSA) jointly released a Cybersecurity Information Sheet providing a roadmap for adopting memory-safe languages (MSLs) in critical infrastructure sectors. The guide outlines strategies for organizations to transition new development and high-risk components to MSLs like Rust, Go, Java, Python, and Swift, aiming to reduce memory-related vulnerabilities through built-in safeguards and developer training. It highlights the need for published adoption roadmaps to enhance security in areas such as network services and embedded systems, without specifying a fixed elimination timeline but stressing long-term risk reduction. These policies are driven by stark statistics on memory safety risks; for instance, memory safety issues accounted for 76% of vulnerabilities in 2019 but fell to 24% by 2024 following Google's adoption of MSLs like for new code, demonstrating the effectiveness of such transitions. Additionally, memory safety known exploited vulnerabilities (KEVs) continued to rise across industries from operating systems to industrial control systems in 2024, underscoring the urgency for broader adoption. In the industry sector, pledged in November 2023 under its Secure Future Initiative to transition to memory-safe languages for new products and existing codebases, with a 2025 update confirming ongoing investments in for platforms like and firmware. In November 2025, released a progress report detailing further advancements, including -based firmware and drivers for devices. This commitment aligns with federal guidance, aiming to eliminate risks through phased adoption.

Emerging Frameworks

The OpenSSF's Memory Safety Continuum, released in April 2025, provides an iterative for organizations to assess and enhance memory safety in software projects, progressing from basic vulnerability detection to complete migration to memory-safe languages (MSLs). This framework categorizes safety levels on a spectrum, with the highest tier involving code written entirely in MSLs like or Go, and lower tiers incorporating runtime protections or partial rewrites, enabling gradual adoption in legacy systems without full overhauls. It emphasizes practical steps, such as integrating safe dependencies and using automated tools for detection, to address gaps in C/C++-dominated ecosystems. Google's Carbon language, introduced as a C++ successor in 2022 and advanced through 2024 and 2025 roadmaps, incorporates memory safety guarantees via and compile-time checks to prevent spatial and temporal errors. Carbon's design supports incremental adoption, allowing developers to migrate C++ code gradually while maintaining , with features like automated refactoring tools to enforce bounds checking without runtime overhead in safe modes. By 2025, prototypes demonstrated near-zero safety violations in benchmarked applications, positioning it as a bridge for high-performance systems resistant to full MSL transitions. The ecosystem has seen significant expansions in 2025, particularly in tools for safe (FFI) interactions, highlighted at RustConf 2025 where sessions focused on ergonomic C/C++ bindings to mitigate safety risks in mixed-language environments. These include abstractions like safe wrappers over unsafe FFI calls, reducing exposure to buffer overflows and use-after-free errors during interop. Complementing this, the Prossimo project by the (ISRG) advances safe C replacements through Rust-based drop-in libraries, such as reimplementations of critical components like , ensuring ABI compatibility while eliminating memory vulnerabilities. Hybrid approaches, such as BoundWarden, originally proposed for compile-time spatial safety enforcement via thread-local bounds tracking, offer protections against out-of-bounds accesses code. Such methods enable retrofitting safety into existing systems, particularly in embedded or kernel contexts where full rewrites are infeasible. Despite these advances, interoperability with unsafe code remains a key challenge, as FFI boundaries and legacy integrations can introduce vulnerabilities that bypass language-level protections, necessitating ongoing verification efforts. Policy initiatives, such as those from CISA and OpenSSF, have facilitated funding and standards that accelerate these technical developments.

References

  1. [1]
    What is memory safety and why does it matter? - Prossimo
    Memory safety is a property of some programming languages that prevents programmers from introducing certain types of bugs related to how memory is used.
  2. [2]
    Memory Safety: An Explainer
    Sep 26, 2023 · Memory safety issues remain endemic in cybersecurity and are often seen as a never-ending source of cyber vulnerabilities.
  3. [3]
    Memory safety is at a tipping point | MIT News
    Jun 18, 2025 · Memory in computer systems all around us is inherently unsecure, posing risks to military platforms and consumer products.
  4. [4]
    [1705.07354] The Meaning of Memory Safety - arXiv
    May 20, 2017 · We give a rigorous characterization of what it means for a programming language to be memory safe, capturing the intuition that memory safety supports local ...
  5. [5]
    What is memory safety? - The PL Enthusiast
    Jul 21, 2014 · A program execution is memory safe so long as a particular list of bad things, called memory access errors, never occur.
  6. [6]
    Type Systems for Memory Safety - Fernando Borretti
    Jul 22, 2023 · It is possible to design programming languages and type systems that provide memory safety at compile time, combining the safety of high-level languages with ...
  7. [7]
    Fearless Security: Memory Safety - the Web developer blog
    Jan 23, 2019 · Informally, this means that in all possible executions of a program, there is no access to invalid memory. Violations include: use after ...
  8. [8]
    We need a safer systems programming language - Microsoft
    Jul 18, 2019 · Spatial memory safety refers to ensuring that all memory accesses are within bounds of the type that is being accessed. Doing this requires code ...Missing: principle | Show results with:principle
  9. [9]
    [PDF] Safe Systems Programming in Rust: The Promise and the Challenge
    lead to a memory access bug in line 4. Ownership and Borrowing. The core mechanism through which Rust prevents uncon- trolled aliasing is ownership. Memory ...
  10. [10]
    A Lightweight Formalism for Reference Lifetimes and Borrowing in ...
    Rust aspires to replace C/C++ by bringing safe, zero-cost memory management to systems programming through reference lifetimes and borrow- ing. The former is ...
  11. [11]
    [PDF] BEFORE MEMORY WAS VIRTUAL - the denning institute
    Nov 1, 1996 · The designers of the first operating systems in the 1950s dreamt of relieving the programming burden by automating all this storage management.Missing: pre- | Show results with:pre-
  12. [12]
    [PDF] INTRODUCTION AND OVERVIEW OF THE MULTICS SYSTEM
    Multics is a comprehensive, general-purpose programming system designed to meet the needs of a large computer utility, with a virtual memory system and ...
  13. [13]
    [PDF] The Internet Worm Program: An Analysis - Purdue University
    Nov 3, 1988 · On the evening of 2 November 1988, someone infected the Internet with a worm program. That program exploited flaws in utility programs in ...Missing: rate | Show results with:rate
  14. [14]
    [PDF] Software Security: Buffer Overflow Attacks and Beyond - Washington
    buffer overflows. ◇ Morris worm (1988): overflow in fingerd. • 6,000 machines infected. ◇ CodeRed (2001): overflow in MS-IIS server. • 300,000 machines ...Missing: rate | Show results with:rate<|separator|>
  15. [15]
    [PDF] Exploiting Format String Vulnerabilities - CS155
    Sep 1, 2001 · This article explains the nature of a phenomenon that has shocked the secu- rity community in the second half of the year 2000.Missing: CERT | Show results with:CERT
  16. [16]
    Heartbleed Bug
    The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. This weakness allows stealing the information protected, ...
  17. [17]
    The Heartbleed bug: How a flaw in OpenSSL caused a security crisis
    Sep 6, 2022 · Heartbleed is a vulnerability in OpenSSL that came to light in April of 2014; it can be traced to a single line of code.<|separator|>
  18. [18]
    An update on Memory Safety in Chrome - Google Online Security Blog
    Sep 21, 2021 · We showed that more than 70% of our severe security bugs are memory safety problems. That is, mistakes with pointers in the C or C++ languages which cause ...Missing: adoption 2010s
  19. [19]
    SoftBound: highly compatible and complete spatial memory safety for c
    SoftBound+CETS Revisited: More Than a Decade Later​​ Memory safety issues, including buffer overflows and use-after-free errors, continue to pose significant ...
  20. [20]
    Buffer Overflow - OWASP Foundation
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold or when a program attempts to put data in a memory area ...
  21. [21]
    A Look at the Buffer-Overflow Hack - ACM Digital Library
    The strcpy function is the classical example for buffer overflow since it does not check the copied string size to ensure it is within the buffer limits.
  22. [22]
    Testing for Heap Overflow - WSTG - v4.1 | OWASP Foundation
    When a heap-based buffer is overflowed the control information in these tags is overwritten. When the heap management routine frees the buffer, a memory address ...Missing: spray | Show results with:spray
  23. [23]
    Heap bounds protection with low fat pointers - ACM Digital Library
    Heap buffer overflow (underflow) errors are a common source of security vulnerabilities. One prevention mechanism is to add object bounds meta information ...
  24. [24]
    Efficient Greybox Fuzzing to Detect Memory Errors
    One important class of bug is memory errors, which include spatial memory errors such as object-bounds errors (including buffer overflows/underflows), and ...
  25. [25]
    Efficient Dynamic Tracking Technique for Detecting Integer-Overflow ...
    Integer-Overflow-to-Buffer-Overflow (IO2BO) vulnerabilities can be exploited by attackers to cause severe damages to computer systems.
  26. [26]
    CVE-2021-21843 Detail - NVD
    Aug 18, 2021 · A specially crafted MPEG-4 input can cause an integer overflow due to unchecked arithmetic resulting in a heap-based buffer overflow that causes ...Missing: safety | Show results with:safety
  27. [27]
    Practical and effective symbolic analysis for buffer overflow detection
    Although buffer overflow detection has been studied for more than 20 years, it is still the most common source of security vulnerabilities in systems code.
  28. [28]
    Efficient Buffer Overflow Detection In Virtualized Clouds Using Intel ...
    Dec 12, 2023 · Write buffer overflow is a widespread and prevalent memory safety violation in C/C++, reported as the top vulnerability in 2022 and 2023.
  29. [29]
  30. [30]
    Heap exploitation, glibc internals and nifty tricks. - Quarkslab's blog
    Jul 30, 2024 · Use After Free. This primitive happens when the developer of a program keeps a reference to a chunk that has been freed. If the attacker can ...
  31. [31]
    CWE-476: NULL Pointer Dereference (4.18) - The MITRE Corporation
    NULL pointer dereferences usually result in the failure of the process unless exception handling (on some platforms) is available and implemented.Missing: temporal | Show results with:temporal
  32. [32]
    CWE-415: Double Free (4.18) - MITRE Corporation
    When a program calls free() twice with the same argument, the program's memory management data structures may become corrupted, potentially leading to the ...
  33. [33]
    Using freed memory - OWASP Foundation
    Use after free errors occur when a program continues to use a pointer after it has been freed. Like double free errors and memory leaks, use after free errors ...Missing: safety | Show results with:safety
  34. [34]
    [PDF] Ensuring the Spatial and Temporal Memory Safety of C at Runtime
    A program is memory safe if it does not commit any spatial or temporal errors. Safe languages, such as Java, ensure memory safety with a combination of syntax ...
  35. [35]
    What is a Buffer Overflow | Attack Types and Prevention Methods
    Attackers exploit buffer overflow issues to change execution paths, triggering responses that can damage the applications and exposes private information.Missing: after- | Show results with:after-
  36. [36]
    The case for memory safe roadmaps | Cyber.gov.au
    Dec 7, 2023 · About 70 percent of Microsoft common vulnerabilities and exposures (CVEs) are memory safety vulnerabilities (based on 2006-2018 CVEs).Missing: percentage | Show results with:percentage
  37. [37]
    Half a million widely trusted websites vulnerable to Heartbleed bug
    Apr 7, 2014 · A serious overrun vulnerability in the OpenSSL cryptographic library affects around 17% of SSL web servers which use certificates issued by trusted certificate ...
  38. [38]
    What was the WannaCry ransomware attack? - Cloudflare
    After reading this article you will be able to: Explain how WannaCry ransomware spread to more than 200,000 computers in a single day; Describe how a security ...Missing: memory | Show results with:memory
  39. [39]
    "WannaCry" ransomware attack losses could reach $4 billion
    May 16, 2017 · Global financial and economic losses from the "WannaCry" attack that crippled computers in at least 150 countries could swell into the billions of dollars.
  40. [40]
    Heartbleed bug 'will cost millions' - The Guardian
    Apr 18, 2014 · Revoking all the SSL certificates leaked by the Heartbleed bug will cost millions of dollars, according to Cloudflare, which provides services to website hosts.Missing: economic | Show results with:economic
  41. [41]
    Security Implications of the Morello Platform: An Empirical Threat ...
    Aug 23, 2025 · ... memory can lead to program instability or crashes ... segmentation fault caused by a null pointer dereference) results in a program crash.
  42. [42]
    GWP-ASan: Sampling-Based Detection of Memory-Safety Bugs in ...
    Yet they remain the single major source of security vulnerabilities, and continue to negatively impact reliability and developer productivity [9, 10]. In the ...
  43. [43]
    [PDF] Hardware-Software Co-design for Practical Memory Safety
    Both industry and academia have proposed various techniques to address the C/C++ memory safety problem over the last three decades, either by software-only or ...
  44. [44]
    [PDF] Software Memory Safety
    Nov 10, 2022 · Memory safety is a broad category of issues related to how a program manages memory. One common issue is called a “buffer overflow” where data ...Missing: invalid | Show results with:invalid
  45. [45]
    [PDF] Effective Detection of Memory Leaks on Early-Exit Paths in OS Kernels
    Jul 14, 2021 · Memory leaks can lead to critical performance and security issues ... Memory usage gradually increases and brings server to halt, 2016.Missing: downtime | Show results with:downtime
  46. [46]
    [PDF] Efficiently and Precisely Locating Memory Leaks and Bloat
    Inefficient use of memory reduces both performance and avail- ability ... causing unacceptable performance degradation. While garbage-collected ...
  47. [47]
    Exclusive: Air traffic system failure caused by computer ... - Reuters
    May 12, 2014 · The ERAM system failed because it limits how much data each plane can send it, according to the sources. Most planes have simple flight plans, ...
  48. [48]
    [PDF] Resin: A Holistic Service for Dealing with Memory Leaks ... - USENIX
    Jul 13, 2022 · OS reboot will resolve any software memory leak but takes a much longer time and can cause VM downtime. Thus, it is the last resort when a leak ...
  49. [49]
    Region-based memory management in cyclone - ACM Digital Library
    In this paper, we focus on the region-based memory management of Cyclone and its static typing discipline. The design incorporates several advancements, ...
  50. [50]
    Safe and efficient hybrid memory management for Java
    Java uses automatic memory management, usually implemented as a garbage-collected heap. That lifts the burden of manually allocating and deallocating memory ...
  51. [51]
    gc — Garbage Collector interface — Python 3.14.0 documentation
    This module provides an interface to the optional garbage collector. It provides the ability to disable the collector, tune the collection frequency, and set ...Missing: safety Java<|separator|>
  52. [52]
    Python and Java: The Best of Both Worlds
    The Java VM takes care of memory management using a true garbage collection scheme. This means that there is no need to deal with reference counting at run ...
  53. [53]
    [PDF] Ada and the Software Vulnerabilities Project - SIGAda
    Ada.3.XYZ.2 Description of vulnerability. All array indexing is checked automatically in Ada, and raises an exception when indexes are out of bounds. This is ...
  54. [54]
    Hypertext Ada 95 Rationale - Part Three - Chapter H
    As observed above, the Ada 95 rule treating this as a bounded error rather than an erroneous execution will inhibit certain compiler optimizations that would ...
  55. [55]
    What is Ownership? - The Rust Programming Language
    Ownership is a set of rules that govern how a Rust program manages memory. All programs have to manage the way they use a computer's memory while running.
  56. [56]
    Understanding Ownership - The Rust Programming Language
    In this chapter, we'll talk about ownership as well as several related features: borrowing, slices, and how Rust lays data out in memory.
  57. [57]
    Experience with safe manual memory-management in cyclone
    This paper reports on our experience trying to integrate and effectively use two previously proposed, type-safe memory management mechanisms.
  58. [58]
    Better Understanding the Costs and Benefits of Automatic Memory ...
    Automatic memory management (garbage collection) provides an abstraction over memory that delivers memory safety, reducing opportunities for memory leaks and ...
  59. [59]
    [PDF] AddressSanitizer: A Fast Address Sanity Checker - Google Research
    In this paper we presented AddressSanitizer, a fast mem- ory error detector. AddressSanitizer finds out-of-bounds. (for heap, stack, and globals) accesses ...
  60. [60]
    Using Valgrind to Detect Undefined Value Errors with Bit-Precision
    This paper focuses on one kind of error that Memcheck detects: undefined value errors. Such errors are common, and often cause bugs that are hard to find in ...
  61. [61]
    Research Papers - Valgrind
    This paper describes in detail how Memcheck's undefined value error detection (a.k.a. V bits) works. Please cite it if you are talking about memory checking ...
  62. [62]
    [PDF] Memory Management Unit
    What is the 603e MMU? Definition The 603e MMU assigns protection attributes to pages in memory and also implements address translation. 603e MMU. Instruction ...<|separator|>
  63. [63]
    On the effectiveness of address-space randomization
    Address-space randomization is a technique used to fortify systems against buffer overflow attacks. The idea is to introduce artificial diversity by ...<|separator|>
  64. [64]
    A few billion lines of code later: using static analysis to find bugs in ...
    Abstract: How Coverity built a bug-finding tool, and a business, around the unlimited supply of bugs in software systems.<|control11|><|separator|>
  65. [65]
    In Rust we trust? White House Office urges memory safety
    Dec 30, 2024 · White House Office urges memory safety ... The ONCD report advises programmers to migrate to memory-safe languages, but only mentions Rust.
  66. [66]
    [PDF] BACK TO THE BUILDING BLOCKS: - Biden White House
    First, in order to reduce memory safety vulnerabilities at scale, creators of software and hardware can better secure the building blocks of cyberspace. This ...Missing: iOS | Show results with:iOS<|control11|><|separator|>
  67. [67]
    Memory Safe Languages: Reducing Vulnerabilities in Modern ...
    Jun 24, 2025 · The document provides recommendations for critical infrastructure organizations for better memory safety.
  68. [68]
    [PDF] Memory Safe Languages: Reducing Vulnerabilities in Modern ...
    Jun 23, 2025 · Examples are: • Bounds checking: prevents buffer overflows by keeping memory accesses within allocated boundaries. Some languages enforce ...
  69. [69]
    NSA and CISA Release CSI Highlighting Importance of Memory ...
    Jun 24, 2025 · A joint Cybersecurity Information Sheet (CSI) to highlight the importance of adopting memory safe languages (MSLs) in improving software security.
  70. [70]
  71. [71]
    Memory Safety KEVs Are Increasing Across Industries
    May 23, 2025 · Memory safety KEVs reached a high in 2024 of around 200 total, affecting industries from network edge devices to ICS/OT and open source ...
  72. [72]
    Microsoft's Secure by Design journey: One year of success
    Apr 17, 2025 · Microsoft is also committed to adopting memory-safe languages, such as Rust, for developing new products and transitioning existing ones. This ...
  73. [73]
  74. [74]
    Announcing the Release of “The Memory Safety Continuum”
    Apr 28, 2025 · Whether transitioning to memory-safe languages or implementing mitigations for legacy systems, this document will equip you with the tools and ...Missing: pledge 2023
  75. [75]
    The Memory Safety Continuum - Open Source Security Foundation
    This continuum, ordered from “most safe” to “least safe”, is intended to help you define and understand the memory safety of your software and what you can do ...Missing: April 2025
  76. [76]
    Carbon Language's main repository: documents, design ... - GitHub
    Memory safety · Highly automated, minimal supervision migration from C++ to a dialect of Carbon designed for C++ interop and migration. · Incremental refactoring ...
  77. [77]
    Safer with Google: Advancing Memory Safety
    Oct 15, 2024 · We have allocated a portion of our computing resources specifically to bounds-checking the C++ standard library across our workloads. While ...<|control11|><|separator|>
  78. [78]
    Comparing Rust to Carbon - LWN.net
    a path to incremental migration toward a memory-safe language, prioritizing the ...
  79. [79]
    Memory Safety - RustConf 2025
    In this talk, we discuss why merely focusing on memory safety for FFIs is insufficient and present an approach and framework for interacting with foreign ...Missing: tools | Show results with:tools
  80. [80]
    Prossimo
    ISRG's Prossimo is committed to moving the Internet's security-sensitive software to memory safe code and to encouraging people to prioritize memory safety.About Prossimo · Initiatives · Blog · About
  81. [81]
    Compatibility with C is Key for Memory Safe Software - Prossimo
    Jun 5, 2025 · It comes with a C API promising drop-in compatibility with dav1d's C API so it's easy to integrate into existing C programs.
  82. [82]
    Explore Capabilities and Effectiveness of Reverse Engineering ...
    Dec 17, 2021 · Our work explores the limitations and challenges for static binary analysis tools to develop accurate binary-level techniques to detect memory errors.
  83. [83]
    Leon Schuermann: "Memory Safety is Merely Table Stakes [...]"
    Oct 3, 2025 · ... FFI exposes Rust to a range of potential safety issues ... Chandler Carruth: Memory Safety Everywhere with Both Rust and Carbon | RustConf 2025.Missing: tools | Show results with:tools
  84. [84]
    New Guidance Released for Reducing Memory-Related ... - CISA
    Jun 24, 2025 · Memory safety vulnerabilities pose serious risks to national security and critical infrastructure. Adopting memory safe languages (MSLs) ...