Re: CVE-2014-6271 – remote code execution through bash
seclists.org
seclists.org
The moment I saw the news here, I ran to update my stuff -- the patch was already there, marked stable in the official gentoo repositories.
My impression is that they're following very closely the progression of this event and the relevant GLSA entries are being updated without any noticeable delays.
Thanks for running the show guys, you're true professionals!
Here's the relevant Gentoo Linux Security Advisory (GLSA) link: http://www.gentoo.org/security/en/glsa/glsa-201409-10.xml
However, OSX which is also affected is still waiting. If I owned an Apple server I'd be screaming right now.
Embedded devices with closed eco systems are also stuffed (we've got to moved to open router firmware like OpenWRT). Basically, you can carry on as normal if you use open source the way it was intended.
If you want to beat Apple up, a much better case was goto fail where they left all of the Mac users hanging for a long period of time after shipping the iOS patch and disclosing the vulnerability.
That said, I do think it's ridiculous though how slow Apple is. It's absolutely crazy. I can only hope that Heartbleed and now this are causing some major internal reviews over there...
https://apple.stackexchange.com/questions/146849/#146851 has a simple enough step-by-step guide to patching & recompiling the system version with the appropriate patches, if you've got XCode installed and are comfortable with that sort of thing.
Agreed on the Apple security response time though. I reckon they have all their best guys fighting the IOS jailbreakers :P
Homebrew was (at the time, maybe a year or so ago) missing a lot of things I wanted to use, and some packages broke for no obvious reason.
I'm sure some of it was the result of my rather frankensteinien setup by that point, but I have no real desire to reinstall things again until I have to.
MacPorts may be occasionally annoying, but at least it's usually in a way have come to understand. :)
What about all those EOLed distros that don't see most security updates? Being "Open" is a non-issue here.
I could argue, that there is a bug for over 20 years in open source and nobody discovered it? WTF? So Windows is better, because it does not has this bug in the first place?
There is no right or wrong. Open Source is not better and not worse. Everything has its place and its purpose.
Regarding those embedded device I can say, they don't use BASH. Because of size constraints they all use Busybox, which does not have this problem, like all those other Shells.
Procedure for Ubuntu 8.04 and other installations where binaries are not available (default 8.04 LTS server did not have m4 and bison dependencies), assuming that 1st patch has already been applied per https://news.ycombinator.com/item?id=8364385 :
#Executing as root
#assume your sources are in /src:
cd /src/
echo "getting m4..."
wget http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz
tar zxvf m4-latest.tar.gz
cd m4-1.4.17/
./configure && make && sudo make install
cd /src/
echo "getting bison..."
wget http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz
tar zxvf bison-3.0.tar.gz
cd bison-3.0
./configure && make && sudo make install
echo "getting patch..."
cd /src/
#replace line below with wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-026 tomorrow
wget http://seclists.org/oss-sec/2014/q3/att-690/eol-pushback.patch
cd bash-4.3
patch -p0 < ../eol-pushback.patch
./configure --bindir=/bin && make && sudo make install(The fix changes it so that exporting is done through specially named variables. Instead of exporting `x='() { :; };`, it now exports `BASH_FUNCTION_x()='() { :; };'`.)
It would take actual use cases to convince me it's not a terrible idea. No matter what it's a mechanism to throw arbitrary code into a script that has no say in it. This is not the sort of thing you should do because it seems cool, it should be the sort of thing you do because of a really compelling use case that necessitates it. The fact that afaik no other shell has implemented this behaviour since bash did (a couple of decades ago if I understand correctly?) would rather suggest there is a lack of need for this.
So I don't know if every architecture, and version is updated with the same speed.
X="() { :;} ; echo busted" /bin/sh -c "echo stuff"ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Sep 24 08:07 /bin/sh -> bash
However if you pass any user data (_POST, _GET, etc) into a system/exec etc call that sets an environment variable then you would be vulnerable.
wget https://oss.oracle.com/el4/SRPMS-updates/bash-3.0-27.0.2.el4...
rpm -ivh bash-3.0-27.0.2.el4.src.rpm
rpmbuild -ba /usr/src/redhat/SPECS/bash.spec
rpm -Uvh /usr/src/redhat/RPMS/x86_64/bash-3.0-27.0.2.x86_64.rpm
My server runs a couple of wordpress sites and a rails app - not sure where the vulnerability was exploited but be warned, looks like bots are already crawling for it
It's possible they had already installed a backdoor using the first vulnerability before I patched it, or perhaps something else entirely (though that's a little too coincidental)
RHEL: https://rhn.redhat.com/errata/RHSA-2014-1306.html
CentOS update is available also - just not on some mirrors yet.