Incident Library

IL-0509 SourceHut · 2024-01-10networkingsecurity

SourceHut was down for 170 hours after a DDoS led its upstream network to null-route the PHL datacenter's subnet

SourceHut runs its own servers in colocation at three datacenters: PHL, the primary; FRE, used for off-site backups, including a Postgres standby replicated in real time and daily backups of large data such as git.sr.ht; and AMS, a research installation for a planned migration to the EU, provisioned to run most of a SourceHut installation. In PHL, SourceHut rented network service from its colocation provider, which provisioned a subnet out of its own AS and routed it through Cogent and Level 3. In response to a layer 3 DDoS attack that began at about 06:00 UTC on 10 January 2024, Cogent null-routed SourceHut's downstream AS. Service mostly returned by 18:00 UTC after the null route was narrowed to the one targeted /32, but the attack broadened the next morning and the colocation provider null-routed the whole subnet again. The write-up says the upstream network's response did more damage to SourceHut's infrastructure than anything else.

At 09:00 UTC on 11 January SourceHut decided to migrate to AMS in an emergency and restore from backups. The standby database was less than 30 seconds behind production and large storage backups were no more than 12 hours old. The team built a new SourceHut installation from scratch: it moved DNS to an external provider, brought up a new primary database, restored backups from FRE to AMS, applied the difference between production data and the last backups by hand, provisioned a new mail system, and brought services up as their restores finished. A layer 3 attack can only be absorbed with more bandwidth than the attacker or filtered far enough upstream, and many DDoS protection services only cover web traffic, while SourceHut also serves SSH, SMTP and IRC and terminates end-to-end encryption on its own servers. Cloudflare's quote was beyond SourceHut's means, so the team set up an OVH box that NATs traffic through OVH's DDoS-resistant network to a production subnet in AMS kept secret. From 12 January a temporary subnet from the PHL provider gave out-of-band access to the PHL servers.

Services came back in stages. paste and the project hub, which need only a working SQL server, returned at about 19:00 UTC on 11 January; git.sr.ht came back read-only from somewhat stale backups by 20:00 UTC and read/write at 11:00 UTC on 13 January; hg.sr.ht at 08:20 UTC on 15 January; builds.sr.ht at 18:00 UTC on 16 January on dedicated OVH bare-metal servers, because AMS lacked compute; and chat.sr.ht, which needs a separate IPv6 address per user for outbound IRC connections, last at 10:30 UTC on 17 January. pages.sr.ht used S3-compatible object storage that the off-site backups did not cover, so it ran over an out-of-band link to PHL while the slow object storage migration continued, and users whose apex records pointed directly at the PHL subnet had to change them. The outage lasted 170 hours.

Severity
–
Scope
All SourceHut services; partial service returned from 12 January and full service on 17 January, and pages.sr.ht users with apex records on the PHL subnet had to update them
Users affected
all SourceHut users; paying users were credited 7 days of free service
Region
PHL datacenter
Time to detect
0m
Time to resolve
170h

Symptoms

At about 06:00 UTC on 10 January 2024, SourceHut's monitoring raised the alarm as a layer 3 DDoS attack hit its infrastructure in the PHL datacenter, and at about 09:00 UTC SourceHut lost all access to its PHL network. PHL was the primary datacenter, and the network became unreachable for SourceHut staff and the general public alike.

The PHL network was unreachable because Cogent, one of the two carriers through which the colocation provider routed SourceHut's subnet, announced null routes for SourceHut's downstream AS. SourceHut could not mitigate a layer 3 attack without its network provider, but the ticketing portal it used to page the provider had been deprecated after the provider was acquired twice, and SourceHut's account had not been moved to the new system. The provider could not be reached until its office hours began at 14:00 UTC.

Once reached, the provider got Cogent to narrow the null route from SourceHut's entire /24 to the single /32 address being targeted, and service was mostly back by 18:00 UTC. At about 06:30 UTC the next morning the attack escalated to other parts of the PHL subnet, the colocation provider null-routed the subnet again, and it stayed unreachable from then on.

The attacker targeted SourceHut specifically and followed it, moving the attack to new infrastructure as it was being set up. When SourceHut first NAT'd all traffic from an OVH box through to AMS, the attack on the OVH infrastructure was briefly forwarded to AMS before OVH's mitigations started, which made the new OVH account look like the source of an outgoing DDoS and took some work to resolve with OVH.

Symptom Network unreachableService outage

Root cause

Trigger
A layer 3 DDoS attack against SourceHut's PHL infrastructure that began at about 06:00 UTC on 10 January 2024 and broadened to more of the PHL subnet on 11 January.

Detection

SourceHut's monitoring systems noticed that something was wrong and raised the alarm from about 06:00 UTC on 10 January.

Remediation

Action items

Lessons

The operational plans SourceHut kept for failures up to the loss of a whole datacenter proved important in this incident. The incident exposed a known shortcoming in redundancy and resilience that the team was working on but had not finished, and the response of the upstream network to the attack did more damage than anything else.

Sources

Related cases

Check your cluster for this

kubegap audits a Kubernetes cluster for conditions like the ones in this case, ISP and transit networks, BGP routing among them, read-only, from Claude Code or Codex. Its checks cite public reports like this one.

For AI tools and scripts

The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.