> if Git is configured globally to apply delay-capable clean/smudge filters (such as Git LFS) What is the simple test for whether this is the case or not? Is this a default-on scenario?
> What is the simple test for whether this is the case or not? As suggested in GitHub's announcement post[1], you can test this with the following: `git config --show-scope --get-regexp 'filter\..*\.process'` (replace the single quotes by double quotes on Windows Command Prompt) > Is this a default-on scenario? On Windows yes, because Git-for-Windows configures Git LFS by default. [1]: https://github.blog/2021-03-09-…
Git: Malicious repositories can execute remote code while cloning
101–110 of 228 posts
Re: Git: Malicious repositories can execute remote code while cloning
#102Earlier quoted context omitted.
MacOS by default uses a "case-preserving case-insensitive" filesystem, so you can create files with mixed case, but you can't create two files with the same name and different case. It's one of MacOS's more-egregious crimes against Unix. Fortunately it doesn't manifest that often, but it rears its head often enough to be a problem.
> Fortunately it doesn't manifest that often, but it rears its head often enough to be a problem. IIRC, one place where it does rear its head in when a file is renamed in a git commit to a value that downcases to the same value as the prior name. For example `Foo.txt`->`foo.txt`. I have `core.ignorecase = true` in my `.gitconfig` for this very reason.
The Linux kernel is one of them: several of the headers that get installed to /usr/include/linux/netfilter have conflicts on a case-insensitive filesystem. https://github.com/torvalds/linux/tree/master/include/uapi/l...
Debhelper used to be one of those until I convinced them to change it: they had a Debian/ directory for the Perl module Debian::Debhelper as well as a debian/ directory for the packaging metadata. https://bugs.debian.org/873043
(I suspect I'm a little unusual in wanting to have checkouts of Linux and Debhelper on my Mac homedir.)
Re: Git: Malicious repositories can execute remote code while cloning
#103Earlier quoted context omitted.
well played. I think that just got added to my standard vocabulary. Caching has caused more errors and bugs that I've had to deal with than I can recall. My favorite was an off by one error where we returned nicely cached info -- just for the previous user who came through our system! :facepalm: That was a bad one.
That's because essentially, "state" and "caching" are the same thing on some level. And the problem with state is that you have to make sure all your state transitions don't cause bugs. What we know as a "cache" is essentially creating new state representing existing state, with all new transitions...
Re: Git: Malicious repositories can execute remote code while cloning
#104Earlier quoted context omitted.
MacOS by default uses a "case-preserving case-insensitive" filesystem, so you can create files with mixed case, but you can't create two files with the same name and different case. It's one of MacOS's more-egregious crimes against Unix. Fortunately it doesn't manifest that often, but it rears its head often enough to be a problem.
It may be a crime, but is the result of a set of compromises in the design of the OSX filesystem, which had to work with a BSD variant while also being compatible with pre-OSX days. I think it’s one thing they actually did an elegant job with. EDIT: This document describes some of the challenges: https://www.usenix.org/legacy/publications/library/proceedin...
Re: Git: Malicious repositories can execute remote code while cloning
#105Earlier quoted context omitted.
Isn't the whole point of announcing security patches so that people can update before they're exploited?
Sure, I'm just saying this isn't a big deal and its likely no one was hit.
Re: Git: Malicious repositories can execute remote code while cloning
#106Earlier quoted context omitted.
That's because essentially, "state" and "caching" are the same thing on some level. And the problem with state is that you have to make sure all your state transitions don't cause bugs. What we know as a "cache" is essentially creating new state representing existing state, with all new transitions...
Cache is a type of state but not necessarily the other way around
I know this is overly philosophical, and in practical scenarios we readily (although not always unambiguously) differentiate between "cache" and "state", but the point about transitions and that being a major source of bugs still stands.
Re: Git: Malicious repositories can execute remote code while cloning
#107Earlier quoted context omitted.
It's barely even a joke to me anymore -- it's just too real for me to laugh. (Cache invalidation is essentially the same problem as managing mutable state -- "Out of the Tar Pit" frames mutable state as either essential or incidental, the latter being rederivable in principle from essential state. Incidental mutable state is no more and no less than a cache, and usually one with an informal and undocumented invalidat…
Humor is often the most efficient way to communicate/accept the truth.
Re: Git: Malicious repositories can execute remote code while cloning
#108Earlier quoted context omitted.
I can never remember what they are, though. To avoid this problem, I think I wrote them down on a post-it, but I had too many post-its on my desk so I got rid of them all, and now I can't remember.
> wrote them down on a post-it You write it on local media and kept it on-premises? Cloud is the new thing, I hear.
Re: Git: Malicious repositories can execute remote code while cloning
#109> This vulnerability affects platforms with case-insensitive filesystems with support for symbolic links, when certain clean/smudge filters are configured globally (e.g. Git LFS). Can we get the title changed to "on macOS and Windows?" I was worried for a second, but this is meaningless.
Anyway, what I'm actually thinking when something like this is disclosed is how many more similar things must be known to a team of malicious professionals at Unit 8200 or whatever. I don't think I would reasonably suspect "git clone" being capable of something like that. How many more things I don't suspect to be dangerous actually are? It feels almost pointless to worry about it.
Re: Git: Malicious repositories can execute remote code while cloning
#110I guess I'll have to stop running $ sudo git clone ...
I mean, there are... not-totally-unreasonable workflows that do clones as root. Edit: although I am struggling to think of one that clones from an untrusted source.
Uh... really? Like what?