I shouldn’t ask too much of an open source project, etc. etc., but this sounds like something Git should fix themselves rather than just outright disabling. “I want to go into a directory and run git log” is kind of a simple thing to want to do and to not be able to do that sucks. It’s easy to pontificate on this forum but having a “safe” git that doesn’t automatically run hooks or whatever seems like the way forward…
Their solution sounds reasonable. I don't particularly get why this is even a new vulnerability? If someone manages to create a .git at the root, that means the whole filesystem is under version control and appropriate hooks should execute. Why would this be surprising behavior now? In any "multi user system" as the article says, this would need root access and such a user can do many other bad things if their intent…
Git security vulnerability announced
81–90 of 302 posts
Re: Git security vulnerability announced
#82Was this change discussed publicly prior to merge? I think this is a big mistake. Build environments use separate users for security purposes. It's insane to decrease security for everyone by requiring a single user to do everything because some of your users want to have fancy terminal prompts. At the very least, let users configure this at a per-user level.
Re: Git security vulnerability announced
#83> Merely navigating to such a space with a Git-enabled `PS1` when there is a maliciously-crafted `/scratch/.git/` can lead to a compromised account. I'm curious about this -- what's the attack vector here?
The key is the "Git-enabled `PS1`". PS1 is an environment variable recognised by common shell programs (such as bash) that configures the shell prompt. Git often installs its own glue into the prompt that ends up running a Git executable to discover such things as the current branch name and how many changed files. The vulnerability is that it's possible to add malicious things to .git/config that the git executable…
Re: Git security vulnerability announced
#84Earlier quoted context omitted.
In earlier news, it's unexpected that "cd directory" will give the directory owner access to your account.
Tbh I thought this was pretty obvious. Git hooks have always been sketchy as hell. Can't stand the Mac specific shit my co-workers keep dumping in there.
Wouldn't untrusted git hooks mean that git verify-* are useless since you're already running untrusted code?
Re: Git security vulnerability announced
#85Earlier quoted context omitted.
This article on a CVE for git published today has details on the vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-an...
Ok, we've changed to that from https://github.com/git/git/commit/8959555cee7ec045958f9b6dd6... . Thanks!
Re: Git security vulnerability announced
#86Earlier quoted context omitted.
I'm guessing the goal is to lock down git's security for any potential future vulnerability. If some security issue was discovered with git that could be exploited with a malicious .git directory structure, requiring git directories to be owned by the logged-in user will reduce the impact.
Or, an exploit was discovered, and quietly patched out recently
Re: Git security vulnerability announced
#87Earlier quoted context omitted.
Their solution sounds reasonable. I don't particularly get why this is even a new vulnerability? If someone manages to create a .git at the root, that means the whole filesystem is under version control and appropriate hooks should execute. Why would this be surprising behavior now? In any "multi user system" as the article says, this would need root access and such a user can do many other bad things if their intent…
I can run git init in /tmp.
Honestly, people haven't learned a single thing from Window's autorun days.
Re: Git security vulnerability announced
#88Re: Git security vulnerability announced
#89Re: Git security vulnerability announced
#90Earlier quoted context omitted.
This article on a CVE for git published today has details on the vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-an...
Ok, we've changed to that from https://github.com/git/git/commit/8959555cee7ec045958f9b6dd6... . Thanks!