4 ms·
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
by omegalulw 5y ago
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 is malicious. I feel like I'm missing something obvious?
- tedunangst 5y agoI can run git init in /tmp.
- hda2 5y agoThen don't run commands in PS1 that blindly execute arbitrary code in that directory. Honestly, people haven't learned a single thing from Window's autorun days.
- saagarjha 5y agoThis is kind of why I’d want a git command that doesn’t blindly execute arbitrary code from the directory, as I mentioned above.
- tedunangst 5y agoI mean, I don't have git status in PS1 anyway, but I woke up today not knowing that git status will run arbitrary commands. The documentation for git-status does not mention this possibility, like git-commit and git-pull do.
- Dylan16807 5y ago> Then don't run commands in PS1 that blindly execute arbitrary code in that directory. That's like telling people "be secure". Nobody expected that git commands would do that, and also they shouldn't do that. Not that I think this is a good fix...
- mort96 5y agoThe intention of someone running `git log` or `git status` isn't to execute arbitrary code, it's to see a log or the changed files. Telling people "just don't run arbitrary untrusted code" is useless advice when the whole problem is that git runs arbitrary untrusted code in situations where most people wouldn't expect it to execute arbitrary code. At least spend a couple seconds to think about what you're saying and how it relates to the issue at hand. You're being insufferable.