Frequently Asked Questions

How to patch bash for shell shock in CentOS, Ubuntu

What is Bash?
Bash is the default interactive shell in Ubuntu. When you are interfacing with the terminal (either through the terminal emulator, over a tty, or ssh), you are generally typing commands that bash will read, and execute. Even if you do not use the terminal at all, you still have Bash.

Am I vulnerable?
Use dpkg to check your installed package version:
dpkg -s bash | grep Version

Sample output:
[root@jham ~] dpkg -s bash | grep Version
Version: 4.3-7ubuntu1.4

Patch your system
1. For CentOS, Fedora, Red Hat (and the like) users, just type this to update it (yes, there’s already a patch, and you’ll be patched up in about 10 seconds)

yum -y update bash

2. For Debian, Ubuntu (and the like) users, type this to update bash:

sudo apt-get update && sudo apt-get install --only-upgrade bash

(This will update the list of packages, then install the latest bash)

3. Test your system

To test your system, log into your bash shell and type:
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

 Last updated Tue, Feb 4 2014 3:00pm

Please Wait!

Please wait... it will take a second!