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

Re: [PATCH v3] sparse index: fix use-after-free bug in cache_tree_verify()

From
Derrick Stolee <stolee@gmail.com>
Date
Oct 8, 2021, 18:53 UTC
Message-ID
<e281c2e2-2044-1a11-e2bc-5ab3ee92c300@gmail.com>
In-Reply-To
<4ccaad06-a1ae-bd1b-f25d-bfa899ffa98f@gmail.com>
On 10/8/2021 5:09 AM, Phillip Wood wrote:
Show 20 quoted lines
> On 07/10/2021 22:23, Junio C Hamano wrote:
>> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
>>
>>>       * Fixed the spelling of Stolee's name (sorry Stolee)
>>>       * Added "-q" to the test to prevent a failure on Microsoft's fork[1]
>>>           [1]
>>>      https://lore.kernel.org/git/ebbe8616-0863-812b-e112-103680f7298b@gmail.com/
>>
>> I've seen the exchange, but ...
>>
>>> -    for OPERATION in "merge -m merge" cherry-pick rebase
>>> +    for OPERATION in "merge -m merge" cherry-pick "rebase --apply -q" "rebase --merge"
>>>       do
>>
>> ... it looks too strange that only one of them requires a "--quiet"
>> option.  Is it a possibility to get whoever's fork corrected so that
>> it behaves sensibly without requiring the "-q" option only for the
>> particular rebase backend?
> 
> The issue is caused by a patch that Microsoft is carrying that stops apply from creating paths with the skip-worktree bit set. As they're upstreaming their sparse index and checkout work I expect it will show up on the list sooner or later. I agree the "-q" is odd and it also means the test is weaker but I'm not sure what else we can do.

That particular patch is old and is due to some interactions with how VFS for Git (ab)uses the skip-worktree bit. I'm not sure it will ever come upstream. It is probably very much like a recent example [1] that we tried to upstream only to realize that it should be replaced with something better.

[1] https://lore.kernel.org/git/65905bf4e001118e8b9ced95c1bcecbacb6334ac.1633013461.git.gitgitgadget@gmail.com/

I'm fine to leave the `-q` out of this patch and I can add it myself when we take this into microsoft/git. That can also motivate me to rethink that patch.

Thanks, -Stolee

Previous: Phillip WoodNext: Junio C Hamano
Message 17 of 26 in “[RFC] sparse index: fix use-after-free bug in cache_tree_verify()”
  1. [RFC] sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 6, 2021
  2. Derrick StoleeOct 6, 2021
  3. Phillip WoodOct 6, 2021
  4. Derrick StoleeOct 6, 2021
  5. Junio C HamanoOct 6, 2021
  6. Derrick StoleeOct 6, 2021
  7. sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 7, 2021
  8. Derrick StoleeOct 7, 2021
  9. Phillip WoodOct 7, 2021
  10. Derrick StoleeOct 7, 2021
  11. Phillip WoodOct 7, 2021
  12. Derrick StoleeOct 7, 2021
  13. Phillip WoodOct 7, 2021
  14. sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 7, 2021
  15. Junio C HamanoOct 7, 2021
  16. Phillip WoodOct 8, 2021
  17. Derrick StoleeOct 8, 2021
  18. Junio C HamanoOct 8, 2021
  19. Phillip WoodOct 14, 2021
  20. Junio C HamanoOct 14, 2021
  21. Bagas SanjayaOct 8, 2021
  22. Phillip WoodOct 14, 2021
  23. sparse index: fix use-after-free bug in cache_tree_verify()Phillip Wood via GitGitGadget, Oct 16, 2021
  24. Junio C HamanoOct 17, 2021
  25. Derrick StoleeOct 17, 2021
  26. Phillip WoodOct 18, 2021

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.