Fact-checked by Grok 2 weeks ago

Buffer overflow

A buffer overflow, also known as a buffer overrun, is a software vulnerability that arises when a program attempts to store more data in a buffer—a temporary data storage area—than its allocated capacity allows, causing the excess data to overwrite adjacent memory locations. This condition typically stems from inadequate bounds checking on input data, particularly in low-level languages like C and C++ that provide direct memory access without built-in safeguards. Buffer overflows are classified into two primary types: stack-based and heap-based. Stack-based overflows occur in the call stack during function execution, often by overwriting return addresses or local variables, which can redirect program to malicious . Heap-based overflows, in contrast, affect dynamically allocated memory on the , potentially corrupting data structures and enabling indirect control over program execution, though they are generally more complex to exploit. The risks associated with buffer overflows are severe, as they can result in denial-of-service attacks through system crashes, , or the execution of arbitrary malicious code, allowing attackers to gain unauthorized privileges or escalate access. Historically, buffer overflows were first documented as a potential in a 1972 U.S. study on , which described scenarios where improper address checking could overlay system code and enable unauthorized control. Their practical exploitation gained widespread attention in 1996 through Aleph One's seminal article "Smashing the Stack for Fun and Profit," which detailed techniques for stack-based attacks on systems. To mitigate buffer overflows, developers should prioritize memory-safe programming languages such as , , or , which enforce bounds checking automatically and eliminate entire classes of memory corruption vulnerabilities. In legacy codebases, implementing compiler protections like stack canaries, address space layout randomization (ASLR), and data execution prevention (DEP) provides runtime defenses against exploitation. Additionally, rigorous practices including input validation, static code analysis, fuzz testing, and phased migration to secure languages are essential for prevention.

Fundamentals

Definition and Causes

A buffer overflow is a software that arises when a attempts to write more to a fixed-size than the buffer can accommodate, resulting in the overwriting of adjacent memory locations. This condition often stems from a failure to perform proper bounds checking on input , allowing excess information to spill over into unintended areas of memory. Buffers serve as temporary storage for such as strings or arrays, and their fixed capacity is defined at allocation time, making them susceptible to corruption when inputs exceed this limit. The primary causes of buffer overflows are rooted in programmer errors, particularly in languages like C and C++ that provide low-level memory management without built-in safeguards. Common triggers include the use of unsafe functions such as strcpy() or gets(), which copy input data into a buffer without verifying its length against the buffer's capacity. Additionally, developers may make incorrect assumptions about the size or format of inputs in dynamic environments, such as network communications or user-supplied data, leading to inadequate validation and subsequent overflows. These issues are exacerbated by the absence of automatic bounds enforcement in the programming language, placing the onus entirely on the coder to implement checks. In terms of memory layout, buffers are typically implemented as fixed-size arrays allocated in regions such as the or , where an overflow can corrupt neighboring data structures, including variables or control information like addresses. This adjacent corruption disrupts the program's intended behavior by altering values that were not meant to be modified. The consequences of buffer overflows include , which can lead to unpredictable program behavior or crashes, as well as potential breaches by enabling unauthorized to sensitive or over program execution. Such vulnerabilities have been a longstanding concern in , highlighting the need for rigorous input handling to prevent these foundational errors.

Types of Buffer Overflows

Buffer overflows are broadly categorized by the memory regions they affect, with distinctions arising from the allocation mechanisms and potential impacts on execution. The primary types include stack-based, heap-based, and global overflows, each targeting different segments of a memory layout. Additional variants occur in specialized contexts, such as , or through related input handling errors like format string vulnerabilities, which can produce overflow-like effects by mishandling data interpretation. Stack-based buffer overflows occur in the call , where local variables and parameters are stored, often leading to the corruption of adjacent such as return addresses that control program flow. These overflows typically result from writing excess to fixed-size arrays or buffers within frames, potentially altering execution paths by overwriting critical metadata. Stack-based overflows are prevalent in exploits due to the predictable, linear structure of the , making them easier to target compared to other types. Heap-based buffer overflows target dynamically allocated in the , where data persists beyond calls and is managed by allocators like those in or Windows heaps. These overflows corrupt adjacent heap structures, such as metadata pointers or free lists used for , which can lead to arbitrary access or program instability depending on the allocator's . Unlike stack overflows, heap-based ones are less predictable and vary significantly across systems, but they ranked as the second most exploited vulnerability in the 2023 CWE Top 10 Known Exploited Vulnerabilities. Global buffer overflows affect statically allocated buffers in the segments, including initialized () or uninitialized (.bss) areas for and static variables. Excess data written to these buffers can overwrite neighboring variables or constants, disrupting state in ways that persist across calls. These are less common in exploits than or variants but remain a in languages like C/C++ due to lax array bounds handling in static memory. Kernel-space buffer overflows represent a high-privilege variant occurring in operating system , particularly in device drivers handling input from user space. These can involve , , or overflows within kernel memory, often triggered by insufficient bounds checking on I/O buffers, leading to system-wide crashes or . For instance, Windows kernel drivers are susceptible to overflows from invalid or oversized buffers passed via interfaces, while drivers like those for Ceph file systems have faced remote code execution risks from similar issues. Such overflows are especially dangerous as they bypass user-mode protections, with remotely exploitable cases documented in modern OSes like and Windows. Format string overflows serve as a related variant, where unvalidated user input is treated as a format specifier in functions like , effectively allowing arbitrary memory reads or writes that mimic buffer overflow effects without direct buffer overrun. This leads to similar outcomes, such as data leakage or code execution, but stems from improper string formatting rather than size mismatches. Overall, stack-based overflows dominate historical and ongoing exploits due to their simplicity and reliability, while heap-based variants have gained prominence with evolving , and kernel types pose elevated risks in driver code. Global and format string issues, though less frequent, underscore the need for comprehensive input validation across memory types.

Technical Mechanisms

Stack-Based Overflows

