{"thread":{"id":"48848","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","startedAt":"2018-07-02T19:50:17Z","lastAt":"2018-07-10T19:10:00Z","messageCount":9,"participants":["Jeff King","Jonathan Nieder","Ævar Arnfjörð Bjarmason","Johannes Schindelin","Jeremy Huddleston Sequoia"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"352040","messageId":"20180702195016.GA17102@sigill.intra.peff.net","threadId":"48848","inReplyTo":"CAGba+=U4nbxL2uuSxyqyZqiiavJpo_E=GhUkipz6DczLdmnkgQ@mail.gmail.com","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-07-02T19:50:17Z","receivedAt":"2018-07-02T19:50:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 02, 2018 at 09:29:41PM +0200, Christian Couder wrote:\n\n> When people complained a month ago about the MacOS package on\n> https://git-scm.com/ not being up-to-date after the Git security\n> release, I got in touch with Apple people GitLab has been working with\n> to see if they could help on this.\n\nUnfortunately I don't think this will quite solve the issue we had, just\nbecause people get their copy of Git in various ways. So Homebrew\nupdated pretty promptly, but people going to git-scm.com to find a\nbinary package were left without help. Likewise, this will help people\ngetting Git as part of XCode, but not people gettin the package from\ngit-scm.com.\n\nAll that said, I'm happy to get as many binary packagers into the loop\nas early as possible. It can only help, even if it doesn't solve all\nproblems. :)\n\n> Please add these addresses to the git-security mailing list:\n>     jeremyhu@apple.com\n>     akilsrin@apple.com\n>     dt-epm@group.apple.com\n\nDone.\n\n> Please add these GitHub accounts to the cabal repo:\n>     jeremyhu\n\nDone.\n\n>     productsecurityOSSapple\n\nI couldn't find that account. Is it maybe a team name within the apple\norg or something?\n\n> I am also personally very happy with the Apple developers' willingness\n> to get involved and help.\n\nYes, welcome aboard!\n\nI hope that maybe they're also interested in reducing the overall diff\nbetween upstream Git and what ships with XCode. Last time I looked\n(which was admittedly a while ago), a lot of the changes seemed like\nthings that could probably be considered upstream.\n\n-Peff\n"},{"id":"352042","messageId":"20180702211704.GA23484@sigill.intra.peff.net","threadId":"48848","inReplyTo":"9AE01C9B-7D10-45F2-8910-1607A19DF722@apple.com","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-07-02T21:17:04Z","receivedAt":"2018-07-02T21:17:04Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 02, 2018 at 01:58:21PM -0700, Akilsrin wrote:\n\n> Could “ProdsecOSS \" <prodsecoss@apple.com> also be added to the\n> git-security mailing list. It’s another account I control to ensure my\n> team and I track open source bugs.\n> \n> The git repo: could you add https://github.com/product-security-OSS\n> <https://github.com/product-security-OSS> and\n> https://github.com/Akilsrin <https://github.com/Akilsrin> to the\n> GitHub cabal repo please.\n\nDone, done, and done.\n\n-Peff\n"},{"id":"352041","messageId":"20180703133645.GA20316@sigill.intra.peff.net","threadId":"48848","inReplyTo":"91A9F3A0-5F3F-4137-9A40-CB42EDE4F243@apple.com","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-07-03T13:36:46Z","receivedAt":"2018-07-09T22:38:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 02, 2018 at 01:15:19PM -0700, Jeremy Huddleston Sequoia wrote:\n\n> > I hope that maybe they're also interested in reducing the overall\n> > diff between upstream Git and what ships with XCode. Last time I\n> > looked (which was admittedly a while ago), a lot of the changes\n> > seemed like things that could probably be considered upstream.\n> \n> I'm very very interested in having reduced differences between what we\n> ship in Xcode and what is upstream.  I've been maintaining a repo with\n> our patches that I rebase as we move forward, in the hope that these\n> changes might be useful to others and a derivative of them might\n> eventually be accepted upstream.  See\n> https://github.com/jeremyhu/git/commits/master for the current set of\n> changes that are in our shipping git (currently on top of 2.17.1).\n\nThanks for sharing. Skimming over it, I see:\n\n - several of the changes look related to run-time relocation. There was\n   a series that shipped in v2.18.0 related to this, so that may reduce\n   your diff once you rebase.\n\n - The xcode_gitattributes() bits aren't likely to go upstream as-is.\n   But possibly these could ship as a default $sysconfdir/gitattributes?\n\n - the rest look like assorted little fixes that probably could go\n   upstream\n\n-Peff\n"},{"id":"352043","messageId":"20180703154814.GA51821@aiede.svl.corp.google.com","threadId":"48848","inReplyTo":"20180703133645.GA20316@sigill.intra.peff.net","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-07-03T15:48:14Z","receivedAt":"2018-07-09T22:38:51Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Administrivia: do you mind if I bounce these messages to some archived\nlist, either git@vger.kernel.org or git-security?  Or if we'd prefer\nto avoid the noise from that, do you mind if I work with Eric Wong to\nget them injected in the https://public-inbox.org/ archive?\n\nHi,\n\nJeff King wrote:\n> On Mon, Jul 02, 2018 at 01:15:19PM -0700, Jeremy Huddleston Sequoia wrote:\n\n>> I'm very very interested in having reduced differences between what we\n>> ship in Xcode and what is upstream.\n[...]\n> Thanks for sharing. Skimming over it, I see:\n>\n>  - several of the changes look related to run-time relocation. There was\n>    a series that shipped in v2.18.0 related to this, so that may reduce\n>    your diff once you rebase.\n>\n>  - The xcode_gitattributes() bits aren't likely to go upstream as-is.\n>    But possibly these could ship as a default $sysconfdir/gitattributes?\n>\n>  - the rest look like assorted little fixes that probably could go\n>    upstream\n\nI agree with Peff's assessment.  I'd also like to emphasize that\nupstream is happy to see an [FYI/PATCH] when you have a divergence,\nwhich would provide a thread to reply to to figure out whether there's\nsome generalization that is suitable for upstream.  (For example,\nmaybe we want some Makefile knob to allow setting some baked-in\nattributes.)\n\nThanks,\nJonathan\n"},{"id":"352044","messageId":"20180703160110.GA26771@sigill.intra.peff.net","threadId":"48848","inReplyTo":"20180703154814.GA51821@aiede.svl.corp.google.com","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-07-03T16:01:10Z","receivedAt":"2018-07-09T22:38:55Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jul 03, 2018 at 08:48:14AM -0700, Jonathan Nieder wrote:\n\n> Administrivia: do you mind if I bounce these messages to some archived\n> list, either git@vger.kernel.org or git-security?  Or if we'd prefer\n> to avoid the noise from that, do you mind if I work with Eric Wong to\n> get them injected in the https://public-inbox.org/ archive?\n\nI don't mind at all. I'm actually going to work later today on preparing\nother messages from the security list to go to the public-inbox.org\narchive, so that might pave the way.\n\n-Peff\n"},{"id":"352047","messageId":"20180709224843.GJ14196@aiede.svl.corp.google.com","threadId":"48848","inReplyTo":"20180703160110.GA26771@sigill.intra.peff.net","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2018-07-09T22:48:43Z","receivedAt":"2018-07-09T22:48:50Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"+git@vger\nJeff King wrote:\n> On Tue, Jul 03, 2018 at 08:48:14AM -0700, Jonathan Nieder wrote:\n\n>> Administrivia: do you mind if I bounce these messages to some archived\n>> list, either git@vger.kernel.org or git-security?  Or if we'd prefer\n>> to avoid the noise from that, do you mind if I work with Eric Wong to\n>> get them injected in the https://public-inbox.org/ archive?\n>\n> I don't mind at all. I'm actually going to work later today on preparing\n> other messages from the security list to go to the public-inbox.org\n> archive, so that might pave the way.\n\nThanks, done.\n\nThis doesn't work as a trial run for\nhttps://public-inbox.org/meta/20180703160910.GB51821@aiede.svl.corp.google.com,\nsince I just bounced the mails.  So it won't work for threads like the\n326-message thread you mentioned, but it should work in more modest\ncases.\n\nIt seems that vger only delivered some of the messages.  I suspect\nit's related to DMARC.\n\nJonathan\n"},{"id":"352105","messageId":"CACBZZX4X05EHd+OpBpLotGuY6H=pnB9dS9Rv5BONfCKjZM3a1A@mail.gmail.com","threadId":"48848","inReplyTo":"20180703133645.GA20316@sigill.intra.peff.net","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-07-10T12:27:57Z","receivedAt":"2018-07-10T12:28:21Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jul 3, 2018 at 3:36 PM, Jeff King <peff@peff.net> wrote:\n> On Mon, Jul 02, 2018 at 01:15:19PM -0700, Jeremy Huddleston Sequoia wrote:\n>\n>> > I hope that maybe they're also interested in reducing the overall\n>> > diff between upstream Git and what ships with XCode. Last time I\n>> > looked (which was admittedly a while ago), a lot of the changes\n>> > seemed like things that could probably be considered upstream.\n>>\n>> I'm very very interested in having reduced differences between what we\n>> ship in Xcode and what is upstream.  I've been maintaining a repo with\n>> our patches that I rebase as we move forward, in the hope that these\n>> changes might be useful to others and a derivative of them might\n>> eventually be accepted upstream.  See\n>> https://github.com/jeremyhu/git/commits/master for the current set of\n>> changes that are in our shipping git (currently on top of 2.17.1).\n>\n> Thanks for sharing. Skimming over it, I see:\n>\n>  - several of the changes look related to run-time relocation. There was\n>    a series that shipped in v2.18.0 related to this, so that may reduce\n>    your diff once you rebase.\n>\n>  - The xcode_gitattributes() bits aren't likely to go upstream as-is.\n>    But possibly these could ship as a default $sysconfdir/gitattributes?\n>\n>  - the rest look like assorted little fixes that probably could go\n>    upstream\n\nJeremy, could you elaborate on what\nhttps://github.com/jeremyhu/git/commit/61b42bc5d2 was about? I.e.\nwhere was this discussed & tests for this refused?\n\nSeems sensible to me to have this in some form, but the test as-is\nseems to be a general regression test, not Apple-specific, so it would\nneed to be changed somewhat, or does it only happen with some other\ncustom patch of yours?\n"},{"id":"352165","messageId":"nycvar.QRO.7.76.6.1807101521060.75@tvgsbejvaqbjf.bet","threadId":"48848","inReplyTo":"20180702195016.GA17102@sigill.intra.peff.net","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-07-10T13:24:33Z","receivedAt":"2018-07-10T18:58:52Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Mon, 2 Jul 2018, Jeff King wrote:\n\n> On Mon, Jul 02, 2018 at 09:29:41PM +0200, Christian Couder wrote:\n> \n> > When people complained a month ago about the MacOS package on\n> > https://git-scm.com/ not being up-to-date after the Git security\n> > release, I got in touch with Apple people GitLab has been working with\n> > to see if they could help on this.\n> \n> Unfortunately I don't think this will quite solve the issue we had, just\n> because people get their copy of Git in various ways. So Homebrew\n> updated pretty promptly, but people going to git-scm.com to find a\n> binary package were left without help. Likewise, this will help people\n> getting Git as part of XCode, but not people gettin the package from\n> git-scm.com.\n\nIndeed. The fix for that would be to automate those official Git for macOS\nbuilds. I suggested exactly that to Tim:\nhttps://github.com/gitgitgadget/git/pull/7#issuecomment-403820169\n\nCiao,\nDscho\n"},{"id":"352167","messageId":"B325BFBF-E084-4163-BF46-78C2FE295870@apple.com","threadId":"48848","inReplyTo":"CACBZZX4X05EHd+OpBpLotGuY6H=pnB9dS9Rv5BONfCKjZM3a1A@mail.gmail.com","subject":"Re: Subscribing Apple people to git-security@googlegroups.com","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2018-07-10T18:54:53Z","receivedAt":"2018-07-10T19:10:00Z","isPatch":false,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jul 10, 2018, at 5:27 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> \n> On Tue, Jul 3, 2018 at 3:36 PM, Jeff King <peff@peff.net> wrote:\n>> On Mon, Jul 02, 2018 at 01:15:19PM -0700, Jeremy Huddleston Sequoia wrote:\n>> \n>>>> I hope that maybe they're also interested in reducing the overall\n>>>> diff between upstream Git and what ships with XCode. Last time I\n>>>> looked (which was admittedly a while ago), a lot of the changes\n>>>> seemed like things that could probably be considered upstream.\n>>> \n>>> I'm very very interested in having reduced differences between what we\n>>> ship in Xcode and what is upstream.  I've been maintaining a repo with\n>>> our patches that I rebase as we move forward, in the hope that these\n>>> changes might be useful to others and a derivative of them might\n>>> eventually be accepted upstream.  See\n>>> https://github.com/jeremyhu/git/commits/master for the current set of\n>>> changes that are in our shipping git (currently on top of 2.17.1).\n>> \n>> Thanks for sharing. Skimming over it, I see:\n>> \n>> - several of the changes look related to run-time relocation. There was\n>>   a series that shipped in v2.18.0 related to this, so that may reduce\n>>   your diff once you rebase.\n>> \n>> - The xcode_gitattributes() bits aren't likely to go upstream as-is.\n>>   But possibly these could ship as a default $sysconfdir/gitattributes?\n>> \n>> - the rest look like assorted little fixes that probably could go\n>>   upstream\n> \n> Jeremy, could you elaborate on what\n> https://github.com/jeremyhu/git/commit/61b42bc5d2 was about? I.e.\n> where was this discussed & tests for this refused?\n> \n> Seems sensible to me to have this in some form, but the test as-is\n> seems to be a general regression test, not Apple-specific, so it would\n> need to be changed somewhat, or does it only happen with some other\n> custom patch of yours?\n\nIt was a bug in upstream git and not a bug specific to an Apple change.  We haven't traditionally had many custom changes on our end.  The few we have, we didn't feel they were appropriate or were often rejected when we tried (eg: using CommonCrypto and Security.framework, this one, etc.).\n\nFor this particular case, I discussed the bug with the committer (Carlo) and reviewer (Junio) of the commit (18e051a3981f38db08521bb61ccf7e4571335353) via email back in October 2011.  My proposed fix and test were never accepted.  As such, we continued to ship my patch in Xcode's git and MacPorts' git until the underlying bug was actually fixed by someone else in 2014 (ddc2a6281595fd24ea01497c496f88c40a59562f + 655ee9ea3e6c0af57d320e84723ec3bf656cdbf7).  I kept the test in our test suite to ensure we didn't regress.  Here's the final post from that thread after the fix in 2014:\n\n\nFWIW, it seems that this bug was addressed by ddc2a6281595fd24ea01497c496f88c40a59562f\n\nThanks Martin, now we're no longer carrying around an extra patch for our build of git ;)\n\n--Jeremy\n\n> On Oct 17, 2011, at 14:55, Jeremy Huddleston <jeremyhu@apple.com> wrote:\n> \n> ping.  Did you get my response below with extra details?  I just got a duplicate bug report, so it apparently effects people...\n> \n> Please let me know if I can be of further assistance.\n> \n> On Oct 11, 2011, at 2:17 PM, Jeremy Huddleston wrote:\n> \n>> Thanks for your response Junio.  The text of the original bug report is below.\n>> \n>> I created a git bisect test script which bisected the problem and found out that the difference was that the trailing / was removed by your code change.  git treats paths with a trailing / differently.  I don't know *why* it treats them differently, but it does.\n>> \n>> There's nothing \"special\" about JustDoItGit.tar.bz2 except that it contains a .git dir and has a file layout that works with the bisect script I wrote.  You can test this yourself by:\n>> \n>> mkdir -p ~/tmp/PR-10238070\n>> cd ~/tmp/PR-10238070\n>> tar xjf JustDoItGit.tar.bz2\n>> cd ~/git-checkout\n>> /path/to/test_10238070.sh\n>> \n>> Here's the original report:\n>> \n>> I've tracked the cause of '<rdar://problem/10160992> ##snipped title##' down to a regression in git.\n>> \n>> Unzip the attached JustDoItGit.zip project and replace the path in the following commands to the unzipped location on your system:\n>> \n>> #delete git in /usr/bin/git\n>> sudo rm -r /usr/bin/git\n>> #link it to /usr/local/bin/git since that's where ditto will place the new bits\n>> sudo ln -s /usr/local/bin/git /usr/bin/git\n>> \n>> # first, install git 1.7.3.2 to verify that the bug does not reproduce\n>> sudo ditto ~rc/Software/Slate/Roots/Git/Git-14~19.root/ /\n>> sudo rm -r /Users/<you>/MyGitRepo.gitdir\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir init --bare --quiet\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ add -- /Users/<you>/Desktop/JustDoItGit/ /Users/<you>/Desktop/JustDoItGit/JustDoItGit/JustDoItGitAppDelegate.h /Users/<you>/Desktop/JustDoItGit/JustDoItGitTests\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ commit -m \"Hello.\"\n>> \n>> The expected result of the commit is something like \"18 files changed, 7364 insertions\". If that's what you get, great, now keep going.\n>> \n>> sudo rm -r /Users/<you>/MyGitRepo.gitdir\n>> # install the slate version of git, 1.7.5.4\n>> sudo ditto ~rc/Software/Slate/Roots/Git/Git-19.root~2/ /\n>> sudo rm -r /Users/<you>/MyGitRepo.gitdir\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir init --bare --quiet\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ add -- /Users/<you>/Desktop/JustDoItGit/ /Users/<you>/Desktop/JustDoItGit/JustDoItGit/JustDoItGitAppDelegate.h /Users/<you>/Desktop/JustDoItGit/JustDoItGitTests\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ commit -m \"Hello.\"\n>> \n>> The expected result is what's above, something like \"18 files changed, 7364 insertions\". But the actual result is that only the root folder \"/Users/<you>/Desktop/JustDoItGit is added\n>> \n>> This is a problem because it subsequently causes <rdar://problem/10160992> ##snipped title##\n>> \n>> … and therefore breaks Xcode's snapshots feature.\n>> \n>> <JustDoItGit.tar.bz2><test_10238070.sh>\n>> \n>> On Oct 11, 2011, at 10:45, Junio C Hamano wrote:\n>> \n>>> Jeremy Huddleston <jeremyhu@apple.com> writes:\n>>> \n>>>> real_path will strip the trailing / from provided paths.  This fixes\n>>>> a regression introduced in 18e051a3981f38db08521bb61ccf7e4571335353\n>>> \n>>> What is the breakage? The above does not explain why stripping the '/' is\n>>> a wrong thing, and which caller that used to work is broken by that\n>>> behaviour.\n>>> \n>>> A new test block in some of the t/t[0-9]*.sh script to demonstrate the\n>>> breakage and fix to explain and justify your fix better, please?\n>>> \n>>>> \n>>>> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>\n>>>> ---\n>>>> \n>>>> Here's an updated version that should be a bit more portable and warning-free.\n>>>> \n>>>> setup.c |   10 +++++++++-\n>>>> 1 files changed, 9 insertions(+), 1 deletions(-)\n>>>> \n>>>> diff --git a/setup.c b/setup.c\n>>>> index 61c22e6..e3a8ae3 100644\n>>>> --- a/setup.c\n>>>> +++ b/setup.c\n>>>> @@ -10,8 +10,16 @@ char *prefix_path(const char *prefix, int len, const char *path)\n>>>> \tchar *sanitized;\n>>>> \tif (is_absolute_path(orig)) {\n>>>> \t\tconst char *temp = real_path(path);\n>>>> -\t\tsanitized = xmalloc(len + strlen(temp) + 1);\n>>>> +\t\tsanitized = xmalloc(len + strlen(temp) + 2);\n>>>> \t\tstrcpy(sanitized, temp);\n>>>> +\n>>>> +\t\ttemp = strrchr(path, '\\0');\n>>>> +\t\ttemp--;\n>>>> +\t\tif (*temp == '/') {\n>>>> +\t\t\tchar *s = strrchr(sanitized, '\\0');\n>>>> +\t\t\ts[0] = '/';\n>>>> +\t\t\ts[1] = '\\0';\n>>>> +\t\t}\n>>>> \t} else {\n>>>> \t\tsanitized = xmalloc(len + strlen(path) + 1);\n>>>> \t\tif (len)\n>>> \n>> \n> \n\n\n\n\n\n\nOnce I rebase on top of 2.18, I'll send out the full set of changes to git@vger as a starting point for discussion again.  I imagine many are not acceptable in current form but might be a starting point for additional discussion (eg: adding options for vendor-specific version rather than the hard coded \"Apple Git-##\" string).\n\nThanks,\nJeremy\n\n\n"}]}