git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP

From
Blake Burkhart <bburky@bburky.com>
Date
Feb 13, 2016, 01:40 UTC
Message-ID
<CAP3OtXjyy+7cSi0S17FSsx8gnP1rKboeSAz_Hz1ZNVDuqcGASw@mail.gmail.com>
In-Reply-To
<20160210214945.GA5853@sigill.intra.peff.net>
On Wed, Feb 10, 2016 at 3:49 PM, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
>> 2. Servers that support resumable clone include a "resumable"
>> capability in the advertisement.
>
> Because the magic happens in the git protocol, that would mean this does
> not have to be limited to git-over-http. It could be "resumable=<url>"
> to point the client anywhere (the same server over a different protocol,
> another server, etc).

I'd like to call this out as a possible security issue before it gets implemented. Allowing the server to instruct the client what protocol to use is a security risk. This sounds like a fine feature, just do it carefully.

I reported a similar issue was discussed off list which eventually became CVE-2015-7545. Basically, git-submodule allowed a repository to specify any protocol via .gitmodules, causing the client to fetch an arbitrary URL using a protocol of the attacker's choice. Sadly, the existence of git-remote-ext allows easily executing arbitrary shell commands if the server can tell the client to use it. Furthermore, it's possible the client has some insecure or sensitive custom git remote helpers installed.

To address this GIT_ALLOW_PROTOCOL was introduced, and git-submodule now uses it as of 33cfccb. This environment variable specifies a default whitelist of protocols. Whoever implements this should probably make use of GIT_ALLOW_PROTOCOL to limit resumable clones to the same default whitelist that git-submodule now uses.

-- 
Blake Burkhart
Previous: Jeff KingNext: Jeff King
Message 19 of 24 in “RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP”
  1. Shawn PearceFeb 10, 2016
  2. Shawn PearceFeb 10, 2016
  3. Stefan BellerFeb 10, 2016
  4. Junio C HamanoFeb 10, 2016
  5. Jonathan NiederFeb 10, 2016
  6. Jeff KingFeb 10, 2016
  7. Jonathan NiederFeb 10, 2016
  8. Junio C HamanoFeb 10, 2016
  9. Junio C HamanoFeb 11, 2016
  10. Shawn PearceFeb 11, 2016
  11. Duy NguyenFeb 11, 2016
  12. Junio C HamanoFeb 13, 2016
  13. Jeff KingFeb 10, 2016
  14. Jonathan NiederFeb 10, 2016
  15. Jeff KingFeb 10, 2016
  16. Junio C HamanoFeb 10, 2016
  17. Junio C HamanoFeb 11, 2016
  18. Jeff KingFeb 11, 2016
  19. Blake BurkhartFeb 13, 2016
  20. Jeff KingFeb 13, 2016
  21. Shawn PearceFeb 14, 2016
  22. Jeff KingFeb 14, 2016
  23. Shawn PearceFeb 14, 2016
  24. Stefan BellerFeb 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.