CVE:CVE-2008-5302
CNNVD:CNNVD-200812-019
Perl是一种免费且功能强大的编程语言。
Perl的lib/File/Path.pm模块中的rmtree函数存在竞争条件错误：
   170          (undef, undef, my $rp) = lstat $root or next;
   171          $rp &= 07777;   # don't forget setuid, setgid, sticky bits
   172          if ( -d _ ) {
   ...
   209              if (rmdir $root) {
   210                  ++$count;
   211              }
   212              else {
   213                  carp "Can't remove directory $root: $!";
   214                  chmod($rp, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
   215                      or carp("and can't restore permissions to "
   216                              . sprintf("0%o",$rp) . "\n");
   217              }
   218          }
   ...
本地攻击者可以通过符号链接攻击创建任意setuid二进制程序。
solution:Upgrade perl file to a higher version than :path,and avoid the version :path