In computer systems, the call stack is a region of memory that manages function invocations through a last-in, first-out (LIFO) structure, where each function call allocates a containing local variables, parameters, the return address, and saved registers such as the frame pointer. Stack frames are contiguous blocks pushed onto the during a function call and popped upon return, with the stack pointer tracking the top and the frame pointer referencing the base of the current for accessing locals and parameters. Local buffers, often implemented as fixed-size arrays, reside within these frames alongside other elements like the saved base pointer (e.g., EBP in x86 architecture) and the return address, which points to the instruction following the call site. A stack-based buffer overflow occurs when a program writes more to a local buffer than its allocated size, causing the excess to overwrite adjacent within the same stack frame or subsequent frames. This corruption typically propagates linearly due to the 's contiguous and predictable layout, potentially altering the saved frame pointer, which disrupts the 's integrity, or overwriting the return address, which can redirect control flow upon function return. The overflow's effects depend on the amount of excess : partial overwrites may corrupt local variables or parameters, while full overflows can reach control like the return address, leading to such as crashes. The conceptual layout of a typical illustrates this vulnerability. In a downward-growing (common in x86 systems), higher addresses precede lower ones, with the structured as follows from higher to lower addresses:
Higher addresses (towards stack bottom)
+-------------------+
|   Parameters      |
+-------------------+
| Return Address    |  <-- Overwritten in full overflow
+-------------------+
| Saved EBP (Frame Pointer) |  <-- Corrupted in partial overflow
+-------------------+
|   Local Variables |
+-------------------+
|     Buffer        |  <-- Overflow starts here
+-------------------+
Lower addresses (towards stack top)
Overflow propagation begins at the buffer's end, filling local variables first, then the saved frame pointer, and finally the return address if sufficient data is written. This linear adjacency makes stack-based overflows distinct from other buffer types, as the fixed frame layout ensures predictable corruption paths without fragmentation. Common scenarios arise in functions using fixed-size arrays for local buffers, where input exceeds the array bounds due to unchecked data lengths. For instance, reading user input into a character array via unsafe I/O functions without bounds validation—such as those that copy strings without length limits—can trigger partial overwrites of adjacent locals or full propagation to control data. These vulnerabilities are prevalent in languages like C, where manual memory management lacks inherent safeguards, often in functions processing network packets, file inputs, or command-line arguments.

Heap-Based Overflows

Heap memory is managed through dynamic allocation mechanisms, such as the malloc function in C or new in C++, which request variable-sized blocks from the operating system's heap region during program execution. In implementations like glibc's ptmalloc, the heap consists of one or more contiguous memory regions subdivided into chunks, where each chunk encompasses both user data (the payload allocated to the program) and metadata for management. The metadata typically includes a size field in the header, which records the chunk's total size in multiples of 8 bytes and incorporates flags indicating properties like whether the previous chunk is in use (P bit), if the chunk is mmap'd (M bit), or arena-specific details (A bits). Free chunks further contain forward (fd) and backward (bk) pointers for linking in free lists, along with a prev_size field if the preceding chunk is free, and a footer copying the size for boundary checks. These structures enable efficient allocation and deallocation but rely on precise boundaries to maintain integrity. A heap-based overflow occurs when more data is written to a buffer than its allocated size permits, causing the excess to overwrite adjacent heap metadata rather than fixed control structures. This corruption often targets in-band management information, such as size fields or linking pointers (fd/bk), which disrupts the allocator's ability to track chunk boundaries and free lists accurately. For instance, altering a size field can misrepresent a chunk's extent, leading to improper merging of adjacent free chunks (coalescing errors), while overwriting pointers may insert invalid links into the free lists, resulting in malformed heap topology. Such overflows can also trigger use-after-free conditions by falsifying metadata to revive deallocated chunks or provoke double-free vulnerabilities by duplicating entries in free structures, as the allocator assumes metadata integrity during operations like free. Allocator implementations vary significantly, influencing the patterns of corruption from overflows; for example, glibc's ptmalloc, derived from Doug Lea's dlmalloc, organizes free chunks into multiple bins for performance, including fastbins (singly-linked lists for small, recently freed chunks up to 80 or 160 bytes), unsorted bins (temporary holders before sorting), small bins (doubly-linked for same-sized chunks up to 512 bytes), and large bins (sorted doubly-linked for bigger sizes). These bins, managed within arenas—thread-safe structures that can handle multiple heaps via mutexes—use 4-byte fields for sizes and pointers in 32-bit systems, making them susceptible to specific overwrite patterns like boundary tag manipulation. In contrast, other allocators may employ different tagging or linking schemes, leading to unique corruption vectors, such as altered coalescing in non-bin-based systems. Arenas in ptmalloc limit the number to about 8 times the CPU count, with the main arena using sbrk for growth and others mmap for independence, which can isolate or propagate corruption depending on thread interactions. The effects of heap overflows are predominantly data-oriented, corrupting the allocator's state to enable unintended memory behaviors rather than direct control hijacking. By forging metadata like size fields or pointers, an overflow can trick the allocator into performing arbitrary allocations, such as splitting oversized chunks or linking fake free entries, which alters data flow and enables further inconsistencies in heap management. This often manifests as program crashes from invalid frees or allocations but can sustain execution with corrupted data structures, facilitating persistent integrity violations across multiple operations.

Example Demonstrations

A classic demonstration of a stack-based buffer overflow involves a C program using the strcpy function without bounds checking. Consider the following vulnerable code:
c
#include <stdio.h>
#include <string.h>

void vulnerable_function(char *input) {
    char buffer[10];
    strcpy(buffer, input);  // No bounds check, allowing overflow
    [printf](/page/Printf)("Buffer contents: %s\n", buffer);
}

int main(int argc, char **argv) {
    if (argc > 1) {
        vulnerable_function(argv[1]);
    }
    return 0;
}
When executed with an input longer than 10 characters, such as 15 'A's (./program AAAAAAAAAAAAAAA), the strcpy copies beyond the 's end, overwriting adjacent memory, including the 's . This corruption causes the program to attempt a to an invalid address upon return, resulting in a and crash. To illustrate the mechanics at the level, examine the layout and disassembly for a similar (adapted from a seminal ). The typically includes the , saved base pointer (SFP), and (RET). In x86 (using ), the vulnerable might disassemble as follows (simplified):
0x0804841b <vulnerable_function+7>:  sub    &#36;0x14,%esp    # Allocate 20 bytes for buffer (16-byte aligned) and locals
0x0804841e <vulnerable_function+10>: mov    %eax,(%esp)    # Store input pointer
0x08048421 <vulnerable_function+13>: call   0x80482d0 <strcpy@plt>  # Copy without bounds
0x08048426 <vulnerable_function+18>: add    &#36;0x14,%esp    # Deallocate
0x08048429 <vulnerable_function+21>: ret                  # Jump to overwritten RET
With input crafted as 12 'A's followed by junk bytes to overwrite RET (e.g., python3 -c 'print("A"*12 + "\x41"*4)'), the return address becomes 0x41414141 ('AAAA' in ). Upon ret, the CPU jumps to this invalid address, triggering a . This trace shows how the overflow directly corrupts the RET, leading to program termination without further execution. For a heap-based buffer overflow, consider dynamic allocation with malloc and strcpy. The following code allocates a small buffer but copies oversized input:
c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv) {
    char *buffer = (char *)malloc(10 * sizeof(char));  // 10-byte buffer
    if (buffer == NULL) return 1;
    strcpy(buffer, argv[1]);  // Overflow if argv[1] > 9 chars (plus null)
    printf("Buffer: %s\n", buffer);
    free(buffer);
    return 0;
}
Running with input like 20 'A's causes the copy to extend beyond the allocated chunk, corrupting the of the adjacent chunk. In common allocators like , each chunk starts with a field (e.g., 8 bytes on 64-bit systems), followed by . Overflowing the overwrites this field of the next chunk, misleading the allocator about available space and causing failures in subsequent malloc or free calls, such as double-free errors or allocator crashes. For instance, a later allocation might reuse corrupted space, leading to segmentation faults during operations. To contrast unsafe practices with safer ones, replace strcpy with strncpy, which limits the copy to the size:
c
strncpy([buffer](/page/Buffer), input, 9);  // Copy at most 9 chars, leaving room for null
[buffer](/page/Buffer)[9] = '\0';  // Ensure null termination
This prevents overflow by truncating excess input, avoiding or corruption, though it may lose if the input exceeds the . Similarly, fgets for input or snprintf for formatting provide bounded alternatives to gets or sprintf. These functions enforce limits, ensuring the program does not write beyond allocated and thus avoids crashes from overflows. Even in modern C++, buffer overflows can occur due to manual bounds errors with containers like std::vector. For example, the following code attempts to copy from a source vector to an unallocated destination:
cpp
#include <algorithm>
#include <vector>

