---
title: "centos bash漏洞查看与修复"
author: "yangchunhe"
date: "2014-09-25T20:44:44Z"
tags: ["Bash", "CentOS", "Linux"]
categories: ["操作系统"]
slug: "centos-bash"
draft: false
lastmod: "2014-09-25T20:48:43Z"
id: 2121808
url: "https://yangchunhe.iteye.com/blog/2121808"
---

linux bash报重大漏洞,存在漏洞的版本包括如下。


```java
bash-4.2.45-5.el7_0.2
bash-4.1.2-15.el6_5.1
bash-4.1.2-15.el6_5.1.sjis.1
bash-4.1.2-9.el6_2.1
bash-4.1.2-15.el6_4.1
bash-3.2-33.el5.1Linux
bash-3.2-33.el5_11.1.sjis.1 
bash-3.2-24.el5_6.1
bash-3.2-32.el5_9.2
bash-3.0-27.el4.2 
```


查看命令如下：

```java
env x='() { :;}; echo vulnerable'  bash -c "echo this is a test"
```




如果输出：


```java
vulnerable
this is a test
```


则系统存在风险


修复方式：

```java
yum -y update bash
```



修复后输出如下：


```java
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
```