Ubuntu 12.04 “Precise” e 14.04 “Trusty”, Debian 7 “Wheezy”
apt-get update; apt-get install bash
Debian 6 "Squeeze"
/etc/apt/sources.list.d/squeezelts.list
deb http://http.debian.net/debian/ squeeze-lts main contrib non-free
deb-src http://http.debian.net/debian/ squeeze-lts main contrib non-free
/etc/apt/apt.conf.d/50squeezelts
APT::Default-Release "squeeze-lts";
Em seguida, execute a atualização:
apt-get update; apt-get install bash
Corrigindo sistemas mais antigos e sem suporte como Lenny
# Retrieve and install dependencies first
apt-get update && apt-get install build-essential gettext bison
# Get bash 3.2 source
wget http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz
tar zxvf bash-3.2.tar.gz
cd bash-3.2
# Download and apply all patches
# Includes patches for CVE-2014-6271 (52) *AND* CVE-2014-7169 (53) *AND* Florian Weimer patch (54)
for i in $(seq -f "%03g" 1 54); do
wget -nv http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-$i
patch -p0 < bash32-$i
done
# Compile and install to /usr/local/bin/bash
./configure && make
make install
# Point /bin/bash to the new binary
mv /bin/bash /bin/bash.old
ln -s /usr/local/bin/bash /bin/bash