void copy_data(const std::vector<int>& src) {
    std::vector<int> dest;  // Empty, size 0
    std::copy(src.begin(), src.end(), dest.begin());  // No resize, causes overflow
}
If src has elements (e.g., size 5), std::copy writes to unallocated memory in dest, leading to undefined behavior such as heap corruption or crashes. Proper use requires pre-resizing dest (e.g., dest.resize(src.size())) or using iterators like std::back_inserter(dest) to grow dynamically. This misuse highlights how even safe containers demand explicit bounds management to prevent overflows.

Exploitation

Stack-Based Exploitation

Stack-based exploitation involves overwriting the return address on the call stack to redirect program control flow, allowing attackers to execute malicious code or repurpose existing functionality. This technique exploits the sequential memory layout of stack frames, where local buffers are typically placed just before the saved return address and base pointer, enabling overflow payloads to precisely target these control data elements. By crafting input that exceeds the buffer's bounds, attackers can inject or redirect to code that achieves goals such as spawning a shell or escalating privileges. One foundational method is shellcode injection, where the attacker places a small, position-independent payload—known as —directly into the overflowing buffer and overwrites the return address to point to its location. To mitigate alignment issues and increase reliability across varying stack positions, the payload often includes a (no-operation) sled: a sequence of harmless NOP instructions preceding the shellcode, providing a "landing zone" for the instruction pointer. This approach, demonstrated in early exploits on systems, allows the injected code to execute arbitrary commands, such as launching a reverse shell, once control is transferred. For instance, on x86 architectures, the shellcode might invoke an execve to run /bin/sh. When direct overwrite of the return address is protected or imprecise, attackers may use a jump-to-register technique to indirect through a saved . In this variant, the overflow overwrites a value (e.g., EBX or ) that the program's later loads into the pointer (EIP), such as via a pop followed by a jmp or indirect call. This method leverages existing code paths to pivot execution to the address stored in the , bypassing some integrity checks and enabling exploitation even in constrained buffer sizes. It is particularly useful in scenarios where the return address is canary-protected, but remain vulnerable. To circumvent non-executable stack protections (e.g., memory policies), return-to-libc attacks repurpose existing library code by overwriting the return address to point to a like system() in libc, with subsequent stack arguments supplying the command (e.g., system("/bin/sh")). This technique chains multiple returns: the first to system(), the second to exit() for cleanup, avoiding the need for injectable code while achieving access. Introduced as a for early stack execution restrictions, it exploits the predictable mapping of shared libraries and has been refined to handle argument passing without calls, such as by using mov instructions to load environment pointers. Return-oriented programming (ROP) extends return-to-libc by chaining short "gadgets"—existing instruction sequences in the or libraries that end with a ret—to compose Turing-complete payloads without injecting new code. Attackers identify gadgets via disassembly (e.g., pop %reg; ret), then construct a of return addresses and data to execute operations like manipulation, arithmetic, or system calls, effectively bypassing data execution prevention. First formalized on x86, ROP enables arbitrary computation by linking dozens to hundreds of gadgets, with tools like ROPgadget aiding discovery. Post-2010 advancements in ROP have addressed challenges in 64-bit systems, where larger address spaces and (ASLR) complicate gadget chaining. Fine-grained ROP techniques, such as those using just-in-time gadget discovery or ROP (BROP), enable partial ASLR bypasses by leaking partial addresses via info probes or exploiting predictable code layouts like PLT stubs. For example, the return-to-csu method leverages the C++ startup code's __libc_csu_init for register control in randomized 64-bit environments, allowing universal micro-ROP chains without full leaks. These developments demonstrate ROP's resilience, with successful exploits on modern systems requiring only partial randomization defeats.

Heap-Based Exploitation

Heap-based exploitation differs from stack-based methods by targeting the dynamic memory allocator's metadata and structures, often requiring multiple steps to achieve hijacking or . A primary technique involves overwriting chunk , such as fields or forward/backward pointers in linked lists maintained by allocators like glibc's ptmalloc. By corrupting these elements during a buffer overflow, attackers can manipulate allocation and deallocation behaviors, potentially creating arbitrary read or write primitives. For instance, overwriting a chunk's field can trick the allocator into treating adjacent as part of a larger free chunk, enabling consolidation or redirection of subsequent allocations. The "House of" techniques, a family of advanced heap grooming methods popularized in early analyses of glibc allocators, exploit these corruptions to control pointer returns from malloc. In the House of Force, attackers overflow into the top chunk—the unbounded region at the 's end—to forge its size field, forcing malloc to allocate from a victim-controlled address and return an arbitrary pointer, often after leaking heap addresses for precision. This method, effective on versions up to 2.27, relies on precise size manipulation to bypass checks like the non-main-arena flag. Similarly, the House of Spirit creates a fake fastbin chunk by overwriting in a controlled region, then freeing it to insert the fake entry into the fastbin freelist; subsequent allocations from that bin return the attacker's chosen address, enabling pointer grooming without needing heap base leaks. These techniques typically involve 4-9 allocator transactions and are demonstrated in controlled environments using tools like those in the how2heap . Partial overwrites target specific bytes within adjacent heap objects, often for information disclosure or type confusion without full control. For example, an off-by-one overflow can nullify the least significant byte of a chunk's size field, causing the allocator to consolidate it with neighboring free chunks and leak heap addresses via errno or error messages during failed allocations. This "Poison Null Byte" variant facilitates info leaks in small bin attacks, setting the stage for further exploitation by revealing layout details. Such partial corruptions are particularly useful in constrained scenarios, like integer overflows limiting write extent, and have been systematically evaluated for their transaction efficiency in modern allocators. Exploitation often escalates by combining heap overflows with use-after-free () vulnerabilities to hijack virtual function tables (vtables) in C++ objects. After freeing an object containing a vtable pointer, an attacker reallocates the memory with a controlled via the overflow, overwriting the pointer to point to a fake vtable with addresses; invoking a virtual method then executes the code. This technique, common in object-oriented codebases, bypasses non-executable memory by leveraging legitimate code paths and has been analyzed in defenses targeting vtable integrity. In the 2020s, heap overflows in browser engines like have leveraged just-in-time () spraying for reliable exploitation, filling regions with JIT-compiled code containing sleds and payloads to increase the odds of landing on attacker code despite address randomization. Notable instances include CVE-2021-30860, a buffer overflow exploited in the wild via , where JIT spray mitigated partial ASLR by ensuring dense, executable coverage. These attacks highlight ongoing challenges in JavaScriptCore, with systematic studies underscoring JIT's role in amplifying primitive reliability.

