← all systems · see it in The System
Buffer overflow
In programming and information security, a buffer overflow or buffer overrun is a bug whereby a program writes data to a buffer beyond the buffer's allocated memory, overwriting adjacent memory locations (src:wp:buffer-overflow). Walked as the fault together with its life as the security literature describes it: why some languages allow it (C, C++) and others do not, its history from the 1972 Anderson report through the Morris worm (1988), 1996 and the worms of 2001-2003, the defences and the arms race around them, how common it remains, and the move to memory-safe languages and hardware.
Properties published scienceour proposal
Sourced fields, and our own readings.
| born at | October 1972 (the Computer Security Technology Planning Study); first documented hostile use 1988 |
| born precision | year |
| boundary | Inside: the buffer, the write past its end, the adjacent memory it changes, and the run-time outcome; together with the record of the fault (its kinds, counts and history) and the defences and uses that exist because of it. Outside: the program, language, compiler, operating system and hardware it occurs in (partners), and the attackers and worms that use it. |
| nested level | A kind of memory-safety error (spatial), itself a kind of software vulnerability when exploitable; occurs in software running in computer memory. |
| scale | technological |
Measures (41) published science
| characteristic clock: Slammer doubling time | 8.5 s |
| Slammer: share of vulnerable hosts infected in 10 minutes | >90 % |
| Slammer: hosts infected | >=75,000 hosts |
| Code-Red v2: hosts infected | >359,000 in 14 h hosts |
| Slammer worm size | 376 bytes |
| Code-Red peak infection rate | >2,000 hosts per minute |
| Code-Red: disclosure to patch | 8 days |
| Code-Red: patched share of infected hosts before and after the 1 August re-spread | 32 -> 64 % |
| Code-Red epidemic cost (estimate) | >2.6 billion USD |
| Morris worm: machines infected (usually reported) | ~6,000 (contested: a guess per Graham; Stoll counted 2,000 in 15 h) machines |
| Morris worm: economic impact (Stoll's estimate for the GAO) | 100,000 - 10,000,000 USD |
| ASLR derandomization time on 32-bit (Apache, PaX) | 216 (average) s |
| canary check: instructions added per function call | 7 instructions |
| canary micro-benchmark overhead per call (1998) | 125 (empty function, worst case); 69-80 (one-argument functions) % |
| shadow stack overhead (unprotected, LLVM) | 5 % (SPEC2006) |
| SoftBound spatial-safety overhead | 67 % (average) |
| SoftBound+CETS full memory-safety overhead | 116 % (SPEC CPU average) |
| adoption threshold for a defence's run-time overhead | ~10 (some say 5) % |
| AddressSanitizer CPU overhead | 1.5x-3x ratio |
| memory-safety share of Microsoft CVEs per year | ~70 % |
| memory tagging: detection probability with 4-bit tags | 15/16 (~94%) probability |
| memory-safety share of Chromium severe bugs | 70 % (2020) |
| memory-safety share cited by CISA | roughly 2/3 of software vulnerabilities |
| memory-safety share of Android vulnerabilities | 76 (2019); 24 (2024, extrapolated); <20 (2025) % |
| memory-safety vulnerability density, Rust in Android | 0.2 (estimate) per million lines |
| memory-safety vulnerability density, C/C++ in Android | ~1,000 (historical) per million lines |
| Rust vs C++ rollback rate (medium and large changes) | ~4x lower for Rust ratio |
| Rust memory-safety bugs studied (all CVEs to 2020-12-31) | 186 (all but one compiler bug need unsafe code) bugs |
| CWE Top 25 2025: rank of CWE-787 Out-of-bounds Write | 5 (score 12.68; 12 KEV CVEs; down 3) rank |
| CWE Top 25 2025: rank of CWE-120 classic buffer overflow | 11 (score 6.96); stack-based CWE-121 14th, heap-based CWE-122 16th rank |
| CHERI: share of 2019 MSRC memory-safety issues deterministically mitigated (assessment) | at least two thirds (theoretical, combined with other mitigations) share |
| bug density in executable code (reliability studies) | up to 75 bugs per 1000 lines |
| first description to first documented hostile use | 1972 -> 1988 (16 years) |
| NX patch to published bypass | a few months (June 1997 patch) |
| spatial share of in-the-wild memory-safety exploits (Project Zero, a decade) | 40 % |
| hardened libc++ bounds checks: average performance impact | 0.30 % (Google services) |
| hardened libc++: bugs found | >1,000 found; 1,000-2,000 a year prevented (projected) bugs |
| hardened libc++: reduction in baseline segfault rate | 30 % |
| average vulnerability lifetime assumed in Google's simulation | 2.5 (model input; code doubling every 6 years; 10-year transition) |
| Slammer: patch to worm | about 6 months (24 July 2002 bulletin to 25 January 2003 outbreak; our count from the two dates) |
| Code-Red: vendor bulletin to patch for all Windows 2000 builds | 18 June to 21 August 2001 dates |
Open contentions (5) open contention
Where sources or readings disagree. Both stay on the map.
- C-3825 When did Microsoft release the fix that would have stopped the Code Red worm: 18 June or 26 June 2001?
booked: The map keeps the competing readings; none is ruled.
the other reading: patch 26 June 2001, eight days after disclosure (src:moore-2002-codered); patch 18 June 2001, with the bulletin (src:ms01-033); the paper's date refers to one platform's build (the specialist's reading, unsourced) - C-3863 Is the decades-old problem of memory errors in software solved?
booked: The map keeps the competing readings; none is ruled.
the other reading: mostly solved by deployed mitigations ('dozens of commercial solutions exist', a 2011 reviewer quoted by van der Veen et al.); solvable only by changing the substrate (memory-safe languages, capability hardware), not by mitigations that 'do not result in safer LoC'; a middle form: retrofitting bounds checks into the unsafe language's standard library at near-zero cost (hardened libc++, 0.30%, src:google-2024-libcpp-hardening), neither a mitigation that leaves code unsafe nor a rewrite; and 'breaking the arms race' by building secure software from the start (src:google-2024-android-memsafe) - C-3864 What share of serious software flaws are memory-safety errors?
booked: The map keeps the competing readings; none is ruled.
the other reading: one headline figure (~70%) for 'software'; a much lower share across all CVEs, where web weaknesses dominate; the nearest figures to overflows themselves: spatial flaws 40% of in-the-wild memory-safety exploits (Project Zero); in Chromium half of the 70% are use-after-free - C-3865 How many computers did the 1988 Morris worm infect?
booked: The map keeps the competing readings; none is ruled.
the other reading: a guess (10% of an estimated 60,000 hosts), per Paul Graham's account; two thousand infected within fifteen hours (Stoll's survey); 'thousands of machines' (Spafford 1989) - C-3891 Was the Slammer worm's flaw patched before it was publicly announced?
booked: The map keeps the competing readings; none is ruled.
the other reading: patch before announcement (src:caida-2003-sapphire), perhaps meaning before the finder's own public presentation (specialist's unsourced lead); flaw and patch made public together on 24 July 2002 (src:ms02-039)
Cross-scale patterns seen here (24) our proposal
Shapes that recur when the same kind of problem is solved at different scales, and how each shows in Buffer overflow. Each links to every other system that shows it.
- lightning (structural)
A stored difference released at once: a buffer overflow left unpatched across a monoculture of hosts discharged as a worm. Slammer, 376 bytes in one packet, doubled every 8.5 s and took over 90% of vulnerable hosts in 10 minutes, 'so quickly that human response was ineffective'; Code-Red took 359,00 - nested ladder (structural)
Szekeres et al.'s policies form a ladder of implication: 'some policies include other, weaker policies' (Memory Safety above Code Pointer Integrity and Control-flow Integrity; W⊕X as Code Integrity plus Non-executable Data). The same ladder in the safety proofs: CETS enforces temporal safety only 'i - red-queen (structural)
Both sides improve and neither gains ground: the non-executable stack (June 1997) was bypassed by its own author months later; canaries (1998) by information leaks; ASLR (2001) by derandomization (216 s on 32-bit, 2004) and leaks; by 2013 'all currently deployed protections can be defeated', and ~70 - same role, different builds (structural)
One job, keeping a write inside its object's bounds, done by unrelated builds: run-time checks in the language (Java, .NET), proof at compile time (Rust's borrow checker), a canary word checked at return, page permissions and guard pages (NX, Scudo), random layout (ASLR, probabilistic), memory tags - same shape, opposite sign (structural)
One process, an array pointer moved past its bound in a loop, in both directions: 'By excessively incrementing or decrementing an array pointer ... a buffer overflow/underflow will happen'; CHERI catches 'buffer overflows and underflows' with the same length check. - templating (structural)
One module, reused unchanged, carries the same flaw everywhere: library functions without bounds checks (gets, scanf, strcpy) sit in every C program that calls them, so the Morris worm's gets call in fingerd worked across Berkeley Unix ('If all the systems on the ARPANET ran Berkeley Unix, the virus - The carry (structural)
Overflow passed on, in its plainest form: a place that holds only so much (the buffer, 'created to be that size') passes its excess to the next place in memory, which then holds the wrong value (in the encyclopedia's example 10 bytes into 8 changes the neighbouring integer from 1979 to 25856). The s - trade one property for another (structural)
Safety bought with speed: 'tradeoffs of safety versus performance costs'; StackGuard's variants 'trade-off between penetration resistance and performance' (Canary cheap, MemGuard stronger and slower); defences spread along the dial, shadow stack ~5%, SoftBound 67%, SoftBound+CETS 116%, with adoption - who opens the door (structural)
The overflow arrives through a door the receiver opened ahead of time: a listening network service (fingerd, IIS, SQL Server's resolution service) is a port the program bound and waits on. The checks are doors installed the same way: the canary is placed by the compiler at function entry and read at - borrowed-then-held (partial)
Bounds protection for C programs was first supplied from around the program (the OS's non-executable pages 1997, the compiler's canaries 1998, the loader's randomization 2001), and is now increasingly held in the code's own language (new Android code in Rust, where memory-safety bugs need unsafe cod - holding / entrainment (partial)
The whole sets when a part dies: the operating system ends a process whose access strays (a segmentation fault 'terminates the process'), and a StackGuard-compiled program ends itself in a fail-safe state when its canary is broken. Partial: the hold is over a part's death on violation, not its clock - namespace completeness (the map predicts its gaps) (partial)
Szekeres et al.'s general attack model places each policy against the attack steps it stops and so 'identifies weaknesses of currently deployed techniques' (data-only attacks, code reuse left open). A gap filled later: NULL pointer dereferences, assumed to cause only denial of service, shown exploit - not-diluting wins (partial)
Vulnerabilities in old code decay exponentially ('They have a half-life'), while 'the vast majority of vulnerabilities reside in new or recently modified code'; so the language new code is written in comes to set the share: Android's memory-safety share fell from 76% to under 20% without rewriting t - same toolkit, independent builds (partial)
Memory tagging built twice from the same parts (a tag per memory granule, a tag in the pointer's top bits, a check on every access): SPARC ADI (64-byte granules, 4-bit tags) in hardware and AArch64 HWASAN (16-byte, 8-bit) partly in the compiler, with Arm's later MTE. Partial: the sources do not show - seed (partial)
Large code bases hold enough reusable fragments ('gadgets') for Turing-completeness, so one overflow that diverts control unpacks arbitrary computation from code already present. Partial: the combinatorics are the attacker's, unpacked from existing code; nothing new arrives with them. - symmetry breaking (name the cut) (partial)
In stored-program memory any page can hold code or data; W⊕X cuts that: 'a page can be either writable or executable, but not both'. After the cut, attacks moved from injecting code to reusing existing code, and just-in-time compilers became the hard case. Partial: the sources call it a policy, not - The Payment to Entropy (partial)
A toll on every hand-off of control: each checked function call pays a fixed 7 instructions for its canary (125% on an empty call, 1998), every load and store pays for its tag or bounds check (ASan 1.5x-3x CPU); the toll compounds with the number of calls and accesses, and its size decides which def - the whole sets the local reference (partial)
Layout randomization: the loader fixes each process's addresses at random, so every address is true only inside that process and an attack 'must tailor the exploitation attempt to the individual system, which foils the attempts of internet worms'. Partial: a local reference set by the whole, with no - Umwelt: each system carves its own slice of one shared medium (partial)
Each detector reads its own slice of the same memory: a canary sees only the word beside the return address, so it catches linear stack overflows and misses non-linear ones; ASan's redzones see the bytes beside each allocation; memory tags see every access at 16- or 64-byte granules with probability - barrier-gates-complexity (surface)
Anderson (1972) shows the without-the-check case: a monitor routine that did not check addresses let a user overlay the monitor and 'seize control of the machine'; protected memory is what lets a kernel serve many users. Surface: the without-barrier case is shown, the gain in complexity is not. - causal ceiling (surface)
Static analysis may prove a program 'safe, unsafe, or indeterminate', and 'finding and fixing all the programming bugs is infeasible'. Surface: no source read names a structural limit as opposed to a practical one. - conservation law plus closure (surface)
CETS proves temporal safety only 'if spatial safety is also enforced': one guarantee leaves a slot that a second closes (together, full memory safety at 116% overhead). Surface: two proofs joined, not a balance law. - outside-to-inside (surface)
Protection moved inward: from signature-matching packet inspection at the network perimeter ('formerly used') to compiler checks inside each program, and from software into the processor (tags, capabilities). Surface: the outside phase is not shown to come first. - runaway from an unstable balance (surface)
Worm spread through an overflow runs away exponentially (Code-Red's spread 'exponential' on a log plot; Slammer doubling every 8.5 s). Surface: no balance point is shown, only growth from a vulnerable population.
Valence: what it trades, and with whom (12) published science
Each exchange with a neighbour, read from both sides: who gains, who pays, and what carries it.
- Human (Homo sapiens) via sys:sensory-environment · Buffer overflow even
- Computer memory via sys:computer-memory · Buffer overflow gain
- Internet via sys:electromagnetic-field · Buffer overflow gain
- Operating system via sys:computer-hardware · Buffer overflow loss
- Programming language via sys:written-record · Buffer overflow mixed
- Compiler via sys:written-record · Buffer overflow loss
- Malware via sys:internet · Buffer overflow mixed
- Threat actor via sys:internet · Buffer overflow mixed
- Computer hardware via sys:electromagnetic-field · Buffer overflow loss
- Programmers and language communities via sys:written-record · Buffer overflow gain
- Software vulnerability via sys:written-record · Buffer overflow gain
- Secure software development via sys:written-record · Buffer overflow loss
Partners and parts published science
Built from / builds (3)
Sits inside / holds (2)
expressed by (21)
- Templating / Standardization
- Quality Improvement/Refinement
- Sensing/Scanning
- Active Experimentation / Probing (Optimal Experimental Design)
- Trail-Marking / Externalized Memory (Stigmergy)
- Evade Detection
- Overcome Barrier
- Speed
- Neutralize Defenses
- Subversion & Co-optation
- Leverage Host/Amplification
- Quick Harm Avoidance
- Reactive Response
- Proactive Defense
- Physical/Virtual Barrier
- Technique-Based Identification (a.k.a. Technique-Based Detection)
- Delay/Redirection Tactics
- Validation of Effectiveness
- Enclave/Segregation
- Redundancy & Diversity
- Quality Control & Error Correction
floor filled by (23)
- Human (Homo sapiens)
- Computer memory
- Software
- Internet
- Operating system
- Programming language
- Malware
- Threat actor
- Computer hardware
- Programmers and language communities
- Software vulnerability
- CVE system (Common Vulnerabilities and Exposures)
- Common Weakness Enumeration (CWE)
- Secure software development
- CERT Coordination Center
- Fuzzing
- Call stack
- Data buffer
- Integer overflow
- Stack canary (cookie)
- Memory safe language
- Heap (dynamic memory)
- Cybersecurity and Infrastructure Security Agency
represents (1)
Kinds (5)
- Memory-safety vulnerability (buffer overflow, use-after-free, dangling pointer)
- Stack buffer overflow
- Heap overflow
- Buffer underflow
- Linear (contiguous) buffer overflow
Notes published science
- A buffer overflow is the carry from school arithmetic, with nowhere to put it: a slot that holds eight bytes is handed ten, and the extra two land in the next slot over, silently changing a number there from 1979 to 25856 (src:wp:buffer-overflow). One level down the same thing happens inside the numbers themselves: an integer overflow drops the top carry, and Szekeres et al. name it as a common cause of the bad sizes that overflow buffers (src:szekeres-2013).
- The whole SQL Slammer worm was 376 bytes, one packet. In January 2003 it doubled every 8.5 seconds and reached more than 90 percent of the machines it could infect within 10 minutes, 'so quickly that human response was ineffective' (src:caida-2003-sapphire, src:moore-2003-slammer). The fix had been out for six months: Microsoft's bulletin and patch for the flaw were published on 24 July 2002, and the bulletin says that patch protects against Slammer (src:ms02-039).
- After 25 years of defences and bypasses, the number that finally moved came from changing the language, not adding a guard: Android's memory-safety share fell from 76% in 2019 to under 20% in 2025 as new code went into Rust, which Google estimates at 0.2 memory-safety vulnerabilities per million lines against about 1,000 for its C and C++ (src:google-2024-android-memsafe, src:google-2025-rust-android). Rust's first near-miss, caught before release, was itself a buffer overflow, in unsafe code.
Layers
The ways it takes in its world, where they meet, and how it acts back, each from L1 (where it meets the world) up.
buffer overflow as software-security researchers describe it: input bytes and the memory laid out to hold them, up to the fix, the defence or the attack (reader's view)
- L1: The program's memory and the data that reaches it: memory laid out as adjacent regions (stack, heap), and input bytes arriving from files, the network or other programs
- L2: The buffer: a region set aside with a fixed size, the program assuming inputs will fit
- L3: The write past the end: a copy or loop writes more than the buffer holds; nothing checks (in C and C++ the result is undefined behaviour)
- L4: Adjacent memory overwritten: neighbouring objects, heap bookkeeping, return addresses; one error can raise more
- L5: The run-time outcome: erratic behaviour, wrong results, a crash, a leak, or control taken; or the write caught by a canary, tag, capability or guard page and the program stopped
- L6: Known, classed and counted: found by fuzzing, sanitizers and analysis, recorded as CVEs and CWE kinds, tallied by vendors as memory safety (spatial and temporal); spatial flaws, overflows among them, are 40% of in-the-wild memory-safety exploits (Project Zero)
- L7: Action back on the world: code fixed, defences deployed, languages and hardware changed, roadmaps set; or the overflow used to take machines
the boardroom (shared floors)
- L4: The out-of-bounds write and what it changes: adjacent objects, heap bookkeeping or saved return addresses corrupted (a spatial memory error); one error can corrupt pointers that raise more
- L5: The run-time outcome: undefined behaviour realised as erratic behaviour, wrong results or a crash; information leaked; program state or control flow taken over; or the write caught by a check and the program stopped; control flow is not the only target: data-only attacks change a flag or a length and pass straight by defences that guard control flow (the main reason the field says mitigations are not memory safety)
- L6: Known, classed and counted: found in testing or in the wild, reported, triaged, recorded as CVE and CWE kinds, tallied as shares of all vulnerabilities, and told as the field's history (1972, 1988, 1996, 2001, 2003)
- L7: Action back on the world: the code fixed; defences deployed by compilers, operating systems and hardware; new code written in memory-safe languages; roadmaps and policy; or the overflow used to take machines (worms, privilege escalation)
way in: Attack research that answers each defence
- L1: A defence deployed: the non-executable stack (June 1997), canaries (1998), ASLR (July 2001)
- L2: A way around it described: months after the NX patch, code reuse that needs no injected code (return-into-libc); derandomization of 32-bit ASLR in about 216 s
- L3: Generalised: existing code fragments chained (return-oriented programming); information leaks defeat randomization and canaries
- L4: All deployed protections defeated in real exploits (2013)
way in: Incidents, reports and vendor tallies
- L1: Incidents seen in the wild and measured: Code-Red traced by a network telescope (359,000 hosts in 14 hours)
- L2: Reported and discussed in public: CERT/CC (1988), Bugtraq (November 1993)
- L3: Triaged by the vendor's response centre (MSRC has triaged every reported Microsoft vulnerability since 2004) and classed by root cause
- L4: Given a CVE record and a CWE kind (CWE-120 classic buffer overflow, -121 stack, -122 heap, -787 out-of-bounds write)
- L5: Aggregated into shares and ranks, each counting memory safety as a whole (spatial and temporal), not overflows alone: ~70% of Microsoft's CVEs, 70% of Chromium's severe bugs (half of them use-after-free), roughly 2/3 (CISA); the nearest figures to overflows themselves: spatial flaws 40% of in-the-wild memory-safety exploits over a decade (Project Zero), out-of-bounds write 5th of 25 and classic buffer overflow 11th (CWE 2025)
way in: Input bytes: data larger than the buffer
- L1: Bytes from files, the network or other programs; often malformed, sometimes crafted ('crafted' files)
- L2: Read into a fixed-size buffer by a network service or parser (fingerd 1988; IIS 2001; SQL Server 2003, a single packet)
- L3: Length not checked against the space set aside: the copy runs on past the end
way in: Run-time checks that watch the buffer's edge
- L1: Metadata set beside or with each buffer: a canary word next to the return address (1998), memory tags on 16- or 64-byte granules, capability bounds, guard pages around allocations
- L2: Checked at a defined moment: at function return (canary), on every load and store (tags, capabilities), on touching a guard page
- L3: Mismatch detected: with 4-bit tags a bug is caught with probability 15/16; capabilities turn most unsafe accesses into length exceptions
- L4: Signal or fault delivered: the program ends in a fail-safe state instead of yielding control
way in: Size arithmetic: integer errors feeding the index
- L1: Sizes and indexes held in fixed-width integers
- L2: Integer overflow, truncation or a signedness error gives a wrong size or index
- L3: An index the attacker controls, with the bounds check missing or incomplete, points anywhere
way in: Testing that makes overflows show
- L1: Generated test inputs (fuzzing), edge cases, and code read by static analysers
- L2: Builds instrumented to catch bad accesses during testing (AddressSanitizer: redzones, shadow memory, 1.5x-3x CPU)
- L3: Overflow triggered and reported in development; ASan has found tens of thousands of bugs
- L4: Patched before release; useful for code in development, less for unmaintained legacy code
way in: The copying code as written
- L1: Source code written in C, C++ or assembly by programmers working in a performance-oriented style
- L2: Calls to library functions without bounds checks (gets, scanf, strcpy) or loops that move a pointer without a bound
- L3: A pointer incremented or decremented past its object: overflow or underflow
way in: The language's rules about memory
- L1: The language definition: C and C++ allow pointer arithmetic on direct memory addresses with no provision for bounds checking
- L2: Writing an array beyond its bounds is undefined behaviour in the C/C++ standards
- L3: The compiled program checks nothing at run time unless asked (C++ at() checks, plain access does not); a hardened standard library adds bounds checks to standard C++ data structures (hardened libc++, 2024, 0.30% average cost) though C++ does not become fully memory-safe; memory-safe languages check or prove bounds (Java, Rust's borrow checker)
way in: What a defence costs: the performance budget
- L1: The machine's time and memory, shared between the program and its checks
- L2: Instructions added per call or per access: a canary costs a fixed 7 instructions
- L3: Measured per call: 125% on an empty function (the worst case), 69-80% on one-argument functions (1998)
- L4: Measured on benchmarks: shadow stack about 5%, SoftBound 67%, SoftBound+CETS 116%, ASan 1.5x-3x; hardware enforcement negligible
- L5: Compared with compatibility and robustness: performance and especially compatibility are the main barriers
- L6: The adoption threshold: above roughly 10% overhead, defences do not tend to be adopted in production (some say 5%)
way in: What lies next door: the memory layout
- L1: The memory layout of a program, often well defined
- L2: Neighbours of the buffer: adjacent objects, heap bookkeeping, saved return addresses
- L3: Region-specific: heap exploitation depends on the heap manager, stack exploitation on the calling convention
way out: Build bounds into the hardware
- L1: Memory tagged or bounded: an assessment found CHERI would deterministically have mitigated at least two thirds of MSRC's 2019 memory-safety issues
- L4: Checks on every access in hardware, with negligible overhead
- L6: Instruction-set extensions: capabilities replace plain pointers; tags in pointer top bits
- L7: Vendors and researchers decide to put checks in silicon: memory tagging (SPARC ADI, Arm), CHERI capabilities, hardware shadow stacks (Intel CET)
way out: Crash: the process ended
- L1: The process terminated; for a remote service, a denial of service
- L3: The operating system raises a segmentation fault
- L5: Erratic behaviour or a detected violation
way out: Deploy defences in compilers and operating systems
- L1: Memory pages marked writable or executable, not both; addresses randomized
- L3: Binaries built with checks and loaded at random addresses
- L5: Compiler and kernel features: StackGuard and ProPolice gcc patches, W^X, PaX, Exec Shield, Data Execution Prevention
- L7: Decision to harden: canaries, non-executable pages, layout randomization, chosen under the ~10% overhead budget
way out: Fix the code
- L1: The code on the machines changed, or not
- L3: Installed, slowly: patching rose from 32% to 64% only after the worm came back on 1 August
- L5: Patch released: Code-Red's IIS flaw patched eight days after disclosure (26 June 2001, per Moore et al.); the vendor bulletin is dated 18 June 2001 with patch downloads, and a patch for all Windows 2000 builds came 21 August (contention C-3825)
- L7: Decision to fix the flaw: replace an unchecked copy with a bounded one (strlcpy takes the buffer's capacity)
way out: Use: take the machine
- L1: Hosts infected: over 90% of vulnerable hosts in 10 minutes (Slammer); 359,000 in 14 hours (Code-Red)
- L3: Self-copying worms: Morris (1988), Code-Red (2001), Slammer (2003, 376 bytes, doubling every 8.5 s)
- L5: Privilege escalation through buffers in operating-system code
- L7: An attacker's or worm author's aim: control of hosts (and, for console owners, running their own software)
way out: Write new code in memory-safe languages
- L1: Fewer overflows in the shipped code: Android's memory-safety share 76% (2019), 24% (2024), under 20% (2025)
- L3: Compiler-enforced bounds and borrowing; memory-safety bugs need unsafe code
- L5: New code in Rust, Java, Kotlin; old C/C++ left to age, since vulnerabilities decay with code age
- L7: Roadmaps and decisions: governments urge manufacturers to prioritize memory safe languages and publish roadmaps (December 2023, February 2024)