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

Re: Git clone reads safe.directory differently?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2024, 15:49 UTC
Message-ID
<xmqqzfpr3r7i.fsf@gitster.g>
In-Reply-To
<20240805094709.GA632664@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I suspect it could be made to give similar guarantees, but I don't think
> anybody has ever made a conscious effort.

I also recall that we thought upload-pack was safe because it does nothing more than what it was asked to do, until we realized that in a lazy clone it would slurp what it is missing from its promisors, at which point it does more than just "serve things from here".

What worries me more is the fact that any such evaluation can only be about the current state. A careless change to say pack-objects that allows innocent looking customization to take place _could_ turn out to be triggerable by the repository when upload-pack is run, and the "innocent looking" customization may be more generic than necessary and can be used creatively to cause damage. "Don't allow any customizations to 'rev-list' because its internal is shared with 'pack-objects' that in turn is run from 'upload-pack'" would not be an answer.

It is unclear to me how to make sure such an evaluation, that was done once in the past, will stay valid. That is something we need to come up with a viable approach and document, too.

Thanks.
Previous: W. Michael PetulloNext: Jeff King
Message 19 of 21 in “Git clone reads safe.directory differently?”
  1. W. Michael PetulloJul 27, 2024
  2. Jeff KingJul 27, 2024
  3. W. Michael PetulloJul 28, 2024
  4. Jeff KingJul 28, 2024
  5. W. Michael PetulloJul 30, 2024
  6. brian m. carlsonJul 30, 2024
  7. Junio C HamanoJul 30, 2024
  8. Junio C HamanoJul 30, 2024
  9. brian m. carlsonJul 30, 2024
  10. Jeff KingJul 31, 2024
  11. Junio C HamanoJul 31, 2024
  12. Junio C HamanoJul 31, 2024
  13. Jeff KingAug 1, 2024
  14. Junio C HamanoAug 1, 2024
  15. brian m. carlsonAug 1, 2024
  16. Junio C HamanoAug 1, 2024
  17. Jeff KingAug 5, 2024
  18. W. Michael PetulloAug 5, 2024
  19. Junio C HamanoAug 5, 2024
  20. Jeff KingAug 1, 2024
  21. Jeff KingJul 31, 2024

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.