Postmortem Index

Explore incident reports from various companies

Subversion SHA1 Collision Affects WebKit Repository

WebKit code repository · Subversion

The WebKit Subversion repository experienced an incident in late February 2017 when a user committed two files with different content but identical SHA1 hashes. This SHA1 collision led to unexpected behavior and data corruption within the repository.

The root cause was Subversion’s “Representation Sharing” feature, introduced in version 1.6. This feature uses SHA1 hashes to deduplicate file content. When the two colliding files were committed, the system, encountering the same hash, stored only a pointer for the second file, effectively replacing its content with a reference to the first.

Customer impact included “Checksum mismatch” errors for users attempting to checkout or update the affected file, rendering it inaccessible. Tools like svnsync and git-svn also failed when encountering the corrupted revision during transaction history replay.

Remediation options considered included disabling the representation sharing feature, implementing pre-commit hooks to block known colliding files, or deleting the problematic file from the HEAD revision. The WebKit repository specifically implemented a Subversion permission rule (authz) to block access to the affected files, providing a robust long-term solution and enabling potential migration.

Keywords

webkitsubversionsha1collisionrepositorydeduplicationchecksum mismatchrepresentation sharingdata corruption