Open fweimer opened 9 years ago
This is a valid concern, although I think were there any client side exploits in git, it'd be a rather bad thing in general, not just for git-evtag - and thus worth securing git in general.
Worth noting there are two git implementations in play (the original and libgit2, which git-evtag uses).
Without actually looking, I suspect the most risk is malicious pack files and the client-server protocol code.
Risk here could be mitigated by fetching the tag, then verifying the signature on it, before fetching anything else.
There is also another set of problems related to git note
and git replace
. Something might alter the meaning of a repository in ways that are not covered by the signature.
I could imagine something like a release-engineering tool looking at git notes for something like changelog information. But using notes as inputs to software builds or anything like I would say is very much a case of "don't do that".
I was completely unaware of git replace
. That's scary. I will investigate it more in a separate issue.
With the current design, it is necessary to use Git to clone the repository and use Git to walk the trees. This means that Git is exposed to untrusted data before the signature is verified, making it part of the TCB. This is not desirable because Git is quite large.
At least, the recommended steps should verify the signature before a checkout is performed (which is probably the most risky operation because it involves partially attacker-controlled file system operations).