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

Re: [BUG] Segmentation fault in git v2.41.0.rc1

From
Junio C Hamano <gitster@pobox.com>
Date
May 24, 2023, 20:25 UTC
Message-ID
<xmqqttw1fpd9.fsf@gitster.g>
In-Reply-To
<ZG4jcceXn2G6Xic0@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
> which points to e0a862fdaf (submodule helper: convert relative URL to
> absolute URL if needed, 2018-10-16) as the culprit.

Whew, that is fairly ancient. I was afraid if we have another regression, but it does not look that way. Fixing is certainly good and we'd need to eventually get to it, but we have luxury to make sure that the fix is sound without having to rush anything ;-)

In the meantime, "if it hurts, don't do it" is what we can say. Telling random users to muck with their config in certain ways that violate the way how the system represents (un-)initialized submodules and then to run certain command to induce a NULL pointer dereference is rather an ineffective social engineering as an attack vector, so this is not urgent in that sense.

I am more worried that the original report talked about mucking with the in-tree .gitmodules file affects the result, though. Once a submodule is initialized, what is in the file for that submodule should not affect the working of local Git (otherwise the file can be used as a route to inject stuff to unsuspecting repositories), but in this case apparently it does?

Thanks.
Previous: Jeff King
Message 12 of 12 in “[BUG] Segmentation fault in git v2.41.0.rc1”
  1. Tribo DarMay 24, 2023
  2. Taylor BlauMay 24, 2023
  3. builtin/submodule--helper.c: handle missing submodule URLsTaylor Blau, May 24, 2023
  4. builtin/submodule--helper.c: handle missing submodule URLsTaylor Blau, May 24, 2023
  5. Eric SunshineMay 24, 2023
  6. Taylor BlauMay 24, 2023
  7. builtin/submodule--helper.c: handle missing submodule URLsTaylor Blau, May 24, 2023
  8. René ScharfeMay 24, 2023
  9. Taylor BlauMay 24, 2023
  10. Jeff KingMay 24, 2023
  11. Jeff KingMay 24, 2023
  12. Junio C HamanoMay 24, 2023

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.