← All stories

Google pushed a routine malware-list update. One '/' entry matched every URL and flagged the whole web.

A single '/' in a blocklist made Google warn that every site on the web may harm your computer

Google's malware list matched URLs by pattern. Someone checked in '/' as an entry, which matches every URL, and the staggered rollout carried it to every search result for about 40 minutes per user.

Google· Jan 31, 2009
Impact
Between 6:30 a.m. and 7:25 a.m. PST, every Google search result carried the warning 'This site may harm your computer'; for any particular user the problem lasted approximately 40 minutes.
Stack
google-search

On the morning of Saturday, January 31, 2009, anyone who searched Google between 6:30 a.m. and 7:25 a.m. PST saw the same thing under every result: "This site may harm your computer." Not under some results. Under every one.

Marissa Mayer, then Google's VP of Search Products & User Experience, explained the cause in a post that day. Her answer to "what happened?" was "Very simply, human error." A routine update to the list of malware sites had included the URL /, and / matches every URL.

The warning was only part of the damage. Users who clicked through hit Google's warning page, which mentioned the possibility of badware and referred people to the non-profit StopBadware.org. StopBadware wrote that day that this led to a denial of service of its website as millions of Google users tried to visit it for more information.

What happened

Google flags search results with the warning when a site is known to install malicious software in the background or otherwise surreptitiously. The list of such sites is maintained through manual and automated methods, and Google updates it periodically. One of those updates went out that morning.

In Mayer's words: "the URL of '/' was mistakenly checked in as a value to the file and '/' expands to all URLs."

Google pushed list updates in a staggered, rolling fashion, so the error didn't hit everyone at the same instant. According to the revised post, errors began appearing between 6:27 a.m. and 6:40 a.m. and began disappearing between 7:10 and 7:25 a.m. For any particular user, the problem lasted approximately 40 minutes.

Google's on-call site reliability team found the problem and reverted the file.

The sources disagree on one point

The post as it stands today says Google works with StopBadware.org to come up with criteria for maintaining the list and to give webmasters a simple process for getting removed. It also carries a note that it was revised later that morning as more precise information became available.

StopBadware's blog explains why. Its update timestamped 12:31 says Google's first statement erroneously said Google gets its list of URLs from StopBadware. StopBadware stated that Google generates its own list of badware URLs and that no data it generates is supposed to affect Google's warnings. A later update says Google revised its statement to reflect that StopBadware does not provide Google's badware data. The current Google post is the corrected version, and it describes the list as Google's own, maintained by Google. The two accounts also differ slightly on scope: Google says the warning accompanied "each and every" result, while StopBadware's post, updated at 11:44, says nearly every search listing.

What the engineers believed

The update was routine. The list was updated periodically, by a mix of people and automation, and pushed out gradually. A single new entry in a list of bad sites looks like the smallest possible change: one more URL flagged, out of a very large web.

That intuition treats each entry as meaning "this one site." For most entries it does. But an entry in a list that is matched by pattern doesn't mean "this site." It means "everything this pattern matches." Whether an entry is small or huge depends on the matching rule, not on how short the entry looks. The shortest possible entry turned out to be the biggest.

What was actually going on

How a pattern list matches

Google's post doesn't describe the matching code, so what follows is the general mechanism its explanation implies.

A list of bad URLs can't just be a list of exact URLs. Malware sites have endless pages, and a site that is compromised is usually compromised under a whole path, not at one address. So lists like this are matched by prefix or pattern: an entry like example.com/downloads/ covers every URL under that path, and an entry like example.com/ covers the whole site. That flexibility is the point of the design.

Now consider an entry with no host at all, just /. If matching works by checking whether a URL's path starts with the entry, every path on every site starts with /. Mayer's description, that '/' "expands to all URLs", is exactly this: the entry was a valid pattern, and its match set was the entire web.

why one character matched everythingentry"site.com/bad/"prefix matcha few URLs flaggedentry "/"every path startswith /every URL flaggedthe entry was valid syntax; its match set was the whole web

Why the file was accepted

Nothing about / is malformed. A syntax check would pass it. The value was a legal entry in a legal format. The only thing wrong with it was its meaning, and meaning only shows up when you ask a different question: not "is this a valid entry?" but "how much does this entry match?"

That's the gap Google's follow-up names. Mayer wrote that Google would put more robust file checks in place to prevent it from happening again. The post doesn't describe those checks. The obvious shape of one, and this is interpretation, is a check on effect: an update to a malware list should flag some small fraction of URLs, and an update that would flag every URL should be rejected before it ships.

Why a staggered rollout didn't contain it

Google did push the update gradually, which is normally a safety net. Here, it changed the shape of the outage without stopping it. Errors appeared across a window from 6:27 to 6:40 a.m. as the update reached more of the system, and each user saw the problem for approximately 40 minutes.

A staged rollout only protects you if something watches each stage and stops the next one. The post doesn't say whether the rollout had automatic halting. Either way, by the time it was noticed and reverted, the update had reached everyone. An error that affects every result for every user is as visible as errors get, which suggests that what was missing was an automatic check, not the ability to see the problem.

How they fixed it

The on-call site reliability team reverted the file. Because the revert went out the same staggered way, the warnings disappeared between 7:10 and 7:25 a.m. Mayer thanked the team for finding the problem quickly and apologised to users and to site owners whose pages had been incorrectly labelled.

StopBadware, meanwhile, was dealing with the traffic. Its blog said it was working to bring its site back up, and in a later update said spot checks showed Google was still flagging known bad sites, meaning the fix had removed the false warnings without dropping the real ones.

What changed afterwards

Google's post commits to two things: careful investigation of the incident, and more robust file checks. It doesn't publish details of either, and there is no later public postmortem among these sources.

The incident also had a second-order lesson that StopBadware's blog makes visible. A warning page that tells millions of people to go to a small organisation's website turns that website into part of your failure domain. When the warning fired on everything, the traffic fired at StopBadware.

The rule

Validate data by what it does, not just by whether it parses. A blocklist entry, a routing rule, a feature-flag targeting expression or a firewall rule can each be perfectly valid and match everything. Before a list update ships, measure its blast radius against a sample of real inputs, and refuse any update that suddenly matches far more than the last one did.

Sources