Sep 272014
 

Notes due to CVE-2014-6271

What version of bash does my system use?

[root@Webbie ~]# bash --version


GNU bash, version 4.2.37(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Go to your favourite mirror and grab the appropriate source code
http://mirror.aarnet.edu.au/pub/gnu/bash/

For my system, bash 4.2

mkdir bash
cd bash

Download the source code

wget http://mirror.aarnet.edu.au/pub/gnu/bash/bash-4.2.tar.gz

Get the patches. Make sure you go into the appropriate bash version patch directory and check to see how many there are.
Note that for bash-4.2 (as of today’s date), the patches are from bash42-001 to bash42-049. You need to change the values in the for loops below as appropriate.

mkdir patches
cd patches
for i in $(seq -f "%03g" 1 49); do wget http://mirror.aarnet.edu.au/pub/gnu/bash/bash-4.2-patches/bash42-$i; done

Go back down one directory and unpack the tarball

cd ..
tar -xzf bash-4.2.tar.gz
cd bash-4.2

Apply the patches

for i in $(seq -f "%03g" 1 49);do patch -p0 < ../patches/bash42-$i; done

Now, the usual configure, make and install. Note that if you don’t use the –prefix, it will install under /usr/local which makes this whole process useless. To compile bash, you will need gcc and yacc install (via your package manager).

./configure --prefix=/
make
make install
[root@Webbie bash-4.2]# bash --version


GNU bash, version 4.2.49(1)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

Human Conf Test * Time limit is exhausted. Please reload CAPTCHA.