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

[PATCH 0/2] upload-archive security issues

From
Jeff King <peff@peff.net>
Date
Nov 15, 2011, 21:42 UTC
Message-ID
<20111115214159.GA20457@sigill.intra.peff.net>

[Note to readers who haven't been following the recent thread on upload-archive bugs: these security issues are in c09cd77e, which has not actually been released. So this is "security problems, and we need fixes before this ships in 1.7.8" and not "OMG your git site is 0wned"].

Looking at Erik's c09cd77e again, there are some serious security problems, in that we are too lenient with what gets passed to git-archive, which is not hardened to accept random client arguments. That lets a client do all sorts of nasty things like running arbitrary code.

These patches fix it by making cmd_archive handle the remote-request flag better. An alternative would be to pass only known-good options through upload-archive. That might be more future-proof, but also involves upload-archive knowing about the innards of write_archive and its options. See also the comments in patch 2/2 for another alternative fix.

  [1/2]: archive: don't allow negation of --remote-request
  [2/2]: archive: limit ourselves during remote requests

And yes, I feel like a moron for not noticing these problems during my initial review.

-Peff
Next: Jeff King
Message 1 of 7 in “upload-archive security issues”
  1. 0/2 upload-archive security issuesJeff King, Nov 15, 2011
  2. 1/2 archive: don't allow negation of --remote-requestJeff King, Nov 15, 2011
  3. 2/2 archive: limit ourselves during remote requestsJeff King, Nov 15, 2011
  4. Junio C HamanoNov 16, 2011
  5. Erik Faye-LundNov 15, 2011
  6. Jeff KingNov 15, 2011
  7. Junio C HamanoNov 15, 2011

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.