The file that crashed 8.5 million Windows computers
A routine CrowdStrike configuration update, live for 78 minutes, took down about 8.5 million Windows PCs. Kernel mode, a template with 21 fields and code that supplied 20, a boot loop, and what a staged rollout changes.
8:29 video10 min read
- 2 architecture diagrams
- 1 sequence flow
- 2 code samples
- 2 interviewer follow-ups
- 3 self-checks
~8.5M
Windows devices affected, Microsoft's estimate
78 min
how long the faulty content could be received
21 vs 20
input fields defined, values supplied
On this page11 sectionsHLDLLDSenior depth
- Why a bug in kernel-mode code stops the whole machine and not one program.
- Why "it is only configuration" is a dangerous assumption when code interprets the file.
- What the 21-versus-20 mismatch was, and why months of earlier rules never triggered it.
- Why a single file deletion still took days, and what staged rollouts change.
On Friday 19 July 2024, about 8.5 million Windows computers crashed to a blue screen, and many crashed again every time they restarted. Airport boards, hospital systems, bank terminals and broadcasters were affected. It was not an attack. It was a routine update from the security company CrowdStrike: a small configuration file that could be received for 78 minutes.
Everything about CrowdStrike's internals below comes from CrowdStrike's own published analysis. Where we draw a lesson from it, we say so.
| Fact | Source |
|---|---|
| On 19 July 2024 a Rapid Response Content update, Channel File 291, was released for the Falcon sensor on Windows | CrowdStrike's preliminary post-incident review |
| Hosts running sensor 7.11 or later that were online between 04:09 and 05:27 UTC could receive it: 78 minutes | CrowdStrike |
| About 8.5 million Windows devices were affected, under 1% of all Windows machines | Microsoft's estimate, 20 July 2024 |
| The cause was a template that defined 21 input fields while the code that ran it supplied 20 values | CrowdStrike's root cause analysis, 6 August 2024 |
A small share of all Windows machines still stopped airports, hospitals and banks, because the affected machines ran critical services. Whether it was "the largest IT outage in history" depends on how you measure it, so we do not claim it.
Your computer runs code in two very different places. Ordinary programs, a browser or a music player, run in user mode. If one crashes, it closes and the rest of the machine carries on. Underneath is the kernel, the core of the operating system: it manages memory, talks to the hardware and decides what runs. Code in the kernel has no safety net below it. If it crashes, nothing is left to catch it, and the whole machine stops. That is the blue screen.
Security tools run components there on purpose. A kernel component can see processes start, files open and connections form, and malware running in user mode has a much harder time tampering with it. For a tool whose job is to catch attackers, that is a strong position, and many endpoint security products have relied on kernel-mode components. The cost is that a mistake does not crash an app. It crashes the computer.
New attacks appear every day, so a security vendor cannot wait weeks between updates. CrowdStrike ships two kinds of update. A sensor release is program code, including the part that runs in the kernel; it goes through full testing, and customers can choose to receive it later than everyone else. Rapid Response Content is configuration: small files that describe new behaviour to watch for. Code already on the machine reads the files and acts on them, so a new threat can be covered in hours without shipping a new program.
According to CrowdStrike's analysis, this content was distributed without the staged rollout rings used for sensor releases, and customers could not choose when it arrived. Our reading of the reasoning: it is only configuration, and the code that reads it has already been tested. That is the assumption to watch. Data cannot crash a program, as long as the program reads it correctly.
A template is a form with numbered boxes, and each detection rule fills in the boxes. In February 2024 a sensor release added a template type that defined 21 input fields. The code that ran these templates on each machine supplied only 20 values. Box 21 existed on the form and had nothing behind it.
For months nobody noticed, because earlier rules put a wildcard in field 21, and a wildcard never reads the value. On 19 July two new rules shipped. One had a concrete criterion in field 21. For the first time the interpreter reached for a 21st value that did not exist: an out-of-bounds read, in kernel mode, which crashed Windows. The Content Validator that checks files before release had a logic error of its own, so the file passed, and CrowdStrike's own testing had used wildcards in that field too.
In our reading, the third decision is the subtle one: the file was tested on its own, not together with the code that would run it.
CrowdStrike pulled the file after 78 minutes. For most bugs that would be the end: machines download the fix and carry on. Here, the crash happened before many machines could download the corrected content. The driver loads very early at startup, because security software must be running before anything else, and when it loads it reads its content files, including Channel File 291. So the machine starts, reads the file, crashes, restarts, reads the file and crashes again.
Some machines recovered or received the fix through other paths. Many did not, and the recovery was manual. CrowdStrike's guidance, matched by Microsoft's support articles, was to boot into Safe Mode or the Windows Recovery Environment, delete the files matching C-00000291*.sys in the CrowdStrike drivers folder, and restart. On disks encrypted with BitLocker that could mean finding a recovery key first. The fix was one file deletion, done by hand, one machine at a time. How long full recovery took is widely reported as days and in places weeks, but that figure is press reporting, not from CrowdStrike's two primary documents.
CrowdStrike published its own list of changes it committed to. We have not independently confirmed which are in place today.
- Staged rollout. Send content out in rings: a small canary group first, then a larger one, then everyone, with a health check between each. As an illustration only, a 1% ring of 8.5 million machines is about 85,000. Still terrible, but if monitoring caught the failures the rollout could stop before it reached the rest.
- Customer control over when content arrives, as there already was for sensor releases.
- Validate against the consumer. A validator that rejects a rule asking for more fields than the code supplies, plus a runtime bounds check in the interpreter.
- More testing, including fuzzing: throwing strange and broken inputs at the code on purpose.
The biggest structural change may not be CrowdStrike's. Microsoft has said it is working on Windows changes so security tools can do more of their work outside the kernel, which shrinks the blast radius of a fault. We could not confirm its current availability from Microsoft's own pages while writing, so check Microsoft's latest status before relying on it.
C# arrays are bounds-checked, so the equivalent bug throws an IndexOutOfRangeException instead of reading stray memory. That is a safety net, but an unhandled exception inside a critical component is still an outage. The defence is the same in any language: the interpreter checks what a rule needs against what the code supplies, and refuses instead of guessing. A wildcard reads nothing, so it is always safe; a concrete criterion needs a value that must exist.
public enum MatchResult { Match, NoMatch, Invalid }
public static class Interpreter
{
/// <summary>Evaluate a rule's criteria against the values the sensor supplies. "*" matches anything and reads nothing.</summary>
public static MatchResult Evaluate(string[] criteria, string[] values)
{
for (int i = 0; i < criteria.Length; i++)
{
if (criteria[i] == "*") continue; // a wildcard never touches the value
if (i >= values.Length) return MatchResult.Invalid; // the rule asks for a value that was never supplied
if (criteria[i] != values[i]) return MatchResult.NoMatch;
}
return MatchResult.Match;
}
}The test reproduces the incident's shape: 20 values supplied, rules with 21 criteria.
using System;
using System.Diagnostics;
using System.Linq;
string[] values = Enumerable.Range(1, 20).Select(i => $"v{i}").ToArray(); // twenty values are supplied
string[] Rule(string field21) // a rule with twenty-one criteria
{
string[] criteria = Enumerable.Repeat("*", 21).ToArray();
criteria[0] = "v1";
criteria[20] = field21;
return criteria;
}
Debug.Assert(Interpreter.Evaluate(Rule("*"), values) == MatchResult.Match); // months of rules: a wildcard in field 21
string[] other = (string[])values.Clone();
other[0] = "something-else";
Debug.Assert(Interpreter.Evaluate(Rule("*"), other) == MatchResult.NoMatch); // still evaluated normally
Debug.Assert(Interpreter.Evaluate(Rule("x"), values) == MatchResult.Invalid); // 19 July: a concrete value in field 21Invalid is the important result. A rule that cannot be evaluated should be skipped and reported, so a bad rule disables itself instead of the machine it runs on.
Interviewer follow-upL6Why not simply test every content file against the real sensor before shipping?How to answer
You should, and that is what validating against the consumer means: run the file through the same interpreter code that will run on customers' machines, with inputs that exercise every field. CrowdStrike committed to more testing, including fuzzing. But testing lowers the chance of a bad change; it does not remove it. So you also need the second defence, a rollout that is small first, watched, and able to stop. Together they bound the damage.
Interviewer follow-upL7Your service reads configuration that changes at runtime. How do you make a bad config unable to take it down?How to answer
Treat config as untrusted input to the code that reads it. Validate on load against what the code supports, and check bounds at runtime. Keep the last known good version and fall back to it when a new one fails to load. Roll config out in rings with an automatic halt on error rate, keep a kill switch that does not depend on the component that might be broken, and test the loader with malformed files. A bad config should disable itself, not its host.
QuestionWhy did a bug in this software crash the whole computer rather than one program?Reveal answer
It ran in the kernel, which has no safety net below it. An out-of-bounds read there cannot be caught by anything underneath, so the operating system stops. The same bug in a user-mode program would have closed that program only.
QuestionWhy did months of earlier rules work when the code supplied 20 values and the template defined 21?Reveal answer
Those rules put a wildcard in field 21, and a wildcard never reads the value, so the missing 21st value was never touched. The first rule with a concrete criterion in field 21 exposed the mismatch.
QuestionWhy did rebooting make things worse, and what actually fixed a stuck machine?Reveal answer
The driver loads very early and reads the content file on every start, so the machine crashed again before it could download the corrected content. The fix was to boot into Safe Mode or the recovery environment, delete the faulty file, and restart, sometimes after entering a BitLocker recovery key.
The same ideas show up in load balancing, where health checks and draining let you take a bad server out of rotation, and in consistency and availability, where the blast radius of a failure is a design choice. Safe deployment is also one of the five pillars in the Microsoft system design guide.
- CrowdStrike, External Technical Root Cause Analysis: Channel File 291 (opens in a new tab) (6 August 2024).
- CrowdStrike, Falcon Content Update Preliminary Post Incident Report (opens in a new tab) (July 2024).
- Microsoft, Helping our customers through the CrowdStrike outage (opens in a new tab) (20 July 2024): the 8.5 million estimate. Also reported by TechCrunch (opens in a new tab).
- TechTarget, CrowdStrike details errors that led to mass IT outage (opens in a new tab).
- Recovery steps: CrowdStrike's statement on the Falcon content update for Windows hosts, and Microsoft support article KB5042421.
Spot a mistake, or have a question?
Accuracy matters here. Tell me what looks wrong or unclear and I will fix it and credit you.