Skip to content

Instantly share code, notes, and snippets.

@cwgem
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save cwgem/abc8de5679cfd0d3526d to your computer and use it in GitHub Desktop.

Select an option

Save cwgem/abc8de5679cfd0d3526d to your computer and use it in GitHub Desktop.
Bash Shellshock Fixes

Introduction

This is meant to provide a summary of CVEs and fixes for them revolving around the shellshock collection of bugs. These bugs were primarily related to how bash does parsing of environment variables. Correlation between CVEs and upstream patches/releases has been fairly messy so I'm going to just summarize everything here. This pretty much comes from this oss-sec thread.

Checking for vulns

Currently I use hannob's bashceck script to do testing for shellshock related vulns.

Fix through latest versions

Bash's versioning is somewhat weird, and you'd best be checking your distro for more information. The distro releases should be patched in some form, or have the latest bash patchsets as follows:

  • bash-3.2: Patch 57
  • bash-4.0: Patch 44
  • bash-4.1: Patch 17
  • bash-4.2: Patch 53
  • bash-4.3: Patch 30

Fix through specific patches

These are the specific patches for specific CVEs from bash-3.2 to bash-4.3:

Patching Notes

  • If patches don't work for you try removing the patchset chunk and seeing if that works
  • If having trouble reading the context diffs, try patchutils' filterdiff command. An example run:
filterdiff -v --format=unified bash43-030 > bash43-030-unified.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment