
发布日期: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/
|