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

Re: [PATCH 6/7] read-cache: refuse to create index referring to external objects

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 28, 2013, 06:18 UTC
Message-ID
<CACsJy8BwCCAZyMZ2w9fyMaNJsHRNp2V3Aen8g3drAkZ4y9mfBg@mail.gmail.com>
In-Reply-To
<CACsJy8BJZgyEn1n2GWgAVSGhSkVUO-P=GXwR02OcDf0ziTTRaA@mail.gmail.com>
On Mon, Jan 28, 2013 at 12:48 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> Regardless the submodule odb issue, I think we should prefer
> reading local loose objects over alternate packed ones.

I think I went from one problem to another and did not make it clear. The reason behind this preference is security. With "all packs first" reading order, someone can create a pack in the alternate source and that pack will override the same local loose objects (local packed ones are safe). If someone can create a malicious version with the same SHA-1, we (well, the user) are in trouble. If the user uses this repository directly then the malicious object can be used without detected, even if it does not match the original SHA-1, as we do not always verify content against its SHA-1 for common commands.

-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 21 in “sha1_file: keep track of where an SHA-1 object comes from”
  1. 1/7 sha1_file: keep track of where an SHA-1 object comes fromNguyễn Thái Ngọc Duy, Jan 24, 2013
  2. 2/7 sha1_file: separate alt object db from own repos and submodules'sNguyễn Thái Ngọc Duy, Jan 24, 2013
  3. 3/7 sha1_file: refuse to write commits referring to external objectsNguyễn Thái Ngọc Duy, Jan 24, 2013
  4. 4/7 sha1_file: refuse to write trees referring to external objectsNguyễn Thái Ngọc Duy, Jan 24, 2013
  5. 5/7 sha1_file: refuse to write tags referring to external objectsNguyễn Thái Ngọc Duy, Jan 24, 2013
  6. 6/7 read-cache: refuse to create index referring to external objectsNguyễn Thái Ngọc Duy, Jan 24, 2013
  7. Junio C HamanoJan 24, 2013
  8. Duy NguyenJan 25, 2013
  9. Junio C HamanoJan 25, 2013
  10. Duy NguyenJan 28, 2013
  11. Junio C HamanoJan 28, 2013
  12. Duy NguyenJan 28, 2013
  13. Junio C HamanoJan 28, 2013
  14. Duy NguyenJan 28, 2013
  15. Junio C HamanoJan 28, 2013
  16. Duy NguyenJan 28, 2013
  17. 7/7 refs: do not update ref(log) referring to external objectsNguyễn Thái Ngọc Duy, Jan 24, 2013
  18. Junio C HamanoJan 24, 2013
  19. Duy NguyenJan 25, 2013
  20. Junio C HamanoJan 25, 2013
  21. Duy NguyenJan 25, 2013

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.