Last active
August 29, 2015 14:06
-
-
Save jasoncodes/288167aec74a17384173 to your computer and use it in GitHub Desktop.
Shellshock (CVE-2014-6271 and CVE-2014-7169) patch for OS X 10.9 Mavericks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Shellshock (CVE-2014-6271 and CVE-2014-7169) patch for OS X 10.9 Mavericks | |
# Based on http://apple.stackexchange.com/a/146851 | |
cd /tmp | |
mkdir bash-fix | |
cd bash-fix | |
curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf - | |
cd bash-92/bash-3.2 | |
curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-052 | patch -p0 | |
curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-053 | patch -p0 | |
curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-054 | patch -p0 | |
cd .. | |
xcodebuild | |
build/Release/bash --version | |
build/Release/sh --version | |
sudo cp -ai /bin/bash /bin/bash.old | |
sudo cp -ai /bin/sh /bin/sh.old | |
sudo install -o root -g wheel build/Release/bash /bin/ | |
sudo install -o root -g wheel build/Release/sh /bin/ | |
ls -l /bin/{sh,bash}{,.old} |
Author
jasoncodes
commented
Sep 28, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment