Re:SHA-1 'fully and practically broken' by new collision (2020)
by ori_b on Tuesday October 12, 2021 @09:26PM
(#28847183)
The correctness of git is based on hashes not colliding within a repo.
This just means GitHub may need to give up on a cost saving measure like dedup between forks It's a GitHub issue, not a git issue.
They might, for example, compute a collision, commit the malicious version to a private GitHub repository, and then send you a patch with the non-malicious version via email, or by sending you a merge request on GitLab. When you accept and merge in their changes and then push to GitHub, perhaps GitHub will recognize the hash of one of your blobs as a hash that it already knows the blob for (from the private commit), and so it will ignore whatever data you send it for that blob.
Maybe that particular scenario won't work — I haven't tried it — but there are hundreds of possible angles of attack. Fundamentally the security of Git is based on the idea that hashes don't collide.