AlgoViz

The CrowdStrike outage of 2024

medium 30 min

On July 19, 2024 a content update for the CrowdStrike Falcon sensor asked a kernel driver to read a 21st input from a list of 20.

Video lesson · Chapter 1 of 5

A rollback with two clocks

0:00 / 3:41

The 21st input in 75 seconds

1:15Reel coming soon

Theory

Read or listen first. About 2 min.

What it is

CrowdStrike Falcon is security software. A part called the sensor runs on each computer and watches for signs of an attack. On Windows the sensor uses a kernel driver: code that runs inside the operating system itself, where one invalid memory read stops the whole computer.

Attack methods change daily, so the sensor receives small data files, called channel files, several times a day. On July 19, 2024 a new version of channel file 291 met a mistake that had been waiting in the sensor since February. The file told the sensor to compare a 21st input. The sensor had only 20.

This page follows CrowdStrike's own root cause analysis. Where we add an idea of our own, we say so.

Why it exists

It is worth studying because no single part was careless on its own. There were tests, a validator and months of successful updates. Every one of them looked at the same wrong number, 21, or used data that never touched the last field.

It also teaches a rule that applies to every system you will design: data that changes behaviour deserves the same gradual release as code. A staged release does not remove the bug. It decides whether the bug meets a few machines or all of them.

And it shows the difference between stopping a fault and recovering from it. Stopping took 78 minutes. Recovery took days, because a computer that crashes while starting cannot be repaired over the network.

A short history

  1. February 28, 2024

    Sensor 7.11 becomes generally available with the new IPC Template Type, which is defined with 21 fields while the sensor code supplies 20.

  2. March 5, 2024

    The stress test passes and the first content for channel file 291 goes to production. Three more follow between April 8 and April 24. All of them work.

  3. July 19, 2024

    Two more template instances are released at 04:09 UTC. One of them inspects the 21st field. The file is reverted at 05:27 UTC.

  4. July 20, 2024

    Microsoft estimates 8.5 million affected Windows devices, less than one percent of all Windows machines.

  5. July 29, 2024

    About 99% of Windows sensors are online again, compared with the week before.

  6. August 6, 2024

    CrowdStrike publishes the full root cause analysis with six findings.

Words to know

Sensor
The Falcon program on each computer. It is released like normal software, in stages.
Channel file
A data file that the cloud sends to the sensor. Number 291 carries the named pipe rules.
Template Type
A capability compiled into the sensor, with a fixed list of input fields.
Template Instance
One rule for a Template Type: what each field must match.
Content Interpreter
The sensor code that compares inputs with the rule.
Content Validator
The cloud program that checks a channel file before release.
Wildcard
A rule that accepts anything, so nothing has to be read.
Out-of-bounds read
Reading memory beyond the end of a list.

How it works

Step through the idea, or press Play.

Step 1 of 3

A hidden mismatch. The rule format has 21 fields, the sensor fills 20

Understand it

Start here

The recipe with a 21st box

A chain of bakeries sends its recipe cards from one office. Follow one card before we look at the computers.

A card that asked for too much
21 boxesRECIPEANY20 jarsON

The card was not code. It still decided what every oven did.

What happened

The timeline

From the first release to the report

When (UTC)What happened
Feb 28Sensor 7.11 generally available, with the IPC Template Type
Mar 5Stress test passes; first instance in production
Apr 8 to Apr 24Three more instances; all work
Jul 19, 04:09Two more instances released; crashes begin
Jul 19, 05:27Content reverted; new downloads are safe
Jul 20Microsoft estimates 8.5 million devices
Jul 23Bad file put on the cloud known-bad list in US-1, US-2 and EU; some looping machines can now heal
Jul 25, 00:00More than 97% of Windows sensors online
Jul 25Bounds check added to the interpreter
Jul 27Build-time field count check in production
Jul 30, 00:00About 99% online
Aug 6Full root cause analysis
All in 2024. The 97% and 99% marks were published as July 24 and July 29, 5 p.m. Pacific.

