Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

CVE-2014-6271 bash vulnerability

more info on this here:

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271

http://www.reddit.com/r/sysadmin/comments/2hc5rk/cve20146271_remote_code_executi on_through_bash/


I'm assuming Apple will release a security update for this on supported versions of the Mac OS but in the meantime, is there a fix that we can apply? What is an easy way to patch this on older OS versions that Apple is no longer supporting? (perhaps something short of recompiling bash)

Posted on Sep 24, 2014 2:44 PM

Reply
43 replies

Sep 27, 2014 12:35 PM in response to Long Lane

Long Lane wrote:


Mr Hoffman


What are CVE-2014-7186/7?


I get an error message: HOME > CVE > ERROR: COULDN'T FIND 'CVE-2014-7186'


Does this mean, that there are further vulnerabilities which haven't been published yet?


There are a total of four bash bugs outstanding, and potentially more will be found.

Click on the CVE links for what's been published in the CVE database.

There are presently discussions around changing how bash processes its imports (adding a "import-functions" flag), and around adding prefixing to environment variables akin to what Apache does — both of which would greatly reduce the exposure to this general class of bash parser bug. Discussions in these areas are very active, as should be obvious and more details should settle out over the next few days as folks are able to research.

What  has in mind here for patches or when, I don't know.

Sep 27, 2014 7:14 PM in response to alternapop

My OSX Lion system has /bin/zsh installed by Apple. This isn't vulnerable to the shell shock quirks.


Its conceptionally simple enough to preserve a version of /bin/bash as /bin/bashOld and make /bin/bash a symbolic link to zsh.


I've done this, but I went through several roundabout steps making one admin user with /bin/zsh as the shell and another with /bin/bashOld as the shell.


I've also got a version of bash installed thru Macports as /opt/local/bin/bash. Its not vulnerable either.

Sep 28, 2014 6:04 AM in response to david_h

First of all, most Mac users are not at risk. If you aren't running a server, there is nothing to worry about.


Second, wait for official patches. Don't try to hack the system yourself. The procedure you describe will not work. Zsh is not bash. Any bash scripts that you want to run will not work correctly. However, if you were running a web server, any hacks that attempted to exploit this bug would still work just fine. Why is that? If you don't know, then you shouldn't attempt to fix it.

Sep 28, 2014 11:19 AM in response to etresoft

I'm aware that zsh is not bash, but if there are scripts that really need the specific version of bash that came with the system I'll change the shebang line to reference bashOld


After a restart, all the daemons came up OK. I carefully left functional admin users around that will work even if I mess up the symlink.


Because I'm a Macports user, my terminal scripts don't see /bin/bash -> /bin/zsh anyway; I actually use /opt/local/bin/bash .


If there is any service that dies on start up I'll find out about it.


I really don't want to take my laptop to the outside world exposed to rogue servers.


(Way outside the discussion: turn on the firewall, enable stealth mode and turn off most services. My Console window shows port sniffers hammering on my machine.)

Sep 28, 2014 1:00 PM in response to david_h

There may be other scripts, perhaps running under different users, that may call bash directly. Scripting languages like Perl will involve a shell depending on how you construct a system() call. I wouldn't recommend that anyone have a Mac directly connected to the Internet. That simply isn't Apple's focus and you would be on your own doing that. If you want to run Apache for development purposes, as I so, then make sure to configure it so that no one can access your server other than localhost. I don't consider the OS X firewall adequate for the task because it allows access by default and ignores signed applications by default.

Sep 29, 2014 3:19 PM in response to alternapop

This seems to be the best solution I've found for fixing it yourself while we wait for Apple to release a patch.


http://apple.stackexchange.com/questions/146849/how-do-i-recompile-bash-to-avoid -shellshock-the-remote-exploit-cve-2014-6271-an


It only seems to work on 10.6 and newer systems. How can someone still running a 10.5 Server update bash so that bash works and these vulnerabilities are patched? I know that some people still run them due to software vendor limitations. Bash 3.2.54 won't run on 10.5.

Sep 29, 2014 4:23 PM in response to Linc Davis

OS X bash Update 1.0 may be obtained from the following webpages:

http://support.apple.com/kb/DL1767 – OS X Lion - 10.7

http://support.apple.com/kb/DL1768 – OS X Mountain Lion - 10.8

http://support.apple.com/kb/DL1769 – OS X Mavericks - 10.9

It looks like these can only be obtained by manually downloading the pkg and installing them. They aren't available via Software Update or the app store.

Oct 1, 2014 1:28 AM in response to ChangeAgent

ChangeAgent wrote:


I read this morning that the patch only patch 2 of 3 vulnerabilities.


Actually, it's two of six, but Apple is also on record as saying:

The vast majority of OS X users are not at risk to recently reported bash vulnerabilities," an Apple spokesperson told iMore. "Bash, a UNIX command shell and language included in OS X, has a weakness that could allow unauthorized users to remotely gain control of vulnerable systems. With OS X, systems are safe by default and not exposed to remote exploits of bash unless users configure advanced UNIX services.

So currently there really is little reason for anybody not running a server service to be concerned whether they are patched or not.

CVE-2014-6271 bash vulnerability

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.