There still has to be a certain point-of-access, and as always, protecting oneself is a matter of performing regular updates. Even though Debian and Ubuntu use Dash for general script execution (and this reduces their vulnerability to Shellshock*, although they've used Dash for years just because it's faster), there was an update that came through the pipeline last night for bash, I assume in the effort to begin tackling this.
The overall scenario seems to be mostly of concern for those who do operations with external services - SSH, Apache servers, etc. While Apple will eventually get OSX's default version of bash patched, in general it's better to switch bash's update path to the builds provided by Homebrew. Mainly because Apple ships OSX with bash 3.2 (with minimal backported patches, which is where the fix will come), while Homebrew provides the latest stable version (currently 4.3, plus the regular urgent security patches and bugfixes any normal repo system will update their builds for). For reference, bash 3.2 was released in
2006, and
stopping getting regular patches after November of 2008, and had no patches from March 17th, 2010 until 2 days ago, when the news of this broke. 4.3 was released as stable 7 months ago, and is
still being regularly updated, because it's the current version.
*
Patch Bash NOW: 'Shellshock' bug blasts OS X, Linux systems wide open ? The Register
Ubuntu and other Debian-derived systems that use Dash exclusively are not at risk – Dash isn't vulnerable, but busted versions of Bash may well be present on the systems anyway. It's essential you check the shell interpreters you're using, and any Bash packages you have installed, and patch if necessary.
As long as the user already has
Homebrew installed, it's possible to switch bash over to Homebrew's by doing the following:
Code:
# Install bash 4.3 from Homebrew:
brew install bash
# Change the permissible login shell to Homebrew's build of bash:
sudo open -a TextEdit.app /etc/shells
# Change '/bin/bash' to '/usr/local/bin/bash', save, and exit TextEdit.
# Force the old version of bash out of the execution path for the Terminal by renaming it:
sudo mv /bin/bash /bin/bashold
# Symlink Homebrew's to /bin/bash so that existing shell scripts still work:
sudo ln -s /usr/local/bin/bash /bin/bash
That will make it to where only Homebrew's is seen when the user types in 'bash', and the Terminal will use it instead of the default one. You can see this by typing in 'bash --version' and looking at the readout. You may need to close and re-open the Terminal to get it fully refreshed. Generally, I'd trust Homebrew to get any patches and updates out faster than Apple would anyway, and this makes it simple to do so.
And yes, Homebrew's version of bash is 4.3.26, meaning it has all of the current patches applied. It actually updated to .26 while I was in the process of writing up that set of instructions. I'd installed it a couple minutes earlier, as .25, and voila, an update came down before I logged off, the same day as the .26 patch was uploaded to the GNU mirror linked to above.