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

Re: [PATCH 0/6] restricting http redirects

From
Jeff King <peff@peff.net>
Date
Dec 5, 2016, 13:08 UTC
Message-ID
<20161205130828.3yk2y6yschthoyx6@sigill.intra.peff.net>
In-Reply-To
<20161201090336.xjbb47bublfcpglo@sigill.intra.peff.net>
On Thu, Dec 01, 2016 at 04:03:37AM -0500, Jeff King wrote:
> Jann Horn brought up on the git-security list some interesting
> social-engineering attacks around the way Git handles HTTP redirects.
> These patches are my attempt to harden our redirect handling against
> these attacks.

There's one other possible attack I thought of while discussing [1], that is worth mentioning.

We limited the number of http redirects in b25811646 (http: limit redirection depth, 2015-09-22). But what about http-alternates? Could you redirect to yourself via http-alternates and convince a client to loop infinitely?

It looks like no, because we do not seem to handle recursive alternates at all in the http walker. Which means that repositories with recursive local alternates cannot be fetched over dumb-http. But it also means that we don't have to worry about limiting the recursion depth.

-Peff
[1] http://public-inbox.org/git/fe33de5b5f0b3da68b249cc4a49a6d7@3c843fe6ba8f3c586a21345a2783aa0/
Previous: Jeff King
Message 18 of 18 in “restricting http redirects”
  1. 0/6 restricting http redirectsJeff King, Dec 1, 2016
  2. 3/6 remote-curl: rename shadowed options variableJeff King, Dec 1, 2016
  3. 1/6 http: simplify update_url_from_redirectJeff King, Dec 1, 2016
  4. 2/6 http: always update the base URL for redirectsJeff King, Dec 1, 2016
  5. Ramsay JonesDec 1, 2016
  6. Brandon WilliamsDec 1, 2016
  7. Philip OakleyDec 1, 2016
  8. Junio C HamanoDec 1, 2016
  9. Ramsay JonesDec 2, 2016
  10. Jeff KingDec 2, 2016
  11. Ramsay JonesDec 2, 2016
  12. 6/6 http-walker: complain about non-404 loose object errorsJeff King, Dec 1, 2016
  13. 4/6 http: make redirects more obviousJeff King, Dec 1, 2016
  14. Ramsay JonesDec 1, 2016
  15. 5/6 http: treat http-alternates like redirectsJeff King, Dec 1, 2016
  16. Brandon WilliamsDec 1, 2016
  17. Jeff KingDec 2, 2016
  18. Jeff KingDec 5, 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.