首页 -> 安全研究

安全研究

安全漏洞
BRU XBRU以不安全方式建立临时文件漏洞

发布日期:2002-09-13
更新日期:2002-09-17

受影响系统:
Tolis Group BRU 17.0 Linux
    - Caldera Open Linux Workstation 3.1
    - Caldera Open Linux Server 3.1
    - Debian Linux 2.2 IA-32
    - Mandrake Linux 8.1
    - Mandrake Linux 8.0
    - RedHat Linux 7.2 x86
    - RedHat Linux 7.2 ia64
    - RedHat Linux 7.1 x86
    - RedHat Linux 7.1 ia64
    - RedHat Linux 7.1
    - RedHat Linux 7.0
    - RedHat Linux 7.0 x86
    - SuSE Linux 7.3
    - SuSE Linux 7.2
    - SuSE Linux 7.1
描述:
BUGTRAQ  ID: 5708
CVE(CAN) ID: CVE-2002-1512

BRU是一款Tolis Group公司开发和维护的备份和恢复工具,可使用在Linux系操作系统下。

BRU在建立临时文件时不安全,本地攻击者可以利用这个漏洞进行符号链接攻击。

BRU以suid root属性安装,当执行时会以root用户权限建立临时文件/tmp/xbru_dscheck.dd,BRU建立这个临时文件时没有检查文件是否存在,可导致本地攻击者通过符号链接攻击方式破坏系统任意文件,包括属主为root用户的文件。

<*来源:prophecy (prophecy@prophecy.net.nz
        Peter Watkins (peterw@usa.net
  
  链接:http://marc.theaimsgroup.com/?l=bugtraq&m=103196055321678&w=2
        http://marc.theaimsgroup.com/?l=bugtraq&m=103196055321678&w=2
*>

建议:
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 把如下代码放到xbru使用的Tcl脚本中:

# brufix-tmpdir.tcl
# Tcl code to make a safe temporary directory for BRU Tcl/Tk scripts
# Peter Watkins, 2002 - sample code, no guarantees
#
proc brufixSetTmpdir {} {
  # make the safe temp dir & store its name in a global var
  # or exit if errors; respect $TMPDIR if set
  global env
  global brufixTmpdir
  set brufixBaseTmpdir {/tmp}
  catch {set brufixBaseTmpdir $env(TMPDIR)}
  if {([file isdirectory $brufixBaseTmpdir] == 0) || ([file exists $brufixBaseTmpdir] == 0)} {
    puts stderr "temporary directory $brufixBaseTmpdir does not exist!"
    exit 1
  }
  set brufixTmpdir "$brufixBaseTmpdir/bru-[clock clicks]"
  if {[catch {file mkdir $brufixTmpdir}] != 0} {
    puts stderr "error creating temporary directory $brufixTmpdir !"
    exit 1
  }
  if {[catch {exec /bin/chmod 0700 $brufixTmpdir}] != 0} {
    puts stderr "error setting perms on temporary directory $brufixTmpdir !"
    exit 1
  }
}
proc brufixGetTmpdir {} {
  # return the safe temp directory name
  global brufixTmpdir
  if {([info exists brufixTmpdir] == 0) || ([string length $brufixTmpdir] == 0)} {
    puts stderr "need to call brufixSetTmpdir before brufixGetTmpdir!"
    exit 2
  }
  if {([file isdirectory $brufixTmpdir] == 0) || ([file exists $brufixTmpdir] == 0)} {
    puts stderr "BRU temporary directory $brufixTmpdir does not exist!"
    exit 3
  }
  return $brufixTmpdir
}
# early in the execution: make sure we have a good directory
# this should only be called once!
brufixSetTmpdir


* 使用"[brufixGetTmpdir]"(没有引号)代替"/tmp"字符串。

厂商补丁:

Tolis Group
-----------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.tolisgroup.com/main.html

浏览次数:2805
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障