Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

config: modules, worktree: Submodule fixes for CVE-2018-11235 #848

Merged
merged 2 commits into from
Jun 6, 2018

Conversation

josephvusich
Copy link
Contributor

This PR contains two fixes addressing CVE-2018-11235:

  1. Ignore submodules containing ".." in the module path.
  2. Do not allow .gitmodules to be a symlink.

Both of these changes mirror fixes made by the canonical Git project in response to the CVE.

References:

@dustin-decker
Copy link

Thanks for the quick patching on this.

I'm just starting to use this library and i'm curious: Does go-git support hooks or ever plans to? If someone were to recursively clone a malicious repository using go-git, could code exec have been possible? It'd be nice to be using a git library that doesn't have the surface area of hooks to worry about. There have already been a few code execution exploits that relied on git hooks and when building software to process git repositories, more of them is a concern.

@smola
Copy link
Collaborator

smola commented Jun 1, 2018

@dustin-decker We do not support hooks and we have no plans to do it.

We might consider supporting hooks if someone is willing to contribute it. But I think that, in that case, it would be opt-in.

@mcuadros mcuadros merged commit d33d3ef into src-d:master Jun 6, 2018
@josephvusich josephvusich deleted the fix/cve-2018-11235 branch June 6, 2018 21:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants