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

Re: [PATCH] fsckObjects tests: show how v2.17.1 can exploit downstream

From
Jeff King <peff@peff.net>
Date
May 31, 2018, 06:02 UTC
Message-ID
<20180531060259.GE17344@sigill.intra.peff.net>
In-Reply-To
<xmqqk1rmexng.fsf@gitster-ct.c.googlers.com>
On Wed, May 30, 2018 at 10:32:19AM +0900, Junio C Hamano wrote:
Show 5 quoted lines
> If we want to also encourage people to vet their own "fetches", I am
> not against extending documentation.  It just is different from "we
> extended the mechanism to help server side protect their clients"
> that was the focus of (updated, relative to what is in the tarball)
> the description in the release notes.

I haven't tested it, but I suspect that doing multiple fetches could result in passing bad objects through a fetch.fsckObjects filter. Because the objects aren't quarantined on fetch, and because fsck_finish() requires the objects to be installed into place, they may still exist in the repository even if we end up rejecting them. Would a subsequent fetch hit the quickfetch() code and update without actually sending the objects again?

This problem is specific to the .gitmodules thing, I think, because the other fsck checks are able to die much earlier (before fsck_finish).

I think in the long run fetch should implement a similar quarantine procedure to what happens on push.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 10 in “fsckObjects tests: show how v2.17.1 can exploit downstream”
  1. fsckObjects tests: show how v2.17.1 can exploit downstreamÆvar Arnfjörð Bjarmason, May 29, 2018
  2. Jeff KingMay 29, 2018
  3. Ævar Arnfjörð BjarmasonMay 29, 2018
  4. Junio C HamanoMay 30, 2018
  5. Jeff KingMay 31, 2018
  6. Ævar Arnfjörð BjarmasonMay 31, 2018
  7. Junio C HamanoMay 30, 2018
  8. Jeff KingMay 31, 2018
  9. Junio C HamanoJun 1, 2018
  10. Jeff KingJun 1, 2018

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.