CrowdStrike Falcon outage
How one faulty content update crashed 8.5 million Windows PCs
On 19 July 2024 a routine update to CrowdStrike's Falcon sensor sent Windows machines worldwide into a crash loop. No attacker was involved: a template expected 21 inputs and the code supplied 20.
- Date
- 19 July 2024
- Type
- Faulty update
- Devices affected
- About 8.5 million
- Read time
- 9 minutes
- New template typeFebruary 2024: a template that defines 21 inputs ships, but the sensor code supplies 20.
- Faulty content fileChannel File 291 adds a rule that checks the 21st input for the first time.
- Pushed to every sensor04:09 UTC, 19 July: the file reaches every Windows host online.
- Read past the endThe sensor reads memory that doesn't exist, inside the Windows kernel.
- 8.5 million PCs crashMachines crash and restart into the same crash.
In plain terms
On Friday 19 July 2024, Windows computers around the world showed a blue error screen and restarted, then did it again. Airlines grounded flights, hospitals postponed appointments, banks and broadcasters lost systems for hours.
It wasn't a hack. The affected computers ran CrowdStrike Falcon, security software that works deep inside Windows, in the , so it can see attacks as they happen. CrowdStrike sends Falcon small instruction files many times a day to teach it about new attack techniques.
One of those files asked Falcon to check a 21st piece of information. Falcon's code only ever handed over 20. When it went to read the 21st, it reached for memory that wasn't there. A normal app would just close; because Falcon runs inside the kernel, the whole computer crashed. Falcon loads early when Windows starts, so the computer crashed again on every restart.
CrowdStrike withdrew the file after 78 minutes. But a crashed computer can't download a fix, so many machines had to be repaired one at a time, often by someone standing in front of them.
The deep analysis follows: what happened, root cause, mitigation and prevention.
What happened
Falcon on Windows is built from two kinds of content. Sensor Content ships with the sensor itself and includes Template Types: code that knows how to look for a family of behaviour. Rapid Response Content is delivered separately and often, as configuration files called channel files. It contains Template Instances: specific patterns for the sensor to match against those Template Types.
- Sensor version 7.11 introduces a new IPC Template Type for detecting attacks that abuse Windows named pipes. It defines 21 input fields. The sensor code that feeds it supplies only 20.
- Several IPC Template Instances are deployed without trouble. None of them examines the 21st field: each uses a wildcard there, which matches anything without reading it.
- Channel File 291 delivers two new IPC Template Instances. One uses a specific, non-wildcard value in the 21st field. The Content Validator passes it. Windows hosts running sensor 7.11 or later that are online receive it within minutes.
- CrowdStrike reverts the channel file (all times UTC). Hosts that come online after this point are not affected.
- Microsoft estimates that about 8.5 million Windows devices were affected, under one per cent of all Windows machines. Mac and Linux hosts were not affected.
- CrowdStrike publishes its root cause analysis of Channel File 291.
Root cause
The crash was an in the Content Interpreter, the part of the sensor that evaluates Template Instances. Asked to compare the 21st input, it read past the end of an array holding 20 values. Several separate safeguards each had a gap, and the gaps lined up:
The mismatch was never exercised
The IPC Template Type promised 21 inputs while the integration code supplied 20. Every Template Instance before 19 July used a wildcard for the 21st field, so the interpreter never actually read it. Testing of the Template Type passed for the same reason: the test instances also never touched the missing field.
The validator checked the wrong thing
The Content Validator checked new Template Instances against what the Template Type declared (21 fields), not against what the sensor really supplied (20). A rule touching field 21 looked valid.
No runtime bounds check
The Content Interpreter did not check that the field it was asked to read existed before reading it. CrowdStrike has since added bounds checking, and a check on the number of inputs at compile time.
Everyone at once, in the kernel
Rapid Response Content was treated as configuration, so it was sent to every eligible host at the same time rather than in stages. Customers who pinned their sensor to an older version (N-1 or N-2) were still affected, because those policies controlled sensor versions, not channel files. And because the fault was in a kernel driver that loads at boot, the result was a crash loop rather than one failed app.
Mitigation
Once the file was reverted the problem stopped spreading, but crashed machines needed hands-on recovery. The steps CrowdStrike and Microsoft published were:
- Try restarting several times on a wired network. Some hosts picked up the reverted channel file before the sensor loaded the bad one.
- Boot into Safe Mode or the Windows Recovery Environment and delete files matching
C-00000291*.sysin%WINDIR%\System32\drivers\CrowdStrike, then restart normally. - Find BitLocker recovery keys first. Encrypted drives need the recovery key before you can reach the file. Organisations that stored keys only on servers that had also crashed had to recover those servers first.
- Recover cloud machines from another machine. For virtual machines, detach the system disk, attach it to a healthy VM, delete the file, and reattach it. Microsoft also released a USB recovery tool.
- Warn staff about scams. Phishing emails and fake "fix" sites appeared within hours. CISA urged people to use only CrowdStrike's and Microsoft's official guidance.
Prevention
If you ship software that updates itself
- Stage every kind of update. Configuration that changes code behaviour is code. Roll it out through canary rings, watching crash telemetry before each widening. CrowdStrike now does this for Rapid Response Content.
- Check bounds at runtime, especially in kernel code, where an unchecked read stops the whole machine.
- Test with real values, not just wildcards. Fuzzing the validator and the interpreter with every field filled in would have found the 21st field.
- Give customers control over when content updates land, not only sensor versions.
If you run software you don't control
- Know what runs in your kernel and how each of those products updates. Ask vendors about deployment rings, rollback and how fast they can stop a release.
- Keep recovery keys outside the blast radius. Store BitLocker keys where you can reach them when every Windows server is down.
- Practise mass recovery. Rehearse restoring hundreds of machines by hand: who has physical access, local admin credentials, and boot media.
- Plan for vendor failure, not just attackers. Business continuity plans written only for cyberattacks missed this scenario.
Sources
Change here for
-
SolarWinds
Build server breachedTargets spied on
SolarWinds SUNBURST: the signed update that carried a spy
Another trusted update, this time poisoned on purpose inside the build system.
-
xz Utils
Trust built over two yearsCaught before release
The xz backdoor: a two-year con caught by half a second of lag
A trusted maintainer slipped a backdoor into a library that SSH loads.
-
Log4Shell
Exposed onlineAttacker runs commands
Log4Shell: how one logged line of text handed over the server
A logging feature that let anyone run code on the server.