漏洞信息详情
Firebird SQL fbserver connect请求远程缓冲区溢出漏洞
- CNNVD编号:CNNVD-200706-202
- 危害等级: 超危
- CVE编号: CVE-2007-3181
- 漏洞类型: 缓冲区溢出
- 发布时间: 2007-06-12
- 威胁类型: 远程
- 更新时间: 2007-06-18
- 厂 商: firebirdsql
- 漏洞来源: Cody Pierce
漏洞简介
Firebird SQL是Firebird基金会的一套开源跨平台的提供多个ANSI SQL-92功能的SQL数据库管理系统。
Firebird SQL数据库默认监听于TCP 3050端口的数据库服务fbserver.exe中存在缓冲区溢出漏洞,远程攻击者可能利用此漏洞控制服务器。
该服务在处理connect请求(0x1)时以如下方式拆分:
typedef struct p_cnct
{
P_OP p_cnct_operation; /* OP_CREATE or OP_OPEN */
USHORT p_cnct_cversion; /* Version of connect protocol */
P_ARCH p_cnct_client; /* Architecture of client */
CSTRING p_cnct_file; /* File name */
USHORT p_cnct_count; /* Protocol versions understood */
CSTRING p_cnct_user_id; /* User identification stuff */
struct p_cnct_repeat
{
USHORT p_cnct_version; /* Protocol version number */
P_ARCH p_cnct_architecture; /* Architecture of client */
USHORT p_cnct_min_type; /* Minimum type */
USHORT p_cnct_max_type; /* Maximum type */
USHORT p_cnct_weight; /* Preference weight */
}
p_cnct_versions[10];
} P_CNCT;
如果为p_cnct_count指定了超大值的话,就会在报文的XDR处理中出现未经检查的循环,导致覆盖本地rem_port结构及其vtable。具体来说,在XDR处理的下一次迭代中会调用rem_port->receive函数指针。有漏洞的代码如下:
protocol.cpp:318
for (i = 0, tail = connect->p_cnct_versions; i < connect->p_cnct_count; i++, tail++)
{
MAP(xdr_short, reinterpret_cast(tail->p_cnct_version));
MAP(xdr_enum, reinterpret_cast(tail->p_cnct_architecture));
MAP(xdr_u_short, tail->p_cnct_min_type);
MAP(xdr_u_short, tail->p_cnct_max_type);
MAP(xdr_short, reinterpret_cast(tail->p_cnct_weight));
}
在循环操作中应检查tail的大小。
漏洞公告
目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
Gentoo
------
Gentoo已经为此发布了一个安全公告(GLSA-200707-01)以及相应补丁:
GLSA-200707-01:Firebird: Buffer overflow
链接:
http://security.gentoo.org/glsa/glsa-200707-01.xml
所有Firebird用户都应升级到最新版本:
# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-db/firebird-2.0.1"
Firebird
--------
http://www.firebirdsql.org/rlsnotes/Firebird-2.0.1-ReleaseNotes.pdf
参考网址
来源: BID
名称: 24436
链接:http://www.securityfocus.com/bid/24436
来源: VUPEN
名称: ADV-2007-2149
链接:http://www.frsirt.com/english/advisories/2007/2149
来源: SECUNIA
名称: 25601
链接:http://secunia.com/advisories/25601
来源: www.firebirdsql.org
链接:http://www.firebirdsql.org/rlsnotes/Firebird-2.0.1-ReleaseNotes.pdf
来源: MISC
链接:http://dvlabs.tippingpoint.com/advisory/TPTI-07-11
来源: XF
名称: firebird-fbserver-bo(34833)
链接:http://xforce.iss.net/xforce/xfdb/34833
来源: DEBIAN
名称: DSA-1529
链接:http://www.debian.org/security/2008/dsa-1529
来源: GENTOO
名称: GLSA-200707-01
链接:http://security.gentoo.org/glsa/glsa-200707-01.xml
来源: SECUNIA
名称: 29501
链接:http://secunia.com/advisories/29501
来源: SECUNIA
名称: 25872
链接:http://secunia.com/advisories/25872
受影响实体
- Firebirdsql Firebird:2.0.0
补丁
暂无
评论