免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1187 | 回复: 2
打印 上一主题 下一主题

[系统管理] 关于bash 2.05b升级 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-10-11 11:21 |只看该作者 |倒序浏览
因为bash漏洞升级bash 2.05b

http://ftp.gnu.org/gnu/bash/上已有bash 205b-13的patch

尝试修改builtins/evalstring.c,在struct fd_bitmap *bitmap后面加入
  1.               if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
  2.                   {
  3.                   internal_warning ("%s: ignoring function definition attempt", from_file);
  4.                   should_jump_to_top_level = 0;
  5.                   last_result = last_command_exit_value = EX_BADUSAGE;
  6.                   break;
  7.                   }
复制代码
编译后提示evalstring.c:207: `SEVAL_FUNCDEF' undeclared (first use in this function)

有高手能否提点一二,操作系统是Linux 7.3 ,目前状况暂时无法升级操作系统,

7.3的yum也安装,yum update bash 提示没有更新。

论坛徽章:
0
2 [报告]
发表于 2014-10-11 11:37 |只看该作者
下载bash源代码及补丁,patch 补丁后,./configure; make ;make install

论坛徽章:
0
3 [报告]
发表于 2014-10-11 15:56 |只看该作者
本帖最后由 cate1019 于 2014-10-11 15:58 编辑

回复 2# cattiger

非常感谢,已经完成补丁,完成方法如下

1.下载源代码包和补丁包

源代码包
  1. http://ftp.gnu.org/gnu/bash/bash-2.05b.tar.gz
复制代码
补丁包,按照日期排序应该 008-013是解决此次破壳漏洞的补丁

  1. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-001
  2. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-002
  3. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-003
  4. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-004
  5. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-005
  6. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-006
  7. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-007
  8. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-008
  9. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-009
  10. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-010
  11. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-011
  12. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-012
  13. http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-013
复制代码
下载完成后,
  1. tar zxvf bash-2.05b.tar.gz
  2. cd bash-2.05b
  3. patch -p0 < ../bash205b-008
复制代码
会出现如下提示
  1. patching file builtins/common.h
  2. patching file builtins/evalstring.c
  3. patching file variables.c
复制代码
依次执行
  1. patch -p0 < ../bash205b-009
  2. patch -p0 < ../bash205b-008
  3. patch -p0 < ../bash205b-010
  4. patch -p0 < ../bash205b-011
  5. patch -p0 < ../bash205b-012
  6. patch -p0 < ../bash205b-013
复制代码
最后再
  1. ./configure
  2. make install
复制代码
测试
  1. env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
复制代码
显示
  1. this is a test
复制代码
感谢任何给我帮助的人,希望我也可以帮到其他人
   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP