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

Re: Commit SHA1 == SHA1 checksum?

From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Date
Feb 7, 2022, 22:46 UTC
Message-ID
<20220207224654.aju3rmxcrhapi4d2@meerkat.local>
In-Reply-To
<8A241137-C8D6-40A6-ABB8-5624B9E617A9@llnl.gov>
On Mon, Feb 07, 2022 at 10:29:37PM +0000, Gamblin, Todd wrote:
Show 10 quoted lines
> > 2. packagers would be able to perform cryptographic verification without
> >   needing to track any extra sources like corresponding .sig files; they
> >   would just need to add a build-time dependency on git (plus whatever it
> >   calls for cryptographic verification, such as gnupg or openssh)
> 
> This is a cool idea, but tar/gzip/etc. are vulnerable to input attacks (or
> at least there have been CVEs in the past), so this does not eliminate the
> need to verify a downloaded .tar or .tar.gz file independently.  You can
> verify the contents of the tar, but to do that you have to expand it, and to
> do that you’re still passing untrusted input to tar.

That's not really different from what git does when it clones a remote repository to run "git verify-tag". It still accepts untrusted input from the remote server, performs a lot of compression/decompression operations, etc, so this is not introducing anything that git isn't already required to do.

I know there's a lot to be said about the simplicity of just computing a signature over file bytes, but there are features you end up sacrificing, such as ability to provide a single signature for multiple compression types, adding a better compression algorithm in the future, or simply recompressing with better flags in a long background process.

My goal is to improve the current situation where we're actually doing pretty good for signed in-git objects, but none of that is carried over to packaging systems. The only effort I know in that area is sigstore, but it requires quite a bit of work to properly use on the part of the project maintainer, whereas it would be great to be able to say "just do git tag -s and the packaging systems will be able to use that."

-K
Previous: Gamblin, ToddNext: Gamblin, Todd
Message 16 of 19 in “Commit SHA1 == SHA1 checksum?”
  1. Gamblin, ToddFeb 5, 2022
  2. Philip OakleyFeb 6, 2022
  3. Gamblin, ToddFeb 6, 2022
  4. Johannes SixtFeb 6, 2022
  5. Junio C HamanoFeb 6, 2022
  6. Philip OakleyFeb 6, 2022
  7. Junio C HamanoFeb 6, 2022
  8. Philip OakleyFeb 6, 2022
  9. Gamblin, ToddFeb 7, 2022
  10. Konstantin RyabitsevFeb 7, 2022
  11. Gamblin, ToddFeb 7, 2022
  12. Konstantin RyabitsevFeb 7, 2022
  13. Junio C HamanoFeb 7, 2022
  14. Konstantin RyabitsevFeb 7, 2022
  15. Gamblin, ToddFeb 7, 2022
  16. Konstantin RyabitsevFeb 7, 2022
  17. Gamblin, ToddFeb 8, 2022
  18. Junio C HamanoFeb 7, 2022
  19. Konstantin RyabitsevFeb 7, 2022

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.