Rogue Source Code Repos Can Compromise Mac Security Due To Old Git Version (softpedia.com)
An anonymous reader writes: Recent Mac versions come bundled with a very old version of Git (2.6.4) that is vulnerable to two security flaws that allow attackers to execute code on the device when the user forks a Git repo holding "malicious" code. The problem is that users can't upgrade this Git repo, they can't change its runtime permissions, nor can they remove it because Apple blocks even root users from twiddling with some system-level programs. "If you rely on machines like this, I am truly sorry. I feel for you," the researcher wrote on her blog. "I wrote this post in an attempt to goad them [Apple] into action because this is affecting lots of people who are important to me. They are basically screwed until Apple deigns to deliver a patched git unto them."
Well why can't you just compile a new git and stick it in your path?
sudo port install git
echo "export PATH=/opt/local/bin:\$PATH" >> ~/.bashrc
Oh! The humanity!
(Requires https://www.macports.org/insta...)
As an aside, it's possible to override SIP, but it's a bit of a PITA.
First, you turn off System Integrity Protection by following the directions on Apple's Configuring System Integrity Protection page.
Then, you replace it (or any other program you want, including /System/Library/Kernels/kernel).
Then, if you want, you turn System Integrity Protection back on.
sudo port install nethack
In a band? Use WheresTheGig for free.
It's not Apple's fault here. The git community developers completely and utterly botched this vulnerability. They announced it to the world, claiming it was fixed in 2.7.1 only to retract that a few days later after releasing 2.7.3 and then finally fixing it in 2.7.4. Apple released Xcode 7.3 just a couple days after git-2.7.4 was released, so it's no surprise that it doesn't contain the fix.
Had the git community actually disclosed companies ahead of the announcement (and better yet, had released a fix before the announcement, or even have been *accurate* in the announcent), the vulnerability likely would have been fixed in Xcode 7.3. As it is, developers need to wait for Apple to spin an updated version of Xcode for this fix.
The blame lies 100% on the git community for this debacle.
See https://marc.ttias.be/oss-security/2016-03/msg00195.php for more details about how they completely failed here.
Why is everyone so focused on replacing /usr/bin/git on their Mac? It's not git. It's just a stub that uses libxcselect to find git within Xcode:
$ otool -L /usr/bin/git /usr/bin/git: /usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
If you really want to replace it, replace the one inside of Xcode:
$ xcrun -f git /Applications/Xcode.app/Contents/Developer/usr/bin/git
Or just wait for Apple to release an update with the fix, and go yell at the git developers for completely screwing up the disclosure of this vulnerability, thereby not giving companies time to prepare a release with the fix.
Also, just as one more example, even as of OSX 10.10 Yosemite, the shipped version of bash is prehistoric.
In a distributed VCS like git, there isn't really a distinction between clone and fork.
The operation is the same but the purpose is different... a fork provides the ability to push changes to the hosting service when you don't have write access to the original repository. A local clone is usually distinguished from a fork in this way.
All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
Apple's record on security updates is pathetic and their lack of communication doesn't help matters. Unless they are prodded by the press, their standard position is to remain silent.
What makes you say that? Vulnerabilities fixed in Apple updates are well documented:
https://support.apple.com/en-us/HT201222
The version of bash shipped is the last GPLv2 version (plus patches). Apple doesn't ship any GPLv3 code.
I am TheRaven on Soylent News
Xcode isn't using it despite the path being set when launching xcode.
Change is certain; progress is not obligatory.
It's an apple hate story that actually is devoid of anything useful.
Do not look at laser with remaining good eye.
What, you mean the USB HID standard that defines two axes of movement (X and Y) and three buttons? Or the Microsoft convention that certain buttons, on certain mice, should be mapped to forward and back—there being no actual standard for which USB HID button numbers should be mapped to those functions?
Depending on what you mean by "clean shutdown", you should just have to do some RBAC setup:
Edit /etc/security/exec_attr and add the following profile:
exec_attr:Shutdown:suser:cmd:::/usr/sbin/shutdown:uid=0;gid=1
Add this profile to /etc/user_attr :::: profiles=Shutdown
yourusername
Then your user can shutdown with /usr/bin/pfexec /usr/sbin/shutdown
Instructions taken from here.
As to the more general topic, all major OSes operate on the "Principle of Least Privilege", which in this case means discouraging casual use of the superuser account, or disabling it entirely. With apologies to Twain, "Suppose you were logged in as root all the time, and suppose you were an idiot. But, I repeat myself."
Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.