检查Linux Bash安全漏洞以及各环境修复解决方法

第一、检测是否存在Bash漏洞
$env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
如果返回以下内容:则请尽快升级。

[juniper@networking ~]$ env x='() { :;}; echo vulnerable'  bash -c "echo this is a test"
vulnerable

this is a test 
第二、各种系统升级方法
1、CentOS 升级
 #yum clean all

#yum makecache
#yum -y update bash
2、ubuntu 系统升级
 #apt-get update
#apt-get -y install --only-upgrade bash