Exploitation Challenges and Techniques

Exploiting buffer overflows often encounters significant challenges due to the non-deterministic nature of modern memory layouts, primarily caused by (ASLR), which randomizes the base addresses of key program segments like the , , and libraries on each execution. This unpredictability makes it difficult for attackers to reliably determine the location of injected or return addresses without information leaks, such as those from format string vulnerabilities or side-channel attacks, forcing reliance on brute-force attempts or partial overwrites that may fail across multiple runs. Another barrier arises from input constraints in network protocols and applications, where buffers are often limited in size or subjected to filtering, such as length checks or character sanitization, restricting the amount of data an attacker can inject to trigger an overflow. For instance, protocols like or SMTP may enforce maximum sizes or escape sequences, complicating the delivery of large payloads and requiring attackers to chain multiple inputs or exploit ambiguities to bypass these limits. To mitigate offset inaccuracies in return addresses, attackers employ NOP sleds, which consist of a long sequence of no-operation () instructions (typically 0x90 on x86 architectures) prepended to the in the overflow buffer, creating a sliding "landing zone" that allows execution to proceed even if the jump lands slightly off-target. This technique, introduced in early exploit demonstrations, enhances reliability by increasing the effective target area, as the processor can "slide" through the NOPs until reaching the actual , though it consumes buffer space and can be detected by intrusion systems scanning for repetitive patterns. When direct shellcode placement is infeasible due to space limitations or when the overflow cannot reliably redirect control to the , egg hunters provide a multistage approach: a compact initial searches the process's for a predefined "egg" marker (a unique byte sequence like "egg=" repeated) preceding the main , then jumps to it upon detection. Developed for constrained environments, this method uses system calls like access() or NtDisplayString to probe pages safely, avoiding crashes on invalid accesses, and has been adapted for both and Windows with sizes as small as 32-60 bytes depending on the platform. Modern CPU and OS protections, such as Data Execution Prevention (DEP), pose additional hurdles by marking data regions like stacks and heaps as non-executable, preventing the direct execution of injected and forcing attackers to seek bypasses like (ROP) chains that reuse existing executable code gadgets. DEP, implemented in hardware via NX bits or software emulation, halts exploits attempting to run code from protected pages, though it does not block control-flow hijacking if attackers can redirect to already executable regions. Practical exploitation also demands consideration of system-specific factors, including variations across OS versions where patch levels or options alter structures and mitigations, reducing reliability if the exploit targets unpatched legacy systems but fails on updated ones. further complicates cross-platform payloads, as little-endian architectures (common in x86) store multi-byte values with least significant bytes first, requiring and addresses to be formatted accordingly to avoid misinterpretation on big-endian systems like some network devices.

Countermeasures

Programming and Library Practices

Selecting programming languages that inherently mitigate buffer overflow risks is a foundational practice for developers. Languages like Rust employ an ownership model, where each value has a single owner responsible for its lifetime, enforcing compile-time checks that prevent bounds errors and unauthorized memory access, thus eliminating common buffer overflow vulnerabilities without runtime overhead. In contrast, Java provides automatic array bounds checking, throwing an ArrayIndexOutOfBoundsException if access exceeds allocated limits, which safeguards against the majority of buffer overflows inherent in manual memory management. These safer languages reduce reliance on error-prone manual bounds verification, unlike C and C++, where direct memory manipulation often leads to overflows due to the absence of built-in protections. To address vulnerabilities in memory-unsafe languages like , developers should prioritize libraries with bounded operations. For string copying, functions such as strlcpy() from are recommended over strcpy(), as strlcpy() truncates input to fit the destination size and always null-terminates the result, preventing overflows while providing the length of the source for further handling. Similarly, for formatted output, snprintf() in the standard limits writing to a specified size, returning the number of characters that would have been written if unlimited, enabling safe truncation and avoiding the unbounded behavior of sprintf(). These bounded I/O functions in POSIX-compliant environments promote safer data handling without altering core language semantics. Adopting rigorous coding standards further strengthens prevention efforts. The OWASP Secure Coding Practices Quick Reference Guide advises validating all inputs to truncate strings to reasonable lengths before buffer operations and performing explicit bounds checks in loops to avert overflows, particularly in memory-unsafe languages. Integrating static analysis tools like Scan, which detects potential buffer overruns by analyzing code paths and buffer sizes, allows early identification of bounds violations during development. These standards emphasize proactive measures, such as sanitizing untrusted inputs, to align with secure development lifecycles. Best practices include comprehensive input validation to reject or limit oversized data before allocation, avoiding fixed-size s that invite overflows under variable loads, and favoring dynamic sizing with runtime checks using functions like malloc() paired with size verification. For instance, employing getline() in C dynamically allocates sufficient space for input lines, eliminating the need for predefined buffer limits and reducing overflow risks from unexpected data volumes. These techniques ensure scalable, secure memory usage while maintaining performance in resource-constrained environments.

Runtime and Compiler Protections

