Last active
June 16, 2020 20:22
-
-
Save kacy/2b9408af04c71fab686e to your computer and use it in GitHub Desktop.
CVE-2014-6271 fix for ubuntu bash
This file contains 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
--- | |
- hosts: all | |
user: root | |
sudo: true | |
tasks: | |
- name: update apt | |
command: apt-get update | |
- name: update bash | |
command: apt-get --only-upgrade install bash | |
- name: check bash fix | |
command: env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | |
register: command_result | |
failed_when: "'error' not in command_result.stderr" |
As for the last task, you could use the shellshocker site script to easily check if all vulnerabilities were resolved by doing:
- name: check vulnerability status fix
shell: curl https://shellshocker.net/shellshock_test.sh | bash
register: command_result
- debug: var=command_result.stdout_lines
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's nothing in this playbook that first ensures the security sources are installed in ubuntu 12. Perhaps the lack of those sources is the issue for @aarongolub.
On Debian Squeeze (approximate to Ubuntu 12), I had to do this first. I don't know what the equivalent ubuntu security sources would be, but that would be the first place I would check @aarongolub.