Lucene search

K
seebugRootSSV:3104
HistoryMar 29, 2008 - 12:00 a.m.

Firebird关系数据库'protocol.cpp' XDR协议远程内存破坏漏洞

2008-03-2900:00:00
Root
www.seebug.org
15

EPSS

0.928

Percentile

99.0%

BUGTRAQ ID: 28403
CVE ID:CVE-2008-0387
CNCVE ID:CNCVE-20080387

Firebird Relational Database是一款关系型数据库。
Firebird Relational Database管理器处理XDR协议上部分标签时存在整数溢出,远程攻击者可以利用漏洞以应用程序进程权限执行任意指令。
当(src/remote/protocol.cpp)解析器接收到如下非法数据的操作时:
op_receive
op_start
op_start_and_receive
op_send
op_start_and_send
op_start_send_and_receive
解析器在变量使用前不正确过滤,可以看到src/remote/protocol.cpp中,如下的指派直接来自报文缓冲区,并在没有任何验证情况下直接到数据接口中(MAP宏没有任何范围检查):
src/remote/protocol.cpp:417
MAP(xdr_short, reinterpret_cast<SSHORT&>(data->p_data_request));
MAP(xdr_short, reinterpret_cast<SSHORT&>(data->p_data_incarnation));
MAP(xdr_short, reinterpret_cast<SSHORT&>(data->p_data_transaction));
MAP(xdr_short, reinterpret_cast<SSHORT&>(data->p_data_message_number));
/* Changes to this op’s protocol must mirror in xdr_protocol_overhead /
return xdr_request(xdrs, data->p_data_request,
data->p_data_message_number,
data->p_data_incarnation) ? P_TRUE(xdrs, p) : P_FALSE(xdrs, p);
在函数xdr_request()中,变量data->p_data_request (as request_id)用于索引数组:

rrq
request = (rrq*) port->port_objects[request_id];

破坏内存结构,可引起服务程序拒绝服务。在变量data->p_data_message_number中存在同样状况。

Gentoo Linux
Firebird Firebird 2.0.3
Firebird Firebird 2.0.2
Firebird Firebird 2.0.1
Firebird Firebird 1.5.5
Firebird Firebird 1.5.4
Firebird Firebird 1.0.3

  • FreeBSD FreeBSD 4.8
  • FreeBSD FreeBSD 4.7
  • FreeBSD FreeBSD 4.6
    Firebird Firebird 2.1 Beta 2
    Firebird Firebird 2.0
    Debian Linux 4.0 sparc
    Debian Linux 4.0 s/390
    Debian Linux 4.0 powerpc
    Debian Linux 4.0 mipsel
    Debian Linux 4.0 mips
    Debian Linux 4.0 m68k
    Debian Linux 4.0 ia-64
    Debian Linux 4.0 ia-32
    Debian Linux 4.0 hppa
    Debian Linux 4.0 arm
    Debian Linux 4.0 amd64
    Debian Linux 4.0 alpha
    Debian Linux 4.0

Firebird 1.56, 2.0.4, 和2.1.0 RC1已经修正此漏洞:
<a href=“http://www.firebirdsql.org/” target=“_blank”>http://www.firebirdsql.org/</a>


                                                &lt;?php&nbsp;
/**&nbsp;*&nbsp;&nbsp;FIREBIRD&nbsp;REMOTE&nbsp;BUFFER&nbsp;OVERFLOW.
*&nbsp;&nbsp;ITDEFENCE.ru&nbsp;Proof-of-Concept&nbsp;(POC)
*&nbsp;&nbsp;Eugene&nbsp;Minaev&nbsp;([email protected])
*
*&nbsp