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

[PATCH 0/3] out-of-bounds access from corrupted .idx files

From
Jeff King <peff@peff.net>
Date
Feb 25, 2016, 14:20 UTC
Message-ID
<20160225142004.GA17678@sigill.intra.peff.net>

This series teaches Git to detect a few problems with corrupted .idx files, and adds tests for some more cases. There's conceptually some overlap with t5300, but I don't think it was covering any of these cases explicitly.

There are two real bugs that could cause segfaults or bus errors via bogus reads (but never writes). On top of that, these are all problems in .idx files, which are usually generated locally. So I don't think there's anything particularly security interesting here. You'd need a situation where you convince somebody to read your .idx files (so maybe a multi-user server), and then I don't see how you'd turn it into remote code execution.

I think with these patches, fuzzing .idx files should never result in any memory problems (though of course git will die()). Famous last words, of course. I stopped short of poking at other file formats, which might have similar issues. Obvious candidates are .bitmap files, and the on-disk $GIT_DIR/index.

  [1/3]: t5313: test bounds-checks of corrupted/malicious pack/idx files
  [2/3]: nth_packed_object_offset: bounds-check extended offset
  [3/3]: use_pack: handle signed off_t overflow
-Peff
Next: Jeff King
Message 1 of 10 in “out-of-bounds access from corrupted .idx files”
  1. 0/3 out-of-bounds access from corrupted .idx filesJeff King, Feb 25, 2016
  2. 1/3 t5313: test bounds-checks of corrupted/malicious pack/idx filesJeff King, Feb 25, 2016
  3. Johannes SixtFeb 25, 2016
  4. Junio C HamanoFeb 25, 2016
  5. Jeff KingFeb 25, 2016
  6. 2/3 nth_packed_object_offset: bounds-check extended offsetJeff King, Feb 25, 2016
  7. 3/3 use_pack: handle signed off_t overflowJeff King, Feb 25, 2016
  8. 4/3 sha1_file.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  9. Junio C HamanoFeb 27, 2016
  10. Jeff KingFeb 27, 2016

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.