Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / GitLab本地文件包含漏洞(CVE-2013-4582)

发布日期:2014-05-12
更新日期:2014-05-14受影响系统:
GitLab GitLab 6.x
描述:
--------------------------------------------------------------------------------
CVE(CAN) ID: CVE-2013-4582
 
GitLab,是一个利用Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目。
 
GitLab 5.4.2, Community Edition 6.2.4, Enterprise Edition 6.2.1, gitlab-shell 1.7.8之前版本存在安全漏洞,远程攻击者可通过GitLab Web接口,利用此漏洞包含服务器上Git库元数据内的本地文件。在 Ubuntu 12.04 上安装 GitLab http://www.linuxidc.com/Linux/2012-12/75249.htmGitLab 5.3 升级注意事项 http://www.linuxidc.com/Linux/2013-06/86473.htm在 CentOS 上部署 GitLab (自托管的Git项目仓库) http://www.linuxidc.com/Linux/2013-06/85754.htm在RHEL6/CentOS6/ScientificLinux6上安装GitLab 6.0.2 http://www.linuxidc.com/Linux/2014-03/97831.htmCentOS 6.5安装GitLab教程及相关问题解决 http://www.linuxidc.com/Linux/2014-05/101526.htm
 
<*来源:joernchen
  *>建议:
--------------------------------------------------------------------------------
临时解决方法:
 
如果您不能立刻安装补丁或者升级,NSFOCUS建议您在/home/git/gitlab-shell内运用下面补丁以降低威胁:
 --- a/lib/gitlab_projects.rb
 +++ b/lib/gitlab_projects.rb
 @@ -48,7 +48,7 @@ class GitlabProjects
    def create_branch
      branch_name = ARGV.shift
      ref = ARGV.shift || "HEAD"
 -    cmd = %W(git --git-dir=#{full_path} branch #{branch_name} #{ref})
 +    cmd = %W(git --git-dir=#{full_path} branch -- #{branch_name} #{ref})
      system(*cmd)
    end @@ -61,7 +61,7 @@ class GitlabProjects
    def create_tag
      tag_name = ARGV.shift
      ref = ARGV.shift || "HEAD"
 -    cmd = %W(git --git-dir=#{full_path} tag #{tag_name} #{ref})
 +    cmd = %W(git --git-dir=#{full_path} tag -- #{tag_name} #{ref})
      system(*cmd)
    end @@ -94,7 +94,7 @@ class GitlabProjects
    def import_project
      @source = ARGV.shift
      $logger.info "Importing project #{@project_name} from <#{@source}> to <#{full_path}>."
 -    cmd = %W(git clone --bare #{@source} #{full_path})
 +    cmd = %W(git clone --bare -- #{@source} #{full_path})
      system(*cmd) && create_hooks(full_path)
    end @@ -156,7 +156,7 @@ class GitlabProjects
      end      $logger.info "Forking project from <#{full_path}> to <#{full_destination_path}>."
 -    cmd = %W(git clone --bare #{full_path} #{full_destination_path})
 +    cmd = %W(git clone --bare -- #{full_path} #{full_destination_path})
      system(*cmd) && create_hooks(full_destination_path)
    end
 
厂商补丁:
 
GitLab
 ------
 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
 
https://www.gitlab.com/
https://gitlab.com/gitlab-org/gitlab-ce
https://github.com/gitlabhq/gitlabhqGitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里