Runtime and compiler protections encompass automated mechanisms integrated into software during compilation or execution to detect and mitigate buffer overflows, primarily targeting and vulnerabilities without requiring manual code changes. These defenses operate by inserting checks, guards, or validations that interrupt execution upon detecting anomalies, thereby limiting the impact of exploits. Key examples include stack canaries, address sanitizers, and structured protections, each designed to address specific overflow scenarios while balancing with performance. Stack canaries, also known as stack-smashing protection, are a compiler-inserted defense mechanism that places a random "canary" value—typically a 32- or 64-bit secret—between local buffers and sensitive control data like return addresses on the stack. Upon function entry, the compiler generates code to copy this canary from a global, randomized location into the stack frame; on exit, it verifies the canary's integrity before allowing to proceed. If the canary is altered—indicating an overflow that has overwritten it—the program terminates to prevent exploitation. This technique, first implemented in the StackGuard compiler extension, effectively thwarts straightforward stack-based buffer overflows by making it computationally infeasible for attackers to predict the canary without prior leakage. Modern implementations in and , enabled via flags like -fstack-protector-strong, selectively apply canaries to functions with vulnerable buffers, achieving low overhead of approximately 1% in typical workloads. AddressSanitizer (ASan) provides comprehensive runtime detection for both and buffer overflows by instrumenting code to insert "redzones"—unallocated, poisoned memory regions—adjacent to objects on the , , and globals. These redzones act as sentinels; any access to them triggers an immediate fault and detailed error report, pinpointing the overflow source. ASan employs a custom memory allocator and memory mapping to track object boundaries efficiently, detecting out-of-bounds reads/writes and use-after-free errors with high coverage. Introduced in / and , it incurs a runtime slowdown of about 2x for speed and 3x for memory usage in instrumented builds, making it suitable for rather than production deployment. Figure 1: ASan Shadow Memory Layout illustrates how redzones surround allocations to isolate and detect violations.
mermaid
graph LR
A[Valid Object] --> B[Left Redzone]
B --> A
A --> C[Right Redzone]
C --> A
D[Shadow Map] -->|Tracks| A
D -->|Poisoned| B
D -->|Poisoned| C
Structured Overwrite Protection (SEHOP), a Windows-specific safeguard, defends against SEH chain overwrites—a common buffer overflow vector where attackers corrupt exception handler pointers on the to hijack . SEHOP validates the integrity of the exception registration chain during handler invocation by checking a randomized cookie embedded in each frame against a process-wide secret, ensuring no tampering has occurred. Enabled system-wide via registry or per-process, it blocks exploits without altering application code and has been standard in Windows since SP1. This mechanism complements stack canaries by targeting the linked-list nature of SEH records, preventing redirection to malicious handlers. Despite their effectiveness, these protections introduce performance overheads: stack canaries add minor instruction counts per function (around 5-10 extra operations), while ASan significantly increases memory footprint due to redzones (up to 3x). SEHOP imposes negligible runtime cost but requires compatible binaries. All can be bypassed via information leaks that expose canary values, redzone accesses without faults, or SEH chain manipulation before validation, underscoring the need for layered defenses.

System-Level and Hardware Defenses

System-level and hardware defenses against buffer overflows operate at the operating system (OS) and levels to prevent exploitation by enforcing isolation, , and access controls that go beyond application-specific protections. These mechanisms aim to make successful attacks computationally infeasible or detectable by design, such as by preventing the execution of injected malicious code or by obscuring layouts that attackers rely on for hijacking. Executable space protection, also known as No-eXecute (NX) or Data Execution Prevention (DEP), uses hardware features like the in entries to mark regions of memory—such as the and —as non-executable. This prevents buffer overflow exploits from running injected into these areas, as modern processors like x86 and enforce the bit to generate faults on attempts to execute data. Introduced in processors in 2003 and Intel's IA-32e mode in 2004, NX/DEP has been widely adopted in OSes like Windows and , significantly reducing the impact of traditional attacks. Address Space Layout Randomization (ASLR) randomizes the base addresses of key regions, including the , , shared libraries, and the program executable, at each launch or system . By making addresses unpredictable, ASLR thwarts buffer overflow exploits that depend on knowing precise locations for overwriting pointers or function calls, forcing attackers to resort to less reliable techniques like (ROP). Implemented in 2.6.12 in 2005 and later in , ASLR's effectiveness increases with pointer , where full randomization (e.g., 28-32 bits) can raise the attack success probability to near zero without side-channel leaks. The Capability Hardware Enhanced RISC Instructions (CHERI) architecture extends conventional RISC ISAs with hardware-enforced capabilities, where pointers are augmented with metadata bounds and permissions to restrict memory access. In buffer overflow scenarios, CHERI prevents out-of-bounds writes by trapping invalid accesses at the hardware level, compartmentalizing potential overflows without relying on software checks. Developed by the and since 2010, CHERI has been prototyped on and , demonstrating significant reductions in exploitable vulnerabilities in evaluated C/C++ codebases, such as a 67% reduction in certain memory safety issues according to evaluations. Deep packet inspection (DPI) at the network level scans protocol payloads, such as HTTP requests, for signatures of buffer overflow attempts, including oversized inputs or malformed headers that could trigger overflows in server software. OS-integrated DPI tools, like those in firewalls or intrusion prevention systems (IPS), filter such traffic before it reaches vulnerable applications, mitigating remote exploits. Widely deployed in enterprise networks since the early 2000s, DPI has proven effective against protocol-specific overflows, as seen in blocking variants of the Heartbleed vulnerability in OpenSSL. The ARMv8.3-A architecture introduced pointer authentication codes () in 2016, with further enhancements in subsequent versions including ARMv9 (released in 2022), using dedicated registers and instructions to sign and verify pointer integrity. These features particularly harden heap allocations in resource-constrained environments like mobile devices and systems against overflows that forge pointers, by invalidating tampered addresses at runtime with minimal overhead (under 5% performance impact in benchmarks). ARMv9's PAC extensions build on ARMv8.3, enabling widespread adoption in and embedded distributions to counter evolving heap exploitation techniques.

Detection and Testing Methods

Detection and testing methods for buffer overflows primarily involve automated tools and manual processes aimed at identifying vulnerabilities during and auditing. These approaches help uncover issues such as or overflows by analyzing code statically, executing programs dynamically, or simulating malformed inputs, thereby preventing exploitation in production environments. Fuzzing is a widely adopted technique that automates the generation of random or mutated inputs to a program, monitoring for crashes or anomalies indicative of buffer overflows. Tools like employ greybox , which combines code instrumentation for coverage-guided input mutation with lightweight feedback mechanisms to efficiently explore program paths and trigger memory errors, including overflows. For instance, has been instrumental in discovering buffer overflow vulnerabilities in open-source projects through continuous fuzzing campaigns, such as those integrated into OSS-Fuzz. Static analysis tools scan source code without execution to detect potential buffer overflow risks, focusing on patterns like unsafe function calls or bound violations. Splint, an extensible lightweight static checker for C programs, identifies buffer overflows by flagging calls to functions such as strcpy without bounds checking and enforcing annotations for buffer sizes, achieving detection rates up to 57% on benchmark suites of exploitable overflows. Similarly, Frama-C's value analysis plugin performs formal verification on C code to prove the absence of overflows by computing precise ranges for variables and detecting invalid memory accesses, as demonstrated in benchmarks like the Verisec suite. Dynamic testing instruments running programs to monitor memory usage and detect runtime errors, including buffer overflows. Valgrind's Memcheck tool shadows memory allocations and accesses, reporting invalid reads or writes beyond buffer boundaries, such as or overflows from uninitialized or overrun data, making it effective for C and C++ applications during development. Recent advancements in AI-assisted enhance traditional methods by leveraging to generate more targeted inputs for complex codebases. In 2023, integrated large language models (LLMs) into OSS-Fuzz, enabling smarter seed selection and mutation strategies that improved vulnerability discovery, including buffer overflows, by analyzing code and prior crashes to prioritize high-impact test cases. Manual auditing practices, such as code reviews, complement automated tools by scrutinizing high-risk areas like for overflow-prone constructs. Reviewers target functions like gets or unchecked strcat calls, verifying bounds checks and input validation to catch subtle overflows missed by tools, as recommended in structured guidelines for secure code examination.

