News for hackers. Stuff that matters.
Re:CVE-2014-6271: Remote code execution through bash by matchu on Wednesday September 24, 2014 @12:06PM (#8362209)
So, as a amateur sysadmin of a decently popular side project, what should I do? I've read over the post on the mailing list, and I think I understand the basic attack, but I'm having trouble understanding exactly how an attacker could run bash on my server and what I therefore need to patch (though I suspect that's intentional). Is `sudo apt-get update && sudo apt-get upgrade` sufficient on an Ubuntu server?
Re:CVE-2014-6271: Remote code execution through bash by vhost- on Wednesday September 24, 2014 @03:51PM (#8363704)
If you just want to upgrade bash, and prevent services like nginx, fpm, and apache from being restarted in production, you can run `sudo apt-get update && sudo apt-get install --only-upgrade bash`

Related to that, does anyone else know if upgrading bash will require a restart of other services kind of like upgrading openssl requires restarting things?

Re:CVE-2014-6271: Remote code execution through bash by jMyles on Wednesday September 24, 2014 @08:56PM (#8364982)
It runs out that these suggestions were premature, the patch released earlier today DOES NOT fix the problem. https://bugzilla.redhat.com/show_bug.cgi?id=1141597#c24

I just tested this on Ubuntu 14.04 - it's vulnerable.

Re:CVE-2014-6271: Remote code execution through bash by euid on Wednesday September 24, 2014 @06:35PM (#8364550)
Upgrades should not require any restarts, and no restarts are required for you to stop being vulnerable - as this only affects newly created bash sessions, not already running ones.
Re:CVE-2014-6271: Remote code execution through bash by stefantalpalaru on Wednesday September 24, 2014 @08:36PM (#8364933)
Debian's package manager has the nasty habit of stopping affected daemons before all the upgrades and starting them afterwards, leaving you with serious downtime.
Re:CVE-2014-6271: Remote code execution through bash by auxiliation on Wednesday September 24, 2014 @04:25PM (#8363920)
> Related to that, does anyone else know if upgrading bash will require a restart of other services kind of like upgrading openssl requires restarting things?

I don't think it will, for a couple of reasons. OpenSSL is integrated into other services as a library, while bash would be called as an external application. I also noticed that once I upgraded bash, the proof of concept stopped working in a terminal I opened prior to the upgrade.

Re:CVE-2014-6271: Remote code execution through bash by fragmede on Wednesday September 24, 2014 @07:28PM (#8364727)
> I also noticed that once I upgraded bash, the proof of concept stopped working in a terminal I opened prior to the upgrade.

[citation needed] because that doesn't sound possible.

Re:CVE-2014-6271: Remote code execution through bash by lutusp on Wednesday September 24, 2014 @07:32PM (#8364736)
Not if the issued commands spawned a new copy of Bash.
Re:CVE-2014-6271: Remote code execution through bash by sauere on Wednesday September 24, 2014 @12:31PM (#8362392)
> Is `sudo apt-get update && sudo apt-get upgrade` sufficient on an Ubuntu server?

Yes. Patch is out.

Re:CVE-2014-6271: Remote code execution through bash by pjungwir on Wednesday September 24, 2014 @12:48PM (#8362509)
It appears that Linode changes /etc/apt/sources.list to point to their own mirror of Ubuntu repositories, and as far as I can tell those are not updated yet. So I guess the solution is to wait or edit sources.list. Just FYI if you're on their systems!
Re:CVE-2014-6271: Remote code execution through bash by teach on Wednesday September 24, 2014 @01:17PM (#8362706)
Just did an update on my Linode and one of the updates was

    replace bash 4.1-2ubuntu3
So seems like it's there now.
Re:CVE-2014-6271: Remote code execution through bash by steveklabnik on Wednesday September 24, 2014 @01:52PM (#8362946)
https://launchpad.net/ubuntu/+source/bash/4.3-7ubuntu1.1 seems to be at least one version of the fix, I'm unsure about LTS and other releases.
Re:CVE-2014-6271: Remote code execution through bash by sp332 on Wednesday September 24, 2014 @03:35PM (#8363622)
http://www.ubuntu.com/usn/usn-2362-1/

Ubuntu 14.04 LTS: bash 4.3-7ubuntu1.1

Ubuntu 12.04 LTS: bash 4.2-2ubuntu2.2

Ubuntu 10.04 LTS: bash 4.1-2ubuntu3.1

For releases in-between, you should be able to manually download one of those versions from http://archive.ubuntu.com/ubuntu/pool/main/b/bash/ and install it. I wonder how many vulnerable boxes there are that won't get these updates because Ubuntu stops support after 9 months. There must be tons of boxes running 13.10, it's not even a year old yet.

Re:CVE-2014-6271: Remote code execution through bash by merlinmike on Friday September 26, 2014 @12:32AM (#8371342)
For 13.10 do this, selecting correct architecture:

----------------------------------------------------------

amd64

wget archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.2-2ubuntu2.3_amd64.deb

sudo dpkg -i bash_4.2-2ubuntu2.3_amd64.deb

----------------------------------------------------------

i386

wget archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.2-2ubuntu2.3_i386.deb

sudo dpkg -i bash_4.2-2ubuntu2.3_i386.deb

Re:CVE-2014-6271: Remote code execution through bash by bphogan on Wednesday September 24, 2014 @06:33PM (#8364545)
It's for that reason that I just ignore anything that's not an LTS release. It's never worth the hassle for me.
Re:CVE-2014-6271: Remote code execution through bash by traviscj on Wednesday September 24, 2014 @01:45PM (#8362897)
Depends on whether you have mirrors.linode.com or the ubuntu servers set up in sources.list. I had to swap mine out.
Re:CVE-2014-6271: Remote code execution through bash by teach on Wednesday September 24, 2014 @02:09PM (#8363075)
Well, I didn't even know about mirrors.linode.com. Mine were still the ubuntu default servers.

I guess apt-get from one of Linode's mirrors saves bandwidth? Or is it just more polite?

Re:CVE-2014-6271: Remote code execution through bash by aaronem on Wednesday September 24, 2014 @03:14PM (#8363504)
It probably ensures that you get the Linode-customized flavors of packages where such exist, so that, for example, you don't inadvertently upgrade your kernel to a build without the ability to mount Linode disks.
Re:CVE-2014-6271: Remote code execution through bash by crylon on Wednesday September 24, 2014 @05:33PM (#8364270)
Linode can't modify packages; they're signed by the upstream distro. (Unless Linode added a key of their own to your apt keychain (apt-key list), but I've never seen that.)
Re:CVE-2014-6271: Remote code execution through bash by iancarroll on Wednesday September 24, 2014 @03:47PM (#8363684)
It's also meant to help you and Linlde save bandwidth!
Re:CVE-2014-6271: Remote code execution through bash by dbbolton on Wednesday September 24, 2014 @02:07PM (#8363062)
Or just manually install the new version with dpkg.
Re:CVE-2014-6271: Remote code execution through bash by drzaiusapelord on Wednesday September 24, 2014 @03:20PM (#8363540)
If you just want to update that package then:

apt-get update

apt-get install --only-upgrade bash

fwiw, Linode's mirrors are up with the latest version yet Digital Ocean's are not. I lose faith in DO everytime I remote into my VM. They just seen like an amateurish shop.

Re:CVE-2014-6271: Remote code execution through bash by lefthand on Wednesday September 24, 2014 @05:35PM (#8364277)
My droplets in SFO have been updated. My droplets in nyc1 and nyc2 haven't.
Re:CVE-2014-6271: Remote code execution through bash by lefthand on Wednesday September 24, 2014 @07:38PM (#8364755)
And NY is updated for me as well now. Wondering why it took so long after the other DCs were updated.
Re:CVE-2014-6271: Remote code execution through bash by icelancer on Thursday September 25, 2014 @01:41AM (#8365803)
Checking in 8 hours later - my droplet on nyc1 is still affected.
Re:CVE-2014-6271: Remote code execution through bash by svankmajer on Wednesday September 24, 2014 @03:33PM (#8363600)
I successfully upgraded bash on my droplets a couple minutes ago.
Re:CVE-2014-6271: Remote code execution through bash by sejje on Wednesday September 24, 2014 @05:00PM (#8364107)
Seconded. I've been patched for ~40 minutes on DO.
Re:CVE-2014-6271: Remote code execution through bash by maximumoverload on Wednesday September 24, 2014 @06:29PM (#8364537)
I am on linode and precise LTS. I did this, and I got no bash update. What am I doing wrong?

edit: and how do I know if I am still vulnerable?

edit2: ok, this is the test

  env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
and apparently I am already patched. So that's good.
Re:CVE-2014-6271: Remote code execution through bash by 15characterlimi on Wednesday September 24, 2014 @11:24PM (#8365417)
dpkg -l | grep bash

WIll tell you which version of bash is installed, for precise you should have bash 4.2-2ubuntu2.2

Re:CVE-2014-6271: Remote code execution through bash by bphogan on Wednesday September 24, 2014 @06:33PM (#8364546)
DigitalOcean uses mirrors too, so you have to change your /etc/apt/sources.list file or wait.
Re:CVE-2014-6271: Remote code execution through bash by atmosx on Wednesday September 24, 2014 @06:46PM (#8364597)
I updated debian on DO like 25 minutes ago and had a crystal-clear bash update there. So I guess they updated their mirrors.
Re:CVE-2014-6271: Remote code execution through bash by agwa on Wednesday September 24, 2014 @07:15PM (#8364689)
Debian security updates are distributed from security.debian.org, which is separate from the normal Debian mirror network, and Debian discourages the mirroring of security.debian.org because security updates are time sensitive. Hopefully Digital Ocean is not mirroring security.debian.org.
Re:CVE-2014-6271: Remote code execution through bash by Danieru on Wednesday September 24, 2014 @12:54PM (#8362549)
You should also reboot to ensure no running instances of bash are vulnerable.
Re:CVE-2014-6271: Remote code execution through bash by cesarb on Wednesday September 24, 2014 @01:07PM (#8362647)
If I understood this bug correctly, it happens during bash's initialization. If I'm right, already running instances of bash are not vulnerable, and new instances will use the fixed executable, so no reboot would be necessary for this bug.
Re:CVE-2014-6271: Remote code execution through bash by dfc on Wednesday September 24, 2014 @03:34PM (#8363610)

  $ apt-cache show debian-goodies 
    <SNIP>
    checkrestart    - Help to find and restart processes which are using old
                      versions of upgraded files (such as libraries)
Re:CVE-2014-6271: Remote code execution through bash by bdarnell on Wednesday September 24, 2014 @01:10PM (#8362670)
The vulnerability is in bash startup; any already-running shells should be safe.
Re:CVE-2014-6271: Remote code execution through bash by sauere on Wednesday September 24, 2014 @01:06PM (#8362638)
Good point.
Re:CVE-2014-6271: Remote code execution through bash by clarry on Wednesday September 24, 2014 @12:08PM (#8362224)
I don't know if Ubuntu has pushed a patched version of bash, but bash is what you should update. Someone already posted a way to test whether your version is vulnerable.

You might also look into changing the default shell (but beware, scripts with bashisms in them...).

Re:CVE-2014-6271: Remote code execution through bash by hamiltonkibbe on Wednesday September 24, 2014 @12:13PM (#8362261)
Ubuntu pushed the update around noon

4.3-7ubuntu1.1

Re:CVE-2014-6271: Remote code execution through bash by pjungwir on Wednesday September 24, 2014 @12:21PM (#8362318)
Really? I haven't been able to find any notice of that, and on 14.04 LTS if I run `sudo apt-get install --only-upgrade bash` I'm still vulnerable.
Re:CVE-2014-6271: Remote code execution through bash by pjungwir on Wednesday September 24, 2014 @12:26PM (#8362353)
Ah, looks like I needed to run `sudo apt-get update` first.
Re:CVE-2014-6271: Remote code execution through bash by ForHackernews on Wednesday September 24, 2014 @12:25PM (#8362351)
Re:CVE-2014-6271: Remote code execution through bash by hamiltonkibbe on Wednesday September 24, 2014 @12:24PM (#8362341)
sudo apt-get update && sudo apt-get upgrade
Re:CVE-2014-6271: Remote code execution through bash by gcb0 on Wednesday September 24, 2014 @07:13PM (#8364684)
yeah, it was updated in debian in the morning...
Re:CVE-2014-6271: Remote code execution through bash by zobzu on Wednesday September 24, 2014 @12:43PM (#8362461)
you should update all security updates, reliably, periodically, regardless of HN posts.

you're probably not directly vulnerable for this very vuln, but then again, maybe you are. with enough vulns it gets complex enough to check that its easier to just update with all the security updates..

Re:CVE-2014-6271: Remote code execution through bash by detectify on Wednesday September 24, 2014 @05:38PM (#8364291)
We just updated our scanner and included this CVE. You can run Detectify to see if your setup is vulnerable. We offer a recurring service that runs continuously and alerts you if you are exposed to new emerging vulnerabilities. This removes some of the complexity of always being on top of security alerts.
Re:CVE-2014-6271: Remote code execution through bash by zobzu on Saturday September 27, 2014 @02:46PM (#8377819)
sup advertiser
Re:CVE-2014-6271: Remote code execution through bash by cookiecaper on Wednesday September 24, 2014 @12:33PM (#8362411)
If you're still waiting for mirrors and such to sync, you can install these packages manually on the LTS releases with the snippet here:

http://hastebin.com/oraheyipug.hs

Re:CVE-2014-6271: Remote code execution through bash by ay on Wednesday September 24, 2014 @03:15PM (#8363516)
Looks like the patched version and the pre-patched version show the same version, or am I being stupid and missing something ?

  ayourtch@mcmini:~/bash-patch$ ls
  bash_4.2-2ubuntu2.2_amd64.deb bash-builtins_4.2-2ubuntu2.2_amd64.deb  t
  ayourtch@mcmini:~/bash-patch$ dpkg -x bash_4.2-2ubuntu2.2_amd64.deb t
  ayourtch@mcmini:~/bash-patch$ diff -c t/bin/bash /bin/bash
  Binary files t/bin/bash and /bin/bash differ
  ayourtch@mcmini:~/bash-patch$ t/bin/bash --version
  GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  ayourtch@mcmini:~/bash-patch$ /bin/bash --version
  GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  
  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  ayourtch@mcmini:~/bash-patch$ sha1sum t/bin/bash
  9eeed02173db163b013933eff3b8c6aa3697f67f  t/bin/bash
  ayourtch@mcmini:~/bash-patch$ sha1sum /bin/bash
  3384fadf84146a4d4b6b7f529f615e9947b4ac99  /bin/bash
  ayourtch@mcmini:~/bash-patch$
Re:CVE-2014-6271: Remote code execution through bash by cookiecaper on Wednesday September 24, 2014 @03:34PM (#8363612)
Only the build/patchset version is incremented in these packages (the -2ubuntu2.2). You can see the package version with dpkg -s bash | grep Version.
Re:CVE-2014-6271: Remote code execution through bash by keithhyfn on Thursday September 25, 2014 @01:11PM (#8368250)
Anyone have code that might work on 13.04 please?
Re:CVE-2014-6271: Remote code execution through bash by ilconsigliere on Wednesday September 24, 2014 @12:07PM (#8362220)
It will be once they release a patch, yes

https://security-tracker.debian.org/tracker/CVE-2014-6271

Re:CVE-2014-6271: Remote code execution through bash by karlkatzke on Wednesday September 24, 2014 @12:40PM (#8362444)
Already out on Ubuntu, I believe?
Re:CVE-2014-6271: Remote code execution through bash by larrys on Wednesday September 24, 2014 @12:24PM (#8362339)
A good question that so far nobody has answered (as of right now).