Vulnerabilities > CVE-2008-0387 - Numeric Errors vulnerability in Firebirdsql Firebird

047910
CVSS 7.8 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
COMPLETE
network
low complexity
firebirdsql
CWE-189
nessus
exploit available

Summary

Integer overflow in Firebird SQL 1.0.3 and earlier, 1.5.x before 1.5.6, 2.0.x before 2.0.4, and 2.1.x before 2.1.0 RC1 might allow remote attackers to execute arbitrary code via crafted (1) op_receive, (2) op_start, (3) op_start_and_receive, (4) op_send, (5) op_start_and_send, and (6) op_start_send_and_receive XDR requests, which triggers memory corruption.

Common Weakness Enumeration (CWE)

Exploit-Db

descriptionFirebird 2.0.3 Relational Database 'protocol.cpp' XDR Protocol Remote Memory Corruption Vulnerability. CVE-2008-0387. Remote exploits for multiple platform
idEDB-ID:31050
last seen2016-02-03
modified2008-01-28
published2008-01-28
reporterDamian Frizza
sourcehttps://www.exploit-db.com/download/31050/
titleFirebird <= 2.0.3 Relational Database 'protocol.cpp' XDR Protocol Remote Memory Corruption Vulnerability

Nessus

  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200803-02.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200803-02 (Firebird: Multiple vulnerabilities) Firebird does not properly handle certain types of XDR requests, resulting in an integer overflow (CVE-2008-0387). Furthermore, it is vulnerable to a buffer overflow when processing usernames (CVE-2008-0467). Impact : A remote attacker could send specially crafted XDR requests or an overly long username to the vulnerable server, possibly resulting in the remote execution of arbitrary code with the privileges of the user running the application. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id31329
    published2008-03-04
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/31329
    titleGLSA-200803-02 : Firebird: Multiple vulnerabilities
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1529.NASL
    descriptionMultiple security problems have been discovered in the Firebird database, which may lead to the execution of arbitrary code or denial of service. This Debian security advisory is a bit unusual. While it\
    last seen2020-06-01
    modified2020-06-02
    plugin id38955
    published2008-03-28
    reporterThis script is (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/38955
    titleDebian DSA-1529-1 : firebird -- multiple vulnerabilities

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/63047/CORE-2007-1219.txt
idPACKETSTORM:63047
last seen2016-12-05
published2008-01-28
reporterCore Security Technologies
sourcehttps://packetstormsecurity.com/files/63047/Core-Security-Technologies-Advisory-2007.1219.html
titleCore Security Technologies Advisory 2007.1219

Seebug

  • bulletinFamilyexploit
    descriptionBUGTRAQ ID: 27403 CVE(CAN) ID: CVE-2008-0387 Firebird是一款提供多个ANSI SQL-92功能的关系型数据库,可运行在Linux、Windows和各种Unix平台下。 Firebird在处理畸形格式的数据时存在漏洞,远程攻击者可能利用此漏洞导致拒绝服务。 如果Firebird的协议解析器(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&lt;SSHORT&amp;&gt;(data-&gt;p_data_request)); MAP(xdr_short, reinterpret_cast&lt;SSHORT&amp;&gt;(data-&gt;p_data_incarnation)); MAP(xdr_short, reinterpret_cast&lt;SSHORT&amp;&gt;(data-&gt;p_data_transaction)); MAP(xdr_short, reinterpret_cast&lt;SSHORT&amp;&gt;(data-&gt;p_data_message_number)); /* Changes to this op's protocol must mirror in xdr_protocol_overhead */ return xdr_request(xdrs, data-&gt;p_data_request, data-&gt;p_data_message_number, data-&gt;p_data_incarnation) ? P_TRUE(xdrs, p) : P_FALSE(xdrs, p); 然后在xdr_request()函数中,使用data-&gt;p_data_request变量(request_id)作为数组的索引: ... rrq* request = (rrq*) port-&gt;port_objects[request_id]; ... 这会触发内存结构破坏,导致服务器崩溃或执行任意代码。data-&gt;p_data_message_number变量也存在类似的问题。 Firebird Firebird SQL 2.1.0 Beta 2 Firebird Firebird SQL 2.0.3 Firebird Firebird SQL 1.5.5 Firebird Firebird SQL 1.0.3 厂商补丁: Firebird -------- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href=http://firebirdsql.org/index.php?op=files&amp;id=fb210_RC1 target=_blank>http://firebirdsql.org/index.php?op=files&amp;id=fb210_RC1</a>
    idSSV:2876
    last seen2017-11-19
    modified2008-01-30
    published2008-01-30
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-2876
    titleFirebird关系数据库protocol.cpp XDR协议远程内存破坏漏洞
  • bulletinFamilyexploit
    descriptionBUGTRAQ 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&lt;SSHORT&amp;&gt;(data-&gt;p_data_request)); MAP(xdr_short, reinterpret_cast&lt;SSHORT&amp;&gt;(data-&gt;p_data_incarnation)); MAP(xdr_short, reinterpret_cast&lt;SSHORT&amp;&gt;(data-&gt;p_data_transaction)); MAP(xdr_short, reinterpret_cast&lt;SSHORT&amp;&gt;(data-&gt;p_data_message_number)); /* Changes to this op's protocol must mirror in xdr_protocol_overhead */ return xdr_request(xdrs, data-&gt;p_data_request, data-&gt;p_data_message_number, data-&gt;p_data_incarnation) ? P_TRUE(xdrs, p) : P_FALSE(xdrs, p); 在函数xdr_request()中,变量data-&gt;p_data_request (as request_id)用于索引数组: ... rrq* request = (rrq*) port-&gt;port_objects[request_id]; ... 破坏内存结构,可引起服务程序拒绝服务。在变量data-&gt;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>
    idSSV:3104
    last seen2017-11-19
    modified2008-03-29
    published2008-03-29
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-3104
    titleFirebird关系数据库'protocol.cpp' XDR协议远程内存破坏漏洞