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

Limitations of ownership checking fox for CVE-2022-24765

From
JMJeremy Maitin-Shepard <jeremy@jeremyms.com>
Date
Apr 13, 2022, 04:42 UTC
Message-ID
<CAKJfoCEgiNvQJGt=rGYTaKQ1i2ihrPmX2Sz3Zxg-y66L+1Qh6g@mail.gmail.com>

The current fix for CVE-2022-24765 prevents unsafe command execution in some cases but does not address all cases:

- Ownership by the current user should not be taken to mean "trusted":
the user may have retrieved a directory tree from an untrusted source,
including:
  - Another version control system (which won't prevent a .git directory)
  - Unpacking an archive
  - FUSE mounting a remote filesystem

Additionally, the current fix requires additional configuration to support existing use cases, and does not provide uses a way to safely execute commands like `git status` or `git log` on untrusted repositories.

I think a better solution would be for git to support a `--safe` option that only runs config-specified commands specifically added to an allowed list, or if the repository itself has been added to safe.directories.

Ideally git would default to running in `--safe` mode, but if that is too disruptive at least the option would be available for use in prompt commands, etc.

(Please CC me in replies as I'm not subscribed to the list.)
Next: Ævar Arnfjörð Bjarmason
Message 1 of 4 in “Limitations of ownership checking fox for CVE-2022-24765”
  1. Jeremy Maitin-ShepardApr 13, 2022
  2. Ævar Arnfjörð BjarmasonApr 13, 2022
  3. Jeremy Maitin-ShepardApr 13, 2022
  4. Ævar Arnfjörð BjarmasonApr 13, 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.