Live data from Hacker News

Git security vulnerability announced

github.blog

261–270 of 302 posts

Re: Git security vulnerability announced

#261
post #85
post #66

Earlier quoted context omitted.

Ok, we've changed to that from https://github.com/git/git/commit/8959555cee7ec045958f9b6dd6... . Thanks!

You basically substituted both the link and the title to a completely different one after long time people discussing that specific link and title. Now half of the comments don't really make sense at the first glance.

Yeah, that happens sometimes, but if the second link is more suitable then the discussion eventually adapts for the better. So the only real question is which link is more suitable.

One principle I like to use is to assume readers are smart—e.g. in this case, that readers are smart enough to figure out that there are two relevant links to the comments. Of course randomness is also a factor, but it mostly all works out.

Re: Git security vulnerability announced

#263
post #66

Earlier quoted context omitted.

Ok, we've changed to that from https://github.com/git/git/commit/8959555cee7ec045958f9b6dd6... . Thanks!

Ah ok this was the real link. The top level link to github.blog doesn't seem to have anything that this link here has. Please change it back.

Sorry for the confusion! I've added https://news.ycombinator.com/item?id=31016938 at the top of the thread so people will see both links.

Re: Git security vulnerability announced

#265

Earlier quoted context omitted.

I do not understand why symbolic links are "poisonous"? Can I get some context?

I think it's just that they're tricky when it comes to ownership. People who write code that depends on some type of file or directory ownership for security often don't think about the ways symlinks can be used to bypass their security model. You can sort of think of a symlink as having 2 owners: the user that owns the symlink itself, and the user who owns the file pointed to by the symlink. One of those owners migh…

Daemons that care about security setuid temporarily before opening a file and then setuid back

Re: Git security vulnerability announced

#266
post #43

Earlier quoted context omitted.

The premise of this story is one I lived. I was a web dev intern for a local government office and they actually emailed each other zips of dotnet apps. The only difference is that my git pitch went really well and they promised they would start using it. They never started using it.

Local government software dev is making half of what they could make doing barely anything at a private sector operation. Not surprising there’s an IQ problem.

Hey, don't chalk it up to IQ. I've met plenty of people in government software dev who work hard trying to make a dent in their career because they came from backgrounds which private sector operations ignore.

The person you're talking about totally exists, but they run the department.

Re: Git security vulnerability announced

#267
post #177

Earlier quoted context omitted.

Can you say what Linux distro does this? Seems like very poor taste for a command shell to be assuming one particular SCM.

On Ubuntu, and I presume therefore many debian derivatives and debian itself, `apt get git` will install a file called `/usr/lib/git-core/git-sh-prompt` (dpkg -S /usr/lib/git-core/git-sh-prompt). This script allows you to see repository status in your prompt. It comes with 5 utility functions that AFAIKS are usable in all common shells: __git_ps1_show_upstream () __git_ps1_colorize_gitstring () __git_eread () __git_s…

> It would be trivial to have a similar mechanism for `bash_rc.d` which allows for a pluggable system to extend and modify your bash.

There is /etc/profile.d/ which serves much the same purpose for login shells, though PS1 is normally a non-exported shell variable so it wouldn't be inherited. You can configure most other aspects of the shell this way, however. And there is also /etc/bash.bashrc which is read before ~/.bashrc, though it doesn't provide a convenient directory for drop-in scripts by default the way /etc/profile does. It would be trivial to add that if desired. (All based on Debian; YMMV.)

Re: Git security vulnerability announced

#268

Earlier quoted context omitted.

This is really dismissive. Unexpected execution is not a users fault, and can happen for a variety of reasons (you telling me you’ve never unzipped a full git path someone sent you?)

No? Why would someone zip me a git repo? You can clone/push/pull directly between machines.

The source machine may not be set up as a server, or you may not have an account there. Sending a .zip file could be simpler than pushing the repo to a third system the receiver does have access to.

Re: Git security vulnerability announced

#269
post #250

Earlier quoted context omitted.

On Windows, it's amazing how confusing permissions are. Seemingly everything needs admin permission to run. If the program can't get admin permission from you, it can probably just ignore that and do stuff like install to %appdata%. Chrome does this, for example, apparently to fix a bug where work place administrators didn't want their users installing programs with administrative permission. Chrome or anyone else ca…

I don't think Windows permissions are that complicated, and certainly covers the problem space of actual companies better than unix. The problem is that the original design was somehow opinionated and didn't match what home users were doing. To oversimplify: - there's the kernel, which can do anything - there SYSTEM, which is is kind of like "root" in unix, but only used by services (you can't log in as SYSTEM) - the…

> - there are user accounts with Administrator rights, which can do "anything" (can be slightly limited by the above two)

Not technically. Windows permissions follow a "capability" model more than a "user" model. In the Linux user model a user account is always "just one thing". In a "capability" model the user may request different capabilities at different times (based on different needs).

Even in the bad pre-UAC days users didn't have Administrator rights "at all times" in the sense of an Admin account (or group) in the Unix/Posix model, they'd request the capabilities as they needed them and the system would grant them as it saw fit, which was usually just automatic and invisible. The tokens for admin and non-admin stuff were "always" different in Windows. UAC just finally changed it from an "auto-grant" to a "user consents to the grant". UAC wasn't bolted on to the security model of Windows NT, it intercepted token flows that already existed and removed the "automatic" nature of them. (That's why the UAC transition hurt so much at first, especially in Vista, not that it was "bolted" on, but that a lot of software had been built around presumptions about these "automatic" token flows and assumed they were cheap/easy so over-requested them rather than requesting them as rarely or as specifically as truly necessary.)

> Home users got into the habit of only using one user account with admin credentials. It's convenient, but effectively running everything as root.

Not in the Linux sense, no. A home user account isn't "effectively running everything as root". UAC is like sudo in that it acquires a separate user token for subsequent actions. Details about the account may be similar (because of the capability model, the "account" is the same, but the capabilities differ), but they are "distinct" accounts in the Posix reasoning of name+capability.

Large companies that disable UAC and require separate "Admin" accounts are over-reacting/over-correcting, often because they are expecting the Linux/Posix model or because their tools were. UAC is a sudo-like tool: the user tokens are very different on the other side of the UAC fence. Requiring a "physically" separate account is security theater and not very different from just changing UAC from Yes/No flows to "Require Password" flows (unless your auditing tools are bad at their jobs and coalesce tokens with different capabilities based on things like username due to presumptions from Posix systems). It's silly to manage twice as many accounts when you can just make UAC stricter and require passwords. (And also Microsoft's several decades of research show that "Require Password" flows are themselves security theater, people don't actually think longer about UAC prompts if they have to type their password in more often, it just trains them to type their password in more often, which makes it easier to phish their passwords.)

Re: Git security vulnerability announced

#270

> Run the uninstaller under an administrator account rather than as the SYSTEM user How do I run something as SYSTEM? I thought I always ran as "me" or Administrator. Is this only likely to happen for deployment automation tools? > Avoid running the uninstaller until after upgrading Don't leave us with this cliff-hanger... Does the upgrade installer run the uninstaller first? (The original report doesn't have this bu…

Yeah, that's something that should be clarified. I'm almost certain `winget upgrade git` will run the uninstaller first...

It shouldn't. So much of the (ugly, hideous) complexity of the MSI engine is specifically there because of presumptions that installers don't uninstall previous versions but generally upgrade in place. winget should just defer to MSI norms here for Git for Windows as Git for Windows is a mostly normal MSI-based installer still.
Post reply on HN