Username: Password:

Interbase ISC_LOCK_ENV环境变量本地缓冲区溢出漏洞
来源:作者: 发布时间:2008-01-15 14:07:17

发布日期:2003-04-03

更新日期:2003-04-07

受影响系统

Borland/Inprise Interbase 6.x

周详描述:

Interbase是一款由Borland公司研发和维护的数据库软件,可使用在多种Unix和Linux操作系统

Interbase对ISC_LOCK_ENV环境变量缺少正确边界缓冲区检查,本地攻击者能够利用这个漏洞进行缓冲区溢出攻击,可能以root用户权限在系统上执行任意指令。

Interbase gds_lock_mgr用于检查ISC_LOCK_ENV变量,假如ISC_LOCK_ENV变量超过1024字符,就会发生段错误,问题存在于gds.c的strcat()函数调用中:

./common.h:#define MAXPATHLEN 1024
./gds.c:714:#define ISC_LOCK_ENV "INTERBASE_LOCK"
./gds.c:425:static char ib_prefix_lock_val[MAXPATHLEN];


void API_ROUTINE gds__prefix_lock (
    TEXT *string,
    TEXT *root)
/********************************************************
*
* g d s _ $ p r e f i x _ l o c k ( n o n - V M S )
*
********************************************************
*
* Functional description
* Find appropriate InterBase lock file prefix.
* Override conditional defines with the enviroment
* variable INTERBASE_LOCK if it is set.
*
**************************************/
string [0] = 0;


if (ib_prefix_lock == NULL)
    {
    if (!(ib_prefix_lock = getenv (ISC_LOCK_ENV)))
        {
        ib_prefix_lock = ib_prefix_lock_val;
        gds__prefix(ib_prefix_lock, "");
        }
    else
        {
        strcat (ib_prefix_lock_val, ib_prefix_lock); // 问题所在处
        ib_prefix_lock = ib_prefix_lock_val;
        }
    }

精心构建超长的环境变量数据,可能以root用户权限在系统上执行任意指令。

解决方法:

现在Borland厂商已发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://www.borland.com/interbase/


喜欢本文,那就收藏到:

    Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网
相关评论  我也要评论
还没有关于此文章的相关评论!
  • 昵称: (为空则显示guest)
  • 评论分数: ★ ★ ★★★ ★★★★ ★★★★★
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  • 导航
    赞助商
    文章类别
    订阅