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.

See it run

Replay the failure, then the repaired design, one step at a time.

Operations

Replay the failure

The path of one rule on July 19, 2024, as the root cause analysis describes it.

Step 1 of 8

A new rule

Engineerfield 21: textValidatorCloud releaseChannel file 291InterpreterWindows kernel

An engineer writes two template instances for named pipes. One has a real value in field 21.

Step 1: A new rule

rule = new_rule()validator.check(rule, fields=21)      # trusts the definitioncloud.publish(rule, to="everyone")    # no rings# on each machine, at the next pipe event:value = inputs[20]                    # only 0..19 existcompare(value, rule.field21)
Limits
Nothing
Costs
8.5 million devices, estimate

Follow the number 21. It is written in the definition and in the validator, but not in the code that supplies the values.

In the real world

The same the crowdstrike outage of 2024 doing real jobs. Pick one and step through it.

A million machines, our example numbers.

Step 1 of 2

Publish

New ruleReal interpreterCanaryunusedRing 1unusedEveryone100%Health gate

The rule goes to 100% at once.

Step 1: Publish

Common mistakes

The bugs interviewers watch for, with the fix beside each.

  • One push for data

    critical

    Data decides what the code does. Without rings a bad file reaches everyone.

    Wrong
    publish(rule, to="everyone")
    Right
    for ring in rings:    publish(rule, to=ring)    if not healthy(ring): rollback(); break
  • A validator with the same assumption

    critical

    It agreed with the definition. The definition was wrong.

    Wrong
    assert len(rule) == DEFINED       # 21
    Right
    assert used_fields(rule) <= SUPPLIED   # 20
  • Tests that use only wildcards

    major

    A wildcard never reads the field, so the field is not tested.

    Wrong
    rule = [ANY] * 21
    Right
    for i in range(21):    test([ANY] * i + ["x"] + [ANY] * (20 - i))
  • Rollback that needs the network

    major

    A machine that crashes at start may never download the fix.

    Wrong
    on_boot: load(newest)
    Right
    on_boot: load(previous if failed_starts >= 2 else newest)

Interview tips

  • How to explain it

    • 21 fields defined, 20 inputs supplied.
    • A wildcard hid it until July 19.
    • Kernel read error, blue screen, boot loop.
  • Reach, read, return

    • Reach: rings and bake time.
    • Read: check count and index.
    • Return: a way back without the network.
  • Numbers worth knowing

    • 78 minutes from release to revert.
    • 8.5 million devices, Microsoft's estimate.
    • About 99% back by July 29.
  • Do not say

    • The file was corrupt.
    • The driver was updated.
    • One test would not have mattered.