How long the window was open

05:27−04:09=78 minutes05{:}27 - 04{:}09 = 78\ \text{minutes}
Windows hosts with sensor 7.11 or newer that were online in these 78 minutes and received the file were at risk. Hosts that came online later were not. Mac and Linux hosts were not affected.

How it works

Two kinds of content

Falcon receives new knowledge in two ways. They differ in speed, and in July 2024 they also differed in how carefully they were released.

Sensor ContentRapid Response Content
What it isCode, models, Template TypesRules as data: Template Instances
How it arrivesWith a new sensor versionFrom the cloud, as channel files
How oftenPer sensor releaseSeveral times a day
Tests beforeUnit, integration, performance, stressThe Content Validator
Release beforeStaged: own machines, early adopters, allTo all, no rings
Customer choice beforeNewest, one or two versions behindNone
From the preliminary review of July 24, 2024. The last three rows are the gap.

From a rule to a kernel driver

In the CrowdStrike cloud a detection engineer uses the Content Configuration System, whose Content Validator checks a template instance and publishes channel file 291. On one Windows machine the sensor driver inside the kernel holds the Content Interpreter, which reads the channel file from disk.
The thick box is one Windows machine. The rule crosses from the cloud into the most privileged part of it.

One update on its way

The crash came at the next named pipe event, not at the moment of download.

The bug

20 inputs, 21 fields

The report shows the memory of a crashed machine. The interpreter had an array of 20 pointers. The rule selected index 0x14, which is 20 in decimal, so the 21st entry. What lay there was not a pointer to valid memory. Windows stopped with PAGE_FAULT_IN_NONPAGED_AREA in csagent.sys.

Text
inputs  = 20 pointers          index 0 .. 19rule    = compare index 20    (the 21st)check   = noneresult  = read beyond the array, follow an invalid pointer
A sketch of the report's analysis, not the product's source.

Counting from zero

0x14=1×16+4=20valid indexes: 0…190x14 = 1 \times 16 + 4 = 20 \qquad \text{valid indexes: } 0 \ldots 19
An array of 20 ends at index 19. One comparison, index smaller than length, would have caught it.

Why it stayed hidden

The bug was in the path that no test and no earlier rule had taken.

Six findings

Every layer, and the hole in it

LayerWhat was missingWhat changed
BuildField count not compared with inputsCompiler check, July 27
Run timeNo bounds checkCheck added July 25
Feature tests12 static cases, wildcard in field 21A real value for every field
ValidatorTrusted the number 21Refuse more fields than inputs
Instance testsOnly the first instance of a type was stress testedEvery instance tested
DeploymentNo staged releaseCanary, rings, bake time, rollback
The six findings of the root cause analysis. The bounds check and the corrected count were also sent to older sensors, 7.11 and up.
  • Same wrong source

    Type definition and validator shared one number. A check that reads the same source as the code cannot find that the source is wrong.

  • Success is not coverage

    Four good releases proved only that the wildcard path works.

  • No limit on reach

    Without rings, the number of victims is the number of machines online.

  • No way back

    A revert helps machines that can download it. A machine in a crash loop often cannot.

The kernel

Why one read stops a computer

A normal program that reads invalid memory is closed by the operating system. The kernel has nobody above it. If it continued with damaged state it could write wrong data to disk, so Windows stops on purpose and shows a blue screen.

Two zones in one machine

One Windows machine. User mode holds a browser and an office program: a crash there closes one program. Kernel mode holds the Windows kernel and the Falcon driver csagent.sys: a crash there stops the whole machine.
User mode is the zone where a failure stays small. Kernel mode is the zone where it does not.

What the kernel gives a security product

  • It sees process starts and file writes everywhere
  • It can block them while they happen
  • It loads early, before programs of an attacker

What it costs

  • A read error stops the machine
  • Loading early also means crashing early
  • The driver is hard to repair from outside

