|
|
|
|
|
by peff
2938 days ago
|
|
A few important points that aren't mentioned in the post: - you have to tell git to use submodules for this to trigger (so `clone --recurse-submodules` or a manual `git submodule update --init`) - credit for discovery goes to Etienne Stalmans, who reported it to GitHub's bug bounty program - most major hosters should prevent malicious repositories from being pushed up. This is actually where most of the work went. The fix itself was pretty trivial, but detection during push required a lot of refactoring. And involved many projects: I wrote the patches for Git itself, but others worked on libgit2, JGit, and VSTS. |
|
The protection in v2.17.1 only gets enabled by default if you're checking out a repository yourself, not if you're merely fetching and re-serving git objects[1].
Turning on receive.fsckObjects as the official v2.17.1 release notes suggest is not sufficient to protect against this attack. It needs to be transfer.fsckObjects, which also turns on fetch.fsckObjects, which is what's needed here.
1. https://public-inbox.org/git/20180529211950.26896-1-avarab@g...