Historical Context

Early Discoveries and Developments

The concept of buffer overflows as a potential vulnerability was first systematically documented in the early within operating systems research. The 1972 Computer Security Technology Planning Study, commissioned by the U.S. , identified buffer overruns as a for penetrating systems by overwriting adjacent areas, such as input buffers in processes, to alter or inject unauthorized . This report highlighted issues in early systems, though these were treated primarily as reliability bugs rather than deliberate exploits. Similar concerns appeared in UNIX development during the 1970s and 1980s, where language implementations often lacked automatic bounds checking, resulting in frequent crashes from buffer overruns in utilities and daemons, but without widespread recognition as a weaponizable threat. The first major real-world weaponization of a buffer overflow occurred in 1988 with the , which exploited a stack-based vulnerability in the fingerd daemon on VAX UNIX systems. By sending an oversized input to the finger service, the worm overflowed a 512-byte buffer in the gets() function, overwriting the stack to redirect execution and propagate across the nascent , infecting an estimated 10% of connected machines. This incident, authored by , marked the transition from theoretical memory errors to practical network exploitation, prompting initial awareness in the security community, though buffer issues in UNIX were not systematically patched until later. In the , buffer overflows evolved from accidental crashes to deliberate exploits amid growing discussions in academic and underground security circles. Early analyses focused on UNIX vulnerabilities, but weaponization accelerated with the 1996 publication of "Smashing the Stack for Fun and Profit" by Aleph One in magazine, which provided a step-by-step formalization of stack-based exploitation techniques, including injection and overwriting. This paper, highly influential with thousands of citations, democratized the knowledge and inspired variants targeting other architectures.

Notable Incidents and Evolution

One of the earliest major real-world exploits of a buffer overflow occurred in July 2001 with the Code Red worm, which targeted a heap-based buffer overflow vulnerability in Microsoft's Internet Information Services (IIS) web server software, specifically in the handling of .ida and .idq extensions. The worm rapidly propagated by scanning for vulnerable servers and infecting over 359,000 systems worldwide, defacing websites with political messages and launching denial-of-service attacks against targeted hosts. Its impact was severe, causing an estimated $2.6 billion in global economic losses from cleanup, lost productivity, and network disruptions. In January 2003, the Slammer worm demonstrated the potential for even faster propagation through a stack-based buffer overflow in the Microsoft SQL Server resolution service on UDP port 1434. This 376-byte worm infected approximately 75,000 vulnerable hosts—representing over 90% of susceptible systems—within just 10 minutes of its release, achieving a peak scanning rate of more than 55 million probes per second and overwhelming global networks. The incident led to widespread outages, including disruptions to airline systems, ATM networks, and internet services, with remediation and productivity losses estimated at around $1 billion. The evolution of buffer overflow exploits in the and beyond shifted toward more sophisticated remote attacks, particularly in and networked environments. A prominent example is the 2014 Heartbleed vulnerability (CVE-2014-0160), a buffer over-read flaw in the cryptography library's Heartbeat Extension, which allowed attackers to extract up to 64 kilobytes of sensitive memory contents, including private keys and user credentials, from affected servers. Affecting millions of websites and devices, it prompted a massive global response, including revocations and patches, with initial economic costs for mitigation estimated at $500 million. This incident underscored the risks of buffer over-reads in widely used libraries, influencing subsequent security audits and memory-safe programming practices. More recent developments highlight the persistence of buffer overflows in modern software ecosystems, including related memory safety issues. The 2021 Log4Shell vulnerability (CVE-2021-44228) in Apache Log4j, while primarily an arbitrary code execution flaw via JNDI lookups, was followed by patches addressing stack overflow conditions (e.g., CVE-2021-45105), illustrating how logging libraries can amplify memory-related risks in cloud and enterprise applications. In 2025, buffer overflows continued to emerge in (IoT) devices, such as the stack corruption vulnerability in Zigbee EZSP Host Applications (CVE-2025-8414), where improper input validation allows attackers to overflow buffers and potentially execute arbitrary code on resource-constrained wireless networks. These cases reflect a broader trend toward remote exploitation in cloud services and embedded systems, where attackers leverage overflows for initial access in supply chain attacks or botnet recruitment. The cumulative impact of buffer overflow incidents has driven significant economic burdens and shaped security standards. Major exploits like and alone contributed billions in direct remediation and indirect costs, while ongoing vulnerabilities exacerbate global cybersecurity expenses, estimated to exceed hundreds of billions annually when factoring in breaches and downtime. This has influenced formal classifications such as CWE-120 (Buffer Copy without Checking Size of Input), a cornerstone of vulnerability taxonomies used by organizations like and to guide secure coding and risk assessment. Despite advancements in defenses, the adaptation of overflows to diverse environments demonstrates their enduring threat, prompting a focus on memory-safe languages and rigorous input validation in standards like those from NIST and ISO.

