OS X Bash Update 1.0
support.apple.com
support.apple.com
$ curl -s https://raw.githubusercontent.com/hannob/bashcheck/master/bashcheck | bash
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
bash: line 18: 14885 Segmentation fault: 11 bash -c "true $(printf '<<EOF %.0s' {1..79})" 2> /dev/null
Vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser inactive, likely safe from unknown parser bugs $ foo() { echo foo; }
$ foo
foo
$ export -f foo
I got this variable: __BASH_FUNC<foo>()=() { echo foo
} ~$ echo $BASH_VERSION
4.3.25(1)-release
~$ curl -s https://raw.githubusercontent.com/hannob/bashcheck/master/bashcheck | bash
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
Not vulnerable to CVE-2014-6271 (original shellshock)
Vulnerable to CVE-2014-7169 (taviso bug)
bash: line 18: 1339 Segmentation fault: 11 bash -c "true $(printf '<<EOF %.0s' {1..79})" 2> /dev/null
Vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser still active, likely vulnerable to yet unknown parser bugs like CVE-2014-6277 (lcamtuf bug)
And fwiw even before install new bash via homebrew I had also followed these instructions:http://apple.stackexchange.com/questions/146849/how-do-i-rec...
Brew installs bash at `/usr/local/bin/`.
But there's a lot of spectrum between "i have audited this software" and "i'm just piping this random url off the web to my shell". Many software distribution mechanisms provide varying degrees of curation, reputation, accountability etc.
Also in this case the link was provided in a context that would select for people who are concerned about security updates (= looking after high value systems) and still somewhat naive about security practices, and could get run on systems that have strict rules about installing software on them.
Certainly, one can't audit every line, but just as certainly, one can establish a train of trusted sources and audit the rest (like this tiny snippet of bash, which is so utterly trivial to verify you might as well polish the habit on it).
I'd rather take an extra few seconds to do:
$ curl https://raw.githubusercontent.com/hannob/bashcheck/master/bashcheck > bashcheck.sh
$ cat bashcheck.sh # nothing fishy
$ chmod +x bashcheck.sh && ./bashcheck.shIt doesn't 'display' all bytes, because not all bytes are displayable. hexdump would do a better job there.
https://raw.githubusercontent.com/hannob/bashcheck/9ee8db0bf...
(This assumes Github hasn't been rooted and you don't have a MITM with access to a trusted CA but … almost everyone is screwed at that point)
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
Not vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser inactive, likely safe from unknown parser bugs
And for 10.7: http://support.apple.com/kb/DL1767
Edit: Further information from the announcement is available here: http://lists.apple.com/archives/security-announce/2014/Sep/m...
The direct download pages are published first. It should be showing up on the update servers shortly.
This addresses CVE-2014-6271 and CVE-2014-7169 only. There are currently 6 CVEs listed on the Wikipedia page (not sure which are accurate): http://en.wikipedia.org/wiki/Shellshock_%28software_bug%29#S...
Some protection is better than none and I'm glad to see Apple rapidly responding. But this doesn't fix all the issues known to exist currently.
> I'm glad to see Apple rapidly responding
It seems we have different expectations concerning the term rapid...3-5 days is pretty decent considering that the DHCP stack on OS X isn't vulnerable and only customers that had enabled the apache2 instance and configured it with non-default mods were possibly affected.
More often than not Apple is removing GPL code from OS X altogether in the face of issues (example: samba is now replaced with 'smbx' in-house implementation).
I felt it was 50/50 that they'd update it vs. remove/disable it.
Edit: If you disagree with me, please reply instead of downvoting.
Regardless, the difference is people who run Linux upgrade major versions intentionally (I assume the switch happened on a major version upgrade) and expect software packages to have to support their OS version. For example, the package manager keeps separate packages for each distribution.
OS X works differently. It's a customer OS, which people upgrade without reinstalling anything, and they expect their software to continue working. Furthermore, OS X software never targets specific OS versions, instead only targeting a minimum version, and software that works on one version of OS X is expected to work on the next version (any changes that break apps go through a deprecation process first, so the software has to be unmaintained for at least a major OS version before it will break).
Because of that, any software that relies on bash-specific functionality would break if bash were replaced, and it would generally be considered unacceptable.
What can be done is /bin/sh could be changed to another sh-compatible shell, but Bash would still have to be shipped on the system.
Debian shipped dash as default shell in Squeeze, which was in testing from 2010-08-06 and stable from 2011-02-06.
A slight correction to the poster before you: /bin/sh was linked to dash (making quite a few shellshock exploits fail on Ubuntu), while /bin/bash was the default user account shell... much as you've suggested!
On Yosemite:
$ /bin/sh --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
So yes, anything that naively creates subprocesses using /bin/sh -c is open to shellshock exploits on (unpatched) OS X. :-)Oh, you mean host any website that isn't a single static html page .... :/
> 3-5 days is pretty decent ...
According to the timestamps on the GNU ftp site for bash, the first patch was released 2014-09-24 10:24 (unknown timezone).
Slackware had their first upgrade file-set out at Wed, 24 Sep 2014 16:37:00 -0700 (PDT) (for six different versions, in both i386 and x86_64 variants).
The second patch is timestamped 26-Sep-2014 17:02 on the GNU ftp site. Slackware's second upgrade file-set was out Thu, 25 Sep 2014 13:38:49 -0700 (PDT) (again with twelve different packages). [no idea why there is time travel here, likely the datestamp on the ftp site was subsequently updated for some reason]
The final patch is timestamped 27-Sep-2014 22:38 on the GNU site, and Slackware had out their third upgrade file-sets at Mon, 29 Sep 2014 12:33:36 -0700 (PDT).
Without knowing the FSF's timezone, we can only make estimates, but, for the first patch: same day, second patch: unknown, the time travel effect prevents making any estimates, third patch: about a day and a half.
And other distro's had patches out even earlier than Slackware, so, no, 3-5 days is _not_ pretty decent, it is actually downright poor.
1) what difference would it have made, really, had apple distributed that first patch (that fixed one of 6 CVEs) instead of waiting for the second?
2) what attack vectors have you identified against an OSX system that exploit this vulnerability? (note that their dhclient imlpementation is not actually affected)
Seriously, why do you think companies like Microsoft rather write workarounds to issues on their website instead of putting out a 2 line code fix for a given issue? Couldn't possibly be that their QA process would take so long that it is easier to just publish the work around, right?
Let me guess, Apple could not have done right by your standards. Had they just published a how-to in order to update bash by hand, you would bitch that this is insufficient. Had they published unstable versions of the fix (like your mentioned "other distros" did just so they could say they already have a fix) you would have piped up along the lines of "nice going publishing unstable fixes that probably introduce more leaks than they fix"
Apple didn't make the patch they just repackaged it. That's five days to write a dozen lines of script to update the shell. Every single GNU/Linux distro was patched the day of, get real.
>I felt it was 50/50 that they'd update it vs. remove/disable it.
Remove it for what ash/sh? Tim Cook doesn't know a megabit from a megabyte, let alone a shell. That pencil pusher doesn't care about his users, only the money. This was only patched for PR. Still no sight of it on the automatic updates list.
Apple's certainly gotten a late start, but the "1.0" part of the update's name speaks to an expectation that this isn't the end of the line here.
(Of peripheral interest, whilst checking in the iOS Dev Center, I noticed there's a beta of iOS 8.1)
Since we didn't see another DP this week, I'm assuming the Bash update will appear in the RC... hopefully that's out soon.
Though a better question would be what the hell are you doing with 10.10 that you need to. OS X betas are very much beta.
Note that the patch from Apple allows bash functions to be escaped, albeit with a BASH_FUNC prefix - but you can get around this by using:
$ env '__BASH_FUNC<ls>()'="() { echo Game Over; }" bash -c ls
Game Over
[1] http://alblue.bandlem.com/2014/09/bash-remote-vulnerability....
Quoted from 0x0
Also for 10.8: http://support.apple.com/kb/DL1768 And for 10.7: http://support.apple.com/kb/DL1767 Edit: Further information from the announcement is available here: http://lists.apple.com/archives/security-announce/2014/Sep/m....
Just posting it here incase someone reads your comment and misses 0x0's
I guess us Yosemite users will have to wait for the next beta...
There is a handy zsh script (zsh is in /bin on OSX by default) to get the Bash tarball from opensource.apple.com, apply patches 52, 53, and 54 from ftp.gnu.org, build it, and then prompt to replace /bin/bash and /bin/sh. Xcode is required, and you have to run "sudo xcodebuild" once to accept the EULA.
https://github.com/tjluoma/bash-fix
This is the easiest way I've found to patch the system-level /bin/bash AND /bin/sh binaries.
(For those wondering, the 10.9 installer does not run on 10.10)
I wouldn't call it disconcerting that they're focusing their resources on released versions of OS X. I'd rather they cover the other CVEs sooner and ship 10.10.0 with no issues[1] when it's done than divert engineering resources to ship a patch for Yosemite.
[1] bash-related issues, at least. Apple's .0 track record speaks for itself.
If you didn't do this: cmd + s to boot in safe mode. /sbin/mount -wu / and chmod bash back to a useable state, if you get stuck at log in.
(master) $ echo $BASH_VERSION
4.3.27(1)-release
(master) $ ./bashcheck
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
./bashcheck: line 18: 7675 Segmentation fault: 11 bash -c "true $(printf '<<EOF %.0s' {1..79})" 2> /dev/null
Vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser inactive, likely safe from unknown parser bugs
It seems as though there is no patch that fixes CVE-2014-7186 yet?http://www.pcworld.com/article/2688672/two-scenarios-that-wo...
This is a big deal because it's remotely exploitable. But it's only exploitable remotely if you are running a network daemon that somehow invokes bash and sets environment variables without sanitization. Web sharing, SSH in some instances, a few MTAs.
The average user PROBABLY isn't running a daemon that is vulnerable. Though in some cases, you may be and not know it (like if you had turned on Web Sharing at some point)
All of this is not to say that if you can apply the patch, do it.
foo='() { echo not patched; }' bash -c fooIf you're facing an attacker with arbitrary control of both name and value of environment variables, and shell scripts that don't sanitize, you've got worse problems IMO.
Still, some Linux distributions are applying this unofficial patch, to only parse function definitions in prefixed environment variables to mitigate the threats.
[0] http://www.openwall.com/lists/oss-security/2014/09/25/13
Even then, at least the exploit for DHCP I saw manifests on the SERVER, not the client. When you are in a coffee shop, you are the client not the server. That means you would be the one to exploit the coffee shop, not the other way around.
No, the DHCP exploit was not on the server. It showed a sample payload a malicious DHCP could send to a client to achieve RCE. Also apparently some networks allow other clients to send DHCP commands so even if you trust the DHCP server it doesn't necessarily mean you are safe.
Would you say the same about Linux desktop users? Or do we tend to run Bash for more things? I'm unfamiliar with bash's role in OSX.
You should upgrade regardless, though, since bash is so ubiquitous that it's hard to be sure you're not vulnerable in some esoteric way.
Apple's patch won't work for Yosemite, so I'm stuck there too.
Basically to be vulnerable requires 2 components:
1. You have to be able to get some remote user specified stuff into a environment variable.
2. You have to invoke /bin/sh (calls to system(3)[1] do this, as well as actual shell scripts).
If you just have a non-server mac, there's no huge rush--no one has identified an actual stock service/daemon that is susceptible to the vulnerability.[1] "man 3 system"
System Requirements
OS X Mavericks v10.9.5 or later
so, they're not updating older machines? My partner still runs Snow Leopard 10.6.8!Source: http://www.512pixels.net/blog/2014/9/apple-posts-bash-update...
http://arstechnica.com/apple/2014/03/snow-leopard-updates-ar...
With Apple stuff it seems like it's best to stay within 2 revisions of the latest OS, especially since they've moved to shorter release cycles (yearly).
If only Alt+Tab worked on windows rather than apps, like in MS OSs, or even if there was a taskbar-style way to switch windows, she'd have so many fewer problems...
CMD-~ cycles through windows. hold-click or right-click on a Dock icon displays a list of Windows associated with the application
Alternatvely, perhaps she might like Exposé (try F3)
Apart from that, even on 10.6, you can do the update of Bash yourself, you're not required to use the Apple patch: https://github.com/ido/macosx-bash-92-shellshock-patched
This has been compiled on Mavericks, it may run on 10.6. If not, you may need to install Xcode
This may not help for your case, but it may interest keyboard shortcut junkies.
When I was getting used to the "interesting" way OS X handles CMD+TAB versus Windows' ALT+TAB, I was also frustrated at the app-vs-window issue.
I eventually figured out this workaround, which sounds complicated but is now muscle memory:
1. Hold CMD. (Don't let go until I say so.)
2. Press TAB once.
3. Tap the arrow keys (LEFT/RIGHT) to go to the correct application, e.g. Chrome.
4. When you have the correct application selected, press DOWN. (You can release CMD now.)
5. This will display all of the open windows for this application (same as "4 finger swipe down" gesture). You can use the arrow keys to navigate this. An extremely subtle blue halo is displayed around the selected window. Press RETURN to select.
Maybe they're saying you should upgrade for security reasons, but it'd be nice if they actually said it. Seriously, I'm failing to understand the amount of downvote-hate being focused on you right now, in every comment you gave in this thread. Sorry.
> something that's still perfectly functional
More functional, sometimes; I have 10.6.8 on my home Mac Pro because 10.7 removed a vital feature.http://arstechnica.com/apple/2014/03/snow-leopard-updates-ar...
Here’s for the crazy ones, the misfits, the trouble makers, the round pegs in the square holes. The ones who see things differently... and are still running Snow Leopard.
Mavericks is apple's Windows Vista
> This update requires OS X version 10.9.
$ bash --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
After: $ bash --version
GNU bash, version 4.3.26(1)-release (x86_64-apple-darwin13.4.0)I didn't get that at all. Are you running ports maybe??
$ bash --version GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) Copyright (C) 2007 Free Software Foundation, Inc.
$ bash --version GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin13) Copyright (C) 2007 Free Software Foundation, Inc.
* The version after applying this update will be:
OS X Mavericks: GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin13)
OS X Mountain Lion: GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin12)
OS X Lion: GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin11) port install bash
cat /opt/local/bin/bash >> /etc/shells
chsh -s /opt/local/bin/bash
mv /bin/bash /bin/bash-apple
ln /opt/local/bin/bash /bin/bash
solves the problem.