公司介绍
企业文化
员工心声
加盟安络
与我们联系
产品简介
安全专家
评估产品
服务体系
专家检测
检测服务
案例分析
咨询建议
系统漏洞
安全工具
参考资料
安全论坛
安全文摘
 

Perl rmtree()函数本地不安全权限漏洞 (Other,补丁)
 
涉及程序:
Perl
 
描述:
Perl rmtree()函数本地不安全权限漏洞
 
详细:
Perl是一种免费且功能强大的编程语言。

Perl的lib/File/Path.pm文件中的rmtree函数在执行chmod时没有正确地检查权限:

        my $nperm = $perm & 07777 | 0600;
        if ($nperm != $perm and not chmod $nperm, $root) {
           if ($Force_Writeable) {
             _error($arg, "cannot make file writeable", $canon);
           }
        }

上述代码仅在尝试chmod后才测试$Force_Writeable变量,该变量用于定义在删除文件时操作系统是否需要写权限。当rmtree()遇到符号链接时,就会将链接目标的权限更改为链接的权限,通常为0777。

% touch foo
% ln -s foo bar
% ls -l foo bar
lrwxrwxrwx 1 niko niko 3 2008-06-21 09:06 bar -> foo
-rw-r--r-- 1 niko niko 0 2008-06-21 09:06 foo
% perl -e 'use File::Path rmtree; rmtree bar'
% ls -l foo bar
ls: cannot access bar: No such file or directory
-rwxrwxrwx 1 niko niko 0 2008-06-21 09:06 foo

<*来源:Ben Hutchings (ben@decadent.org.uk

链接:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487319
     http://rt.cpan.org/Public/Bug/Display.html?id=36982
*>

受影响系统:
Larry Wall Perl 5.10
 
攻击方法:
暂无有效攻击代码
 
解决方案:
厂商补丁:

Larry Wall
----------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.perl.org/
 
附加信息:
 
发布时间:2008年6月25日

返回

版权所有,如需转载,请与安络联系