CrowdStrike writes that it moves work to user space as Windows adds support, and that much of that support is still missing. A design rule follows (ours): keep the privileged part small and dull, and interpret complicated rules where a crash is survivable.

Recovery

Why the revert was not enough

One machine after 05:27 UTC

Restarting worked for some machines. The advice was a cable, because a wired network is up sooner than Wi-Fi.

The official ways back

  1. 1

    Restart, with a network cable

    The machine may fetch the reverted file before it crashes again.

  2. 2

    Boot a recovery image

    CrowdStrike described bootable images, and Microsoft released a USB recovery tool.

  3. 3

    Repair by hand

    Start in Safe Mode, go to the CrowdStrike folder under System32 drivers, delete the files whose name begins with C-00000291, restart. A BitLocker disk asks for its recovery key first.

  4. 4

    Repair a virtual machine from outside

    Take a snapshot of the system disk, attach it to a healthy machine, delete the file, attach it again. Or go back to a snapshot from before 04:09 UTC.

What hand repair costs (our example)

10,000 machines×15 min50 people=3,000 min=50 hours each\frac{10{,}000\ \text{machines} \times 15\ \text{min}}{50\ \text{people}} = 3{,}000\ \text{min} = 50\ \text{hours each}
Assumed numbers. The work grows with the count of machines, and the count was decided by the release method.

Impact

What we can say, and what we leave out

Microsoft's estimate of 8.5 million devices is less than one percent of all Windows machines. They were concentrated in organisations that run many services people depend on, so few machines caused wide trouble. News reports named airlines, hospitals, banks, broadcasters and emergency lines in several countries. Money totals, cancelled flights and lawsuits are not in the company's report, so this page does not give figures for them.

The repair

The design after the outage

Content release with rings

Canary, successive rings, bake time with telemetry and rollback are from the report. The number of rings here is an example.

What to copy into your own designs

  1. 1

    One schema, checked at build time

    Generate the reader and the validator from one definition, and compare that definition with the code that supplies the values.

  2. 2

    A reader that distrusts its input

    Check length and index. On a bad rule: skip the rule, keep the last good set, report.

  3. 3

    Test with the real reader

    Run every new file through the program that will read it in production, with values that use every field.

  4. 4

    Rings and bake time

    A small share first, wait for crash and health signals, then widen. Silence from machines is also a signal.

  5. 5

    A way back without the network

    Our suggestion: count crashes at start. After two, load the last good content or none.

  6. 6

    Choice for the customer

    Critical machines can stay a ring behind. Falcon now offers control over where and when content arrives.

For the people who run machines

  • Recovery keys reachable when the main systems are down
  • Recovery media and steps tested before
  • Critical machines in a later ring
  • A plan for the case that many machines fail together

For vendors: avoid

  • One release step for the whole fleet
  • Treating data as harmless
  • A validator that shares the code's assumptions
  • Counting on the network for rollback

Related ideas with their own pages: failure models, operability, resilience and high availability. For the same lesson with a policy record instead of a channel file, read the Google Cloud outage of 2025.

Summary

The whole topic in one minute.

A definition said 21 inputs, the code supplied 20, and for months every rule used a wildcard for the last one. The first rule that really read it made a kernel driver read invalid memory. Because the update went to all online sensors in the same period, the first real test was everywhere.

The report names six findings: no check of the field count when the sensor is built, no bounds check at run time, tests that always used a wildcard in the last field, a validator that trusted the same wrong number, no test of each instance in the real interpreter, and no staged deployment for content.

The lesson for your designs: release data like code, let the reader protect itself, test what you ship with the program that will read it, and make sure a machine can come back without a person in front of it.

  • The definition had 21 fields, the code supplied 20, and wildcards hid it from February to July.
  • A missing bounds check in a kernel driver turned a bad index into a stopped machine.
  • The revert took 78 minutes; about 99% of sensors were back on July 29.
  • Content reached all online sensors without rings, so the bug met everyone.
  • Release data like code, test with the real reader, and plan a return that needs no network.

Sources