References

  1. [1]
    buffer overflow - Glossary | CSRC
    A condition at an interface under which more input can be placed into a buffer or data holding area than the capacity allocated, overwriting other information.
  2. [2]
    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 ...
  3. [3]
    What is a Buffer Overflow | Attack Types and Prevention Methods
    A buffer overflow (or buffer overrun) occurs when the volume of data exceeds the storage capacity of the memory buffer.
  4. [4]
    Buffer Overflow Attack - Glossary | CSRC
    A method of overloading a predefined amount of space in a buffer, which can potentially overwrite and corrupt memory in data. Sources: NIST SP 800-72 ...
  5. [5]
    [PDF] Memory Corruption Attacks The (almost) Complete History
    Jun 25, 2010 · 10/31/1972 - The First documented Overflow Attack. The Computer ... security requirements for the US Air Force documents the earliest.
  6. [6]
  7. [7]
    Secure by Design Alert: Eliminating Buffer Overflow Vulnerabilities
    Feb 12, 2025 · Buffer overflow vulnerabilities are a prevalent type of memory safety software design defect that regularly lead to system compromise. The ...Missing: definition | Show results with:definition
  8. [8]
  9. [9]
    Buffer Overflow - CSE365 Labs
    A buffer overflow is defined as the condition in which a program attempts to write data beyond the boundaries of pre-allocated fixed length buffers.
  10. [10]
    Buffer Overflows in C - Computer Science
    A buffer overflow (or overrun) is a situation in which a program uses locations adjacent to a buffer (i.e., beyond one or both of the boundaries of a buffer).<|control11|><|separator|>
  11. [11]
    Assembly 4: Buffer overflows – CS 61 2018
    In a buffer overflow, an untrusted input is transferred into a buffer, such as an array of characters on the stack, without checking to see whether the buffer ...
  12. [12]
    What Is Buffer Overflow? Attacks, Types & Vulnerabilities | Fortinet
    Buffer overflow is a software coding error that enables hackers to exploit vulnerabilities, steal data, and gain unauthorized access to corporate systems.Missing: NIST | Show results with:NIST
  13. [13]
    Overflow Vulnerabilities - Cobalt.io
    Apr 3, 2023 · There are three main types of buffer overflows: stack-based, heap-based and global buffer. Stack-based buffer overflow: The stack is a section ...Missing: format | Show results with:format
  14. [14]
    Everything about Buffer Overflows | Blog - Code Intelligence
    A buffer overflow happens when a program attempts to store data beyond the bounds of a fixed-size buffer. Buffers are temporary storage areas used to hold data ...<|control11|><|separator|>
  15. [15]
    Buffer Overflow Attack - OWASP Foundation
    Buffer overflow errors are characterized by the overwriting of memory fragments of the process, which should have never been modified intentionally or ...
  16. [16]
  17. [17]
    Buffer Handling - Windows drivers | Microsoft Learn
    Nov 5, 2024 · These errors can allow buffer overflows or cause system crashes, which can compromise system security. This article discusses some of the ...
  18. [18]
    [PDF] Real-World Buffer Overflow Protection for Userspace & Kernelspace
    Abstract. Despite having been around for more than 25 years, buffer overflow attacks are still a major security threat for deployed software.
  19. [19]
    Linux Kernel: Ceph file system driver buffer overflow - GitHub
    Aug 30, 2023 · An attacker being able to identify the IP of a device reading the ceph file system can result in a denial of service and remote code execution in the kernel.
  20. [20]
    [PDF] Activation Records/Stack Frames - cs.Princeton
    Activation records (ARs) are created upon function call and destroyed upon return. A stack frame is the portion of the stack used for a function's invocation.
  21. [21]
    [PDF] Smashing The Stack For Fun And Profit Aleph One
    We will concern ourselves only with the overflow of dynamic buffers, otherwise known as stackbased buffer overflows. Process Memory Organization. To understand ...
  22. [22]
    CWE-121: Stack-based Buffer Overflow
    A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a ...Missing: mechanics | Show results with:mechanics
  23. [23]
    [PDF] Module 5: Buffer Overflow Attacks - Jackson State University
    Buffer overflow (Buffer overrun) is a condition at an interface under which more input can be placed into a buffer (data holding area) than the capacity ...
  24. [24]
    MallocInternals - glibc wiki
    Aug 9, 2022 · Glibc's malloc is chunk-oriented. It divides a large region of memory (a "heap") into chunks of various sizes. Each chunk includes meta-data ...
  25. [25]
    [PDF] Run-time Detection of Heap-based Overflows
    Heap-based overflows can be divided into two classes: One class [6] comprises attacks where the overflow of a buffer allocated on the heap directly alters the ...Missing: mechanics | Show results with:mechanics
  26. [26]
  27. [27]
    CWE-122: Heap-based Buffer Overflow
    A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory.
  28. [28]
    [PDF] Buffer Overflow and Format String Overflow Vulnerabilities
    Vulnerability to buffer overflow and format string overflow is due to the characteristics of the C language. For example, an array in C is not a first-class ...
  29. [29]
  30. [30]
    History of the ROP - Research
    Nov 2, 2021 · Solar Designer then wrote a proof of concept exploit and published the first return to libc attack in August to the public “full disclosure” ...
  31. [31]
    [PDF] Return-into-libc without Function Calls (on the x86)
    Abstract. We present new techniques that allow a return-into-libc attack to be mounted on x86 exe- cutables that calls no functions at all.Missing: original | Show results with:original
  32. [32]
    The geometry of innocent flesh on the bone - ACM Digital Library
    We present new techniques that allow a return-into-libc attack to be mounted on x86 executables that calls no functions at all.
  33. [33]
    [PDF] Just-In-Time Code Reuse: On the Effectiveness of Fine-Grained ...
    Abstract—Fine-grained address space layout randomization. (ASLR) has recently been proposed as a method of efficiently mitigating runtime attacks.
  34. [34]
    [PDF] Hacking Blind - Reliable Computer Systems
    We present two new techniques: generalized stack reading, which defeats full ASLR on 64-bit systems, and the. BROP attack, which is able to remotely find ROP ...
  35. [35]
    [PDF] return-to-csu: A New Method to Bypass 64-bit Linux ASLR
    The major contributions of this paper are as follows: • return-to-csu: A new method to bypass the ASLR in 64-bit systems. • An universal µROP chain present ...
  36. [36]
    [PDF] Automatic Techniques to Systematically Discover New Heap ...
    A heap exploit technique is one of the popular methods used to compromise non- scriptable programs—bugs in scriptable programs typically allow much easier, ...
  37. [37]
    VTPin: practical VTable hijacking protection for binaries
    Dec 5, 2016 · Use-after-free vulnerabilities are gaining more and more attentions in recent years, since they are commonly exploited in applications like ...
  38. [38]
    [PDF] SoK: Make JIT-Spray Great Again - REACT
    Attackers happily welcomed JIT in their own way, and until today, JIT compilers are an important target of various attacks. This includes for example JIT-Spray,.Missing: 2020s | Show results with:2020s<|control11|><|separator|>
  39. [39]
    [PDF] Buffer overflows: attacks and defenses for the vulnerability of the ...
    Abstract. Buffer overflows have been the most common form of security vulnerability for the last ten years. More over, buffer overflow vulnerabilities.Missing: challenges unpredictability<|separator|>
  40. [40]
    [PDF] Safely Searching Process Virtual Address Space - HiCK.ORG!
    Sep 3, 2004 · The following sections will outline and describe some specific egg hunter implementations that have been used and tested on both Linux and.
  41. [41]
    Data Execution Prevention - Win32 apps - Microsoft Learn
    May 1, 2023 · DEP prevents code from being run from data pages such as the default heap, stacks, and memory pools. If an application attempts to run code from ...
  42. [42]
    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.What Is Ownership? · The Stack And The Heap · Memory And Allocation
  43. [43]
    Secure Coding Guidelines for Java SE - Oracle
    The Java language provides bounds checking on arrays which mitigates the vast majority of integer overflow attacks. However, some operations on primitive ...
  44. [44]
    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.
  45. [45]
    [PDF] strlcpy and strlcat — consistent, safe, string copy and concatenation.
    While strlcpy() and strlcat() are well-suited for dealing with fixed-size buffers, they cannot replace strncpy() and strncat() in all cases. There are still ...Missing: prevention | Show results with:prevention
  46. [46]
    snprintf(3p) - Linux manual page - man7.org
    snprintf is used to print formatted output. Its syntax is: int snprintf(char *restrict s, size_t n, const char *restrict format, ...); Refer to fprintf(3p).
  47. [47]
    posix snprintf man page on unix.com
    The snprintf() function shall be equivalent to sprintf(), with the addition of the n argument which states the size of the buffer referred to by s. If n is zero ...
  48. [48]
    Secure Coding Practices Checklist - OWASP Foundation
    Check buffer boundaries if calling the function in a loop and protect against overflow. Truncate all input strings to a reasonable length before passing them ...Secure Coding Practices... · Authentication And Password... · Access Control
  49. [49]
    Coverity Scan - Static Analysis
    Test every line of code and potential execution path. The root ... Coverity Scan identifies buffer overflow and overrun vulnerabilities in PostgreSQL.FAQ · About · Projects Using Scan · Sign inMissing: bounds | Show results with:bounds
  50. [50]
    [PDF] Secure Coding in C and C++ - Software Engineering Institute
    This section describes examples of notable buffer overflow vulnerabilities resulting from incorrect string handling. Many well-known incidents, includ- ing ...
  51. [51]
    Efficient Greybox Fuzzing to Detect Memory Errors
    Jan 5, 2023 · Greybox fuzzing is a proven and effective testing method for the detection of security vulnerabilities and other bugs in modern software systems.
  52. [52]
    Splint Home Page
    Splint is a tool for statically checking C programs for security vulnerabilities and coding mistakes. With minimal effort, Splint can be used as a better lint.
  53. [53]
    [PDF] Secure Programming Group Technical Report Using Splint to Detect ...
    In this paper we explore using static analysis to mitigate the problem. Buffer overflow attacks exploit unsafe languages like C which do not check the bounds on ...
  54. [54]
    Static analysis benchmarks - Frama-C
    Jan 10, 2012 · The first benchmark Frama-C's value analysis was ever evaluated on was the Verisec suite, described in "A buffer overflow benchmark for software ...
  55. [55]
    [PDF] Value Analysis - Frama-C
    possibility of problems such as buffer overflows in the implementation. It is a good thing to be able to rule these out with Frama-C's value analysis. Frama ...
  56. [56]
    4. Memcheck: a memory error detector - Valgrind
    Memcheck is a memory error detector. It can detect the following problems that are common in C and C++ programs. Incorrect freeing of heap memory.
  57. [57]
    How AI can revolutionize vulnerability research | SC Media
    Feb 3, 2025 · Google has also embraced AI-enhanced fuzzing, adding LLM capabilities to its OSS-Fuzz system in August 2023. ... AlgorithmBugBuffer Overflow ...Missing: advancements | Show results with:advancements
  58. [58]
    [PDF] Computer Security Technology Planning Study (Volume I)
    Oct 8, 1998 · The major computer security problem of the USAF stems from the fact that there is an urgent requirement to provide shared use of computer ...Missing: mentioned | Show results with:mentioned
  59. [59]
    Why buffer overflow exploitation took so long to mature - rdist
    May 3, 2010 · I think the history of buffer overflow exploits is interesting because of how long it took for techniques to mature.
  60. [60]
    The Ghost of Exploits Past: A Deep Dive into the Morris Worm - Rapid7
    Jan 2, 2019 · If we look at the source for fingerd in /usr/src/etc/fingerd.c, we see a classical stack-based buffer overflow: A 512-byte buffer can be ...
  61. [61]
    How security flaws work: The buffer overflow - Ars Technica
    Aug 25, 2015 · The Morris worm, the first self-replicating malware that spread across the early Internet in a couple of days in 1988, exploited this function.
  62. [62]
  63. [63]
    CAIDA Analysis of Code-Red
    Jul 30, 2020 · On July 12, 2001, a worm began to exploit the aforementioned buffer-overflow vulnerability in Microsoft's IIS webservers. Upon infecting a ...Missing: heap | Show results with:heap
  64. [64]
    What are buffer overflow attacks and how are they thwarted?
    Dec 6, 2021 · In 2001, the Code Red worm infested more than 359,000 computers running Microsoft's IIS software. Code Red defaced webpages and attempted to ...Missing: impact | Show results with:impact
  65. [65]
    Code Red worm damage costs at $2.6 billion - Chron
    Aug 31, 2001 · Code Red, which infected more than 1 million computers, resulted in an estimated $1.1 billion in clean-up costs and $1.5 billion in lost ...
  66. [66]
    [PDF] An Exploit In Action: The SQL Slammer Worm - GIAC Certifications
    Feb 10, 2003 · The exploit overflows the input buffer for the MSSQL-Mon process which listens on UDP 1434. This process expects to receive 0x04 followed by 4 “ ...
  67. [67]
    The Spread of the Sapphire/Slammer Worm - CAIDA
    It infected more than 90 percent of vulnerable hosts within 10 minutes. The worm (also called Slammer) began to infect hosts slightly before 05:30 UTC on ...Missing: stack | Show results with:stack
  68. [68]
    Counting the cost of Slammer - CNET
    Jan 31, 2003 · On Thursday, London-based market intelligence firm Mi2g said that the worm caused between $950 million and $1.2 billion in lost productivity in ...
  69. [69]
    CVE-2014-0160 Detail - NVD
    Apr 7, 2014 · CVE-2014-0160 does not allow unrestricted access to memory on the targeted host, a successful exploit does leak information from memory locations.
  70. [70]
    The Heartbleed Bug: How a Forgotten Bounds Check Broke ... - Invicti
    Feb 5, 2020 · The Heartbleed bug is a critical buffer over-read flaw in several versions of the OpenSSL library that can reveal unencrypted information ...
  71. [71]
    Mitigating Log4Shell and Other Log4j-Related Vulnerabilities | CISA
    Dec 23, 2021 · Log4Shell, disclosed on December 10, 2021, is a remote code execution (RCE) vulnerability affecting Apache's Log4j library, versions 2.0-beta9 to 2.14.1.
  72. [72]
    CVE-2025-8414 Detail - NVD
    Oct 17, 2025 · Description. Due to improper input validation, a buffer overflow vulnerability is present in Zigbee EZSP Host Applications.
  73. [73]
    CWE-120: Buffer Copy without Checking Size of Input ('Classic ...
    This will result in a buffer overflow when copying the client hostname to the local variable using the strcpy method.