Vulnerability Information

Vulnerability Description

The Borland Interbase 2007 database server [1] is
vulnerable to an integer overflow when a malformed packet is sent to the default TCP port 3050.
The integer overflow can cause a stack overflow, which allows arbitrary code execution with system privileges.

Vulnerable packages

Non-vulnerable packages

None currently available (see vendor information below).

Vendor Information, Solutions and Workarounds

Verbatim from vendor:

"CodeGear is aware of an InterBase security vulnerability that can
expose an InterBase server (running on Microsoft Windows, Linux, Solaris
and Macintosh platforms) to a possible security breach. This
vulnerability is exposed via inside the firewall connections. If an open
port which is connected to an InterBase server is found, and a socket
connection is made to the InterBase server, invalid data can be sent to
the InterBase server which can cause a buffer overflow resulting in a
hang or crash of the InterBase server.

How do I protect my InterBase servers from this security vulnerability?

There are 2 basic steps to protect your InterBase servers from this vulnerability:

1. The Interbase.log file will give error log information about remote machines that have invalid connection attempts. You can use this information to identify such rogue applications and take corrective action.

2. InterBase versions 7.5 and later provide a facility to redefine your instance of InterBase to use a different TCP port. Use this facility when you install the product so external rogue applications cannot connect to a â€œknownâ€ port.

Please consult your security advisors for the best way to protect your systems.

We are investigating additional solutions to address this vulnerability and will notify users of any further precautions which may be taken for additional protection."

Credits

This vulnerability was discovered and researched by Damian Frizza,
from CORE IMPACT's Exploit Writing Team (EWT), Core Security Technologies.
Special thanks to Alfredo Ortega.
An exploit for this vulnerability will be shortly available for CORE IMPACT customers.

Technical Description / Proof of Concept Code

The Borland Interbase 2007 database server is
vulnerable to an integer overflow when a malformed packet is sent to the default TCP port 3050.
The integer overflow causes a stack overflow, which allows arbitrary code execution with system privileges.

During the research of a Firebird SQL bug reported earlier by
another party [2]
a triggering proof of concept was developed. According to [3],
Firebird SQL started as a fork of Borland's open source release of InterBase,
so the Firebird PoC was also tested on Interbase, triggering the bug described in this advisory.

Report Timeline

2008-05-02: Initial notification sent to the vendor, offering the CORE-2008-0415 advisory draft in plain-text or encrypted.

2008-05-05: Vendor acknowledges and requests the draft in plain text.

2008-05-05: Core sends the draft.

2008-05-09: Vendor requests a more detailed description of the steps to reproduce the bug.

2008-05-09: Core sends a more detailed description of the steps to reproduce the bug and fixes a bug on the PoC python code.

2008-05-09: Vendor confirms the bug has been reproduced.

2008-05-14: Vendor sends information for the advisory, including steps to protect from the vulnerability and considering the issue closed.

2008-05-15: Core asks the vendor if the response is final and communicates that the steps described by the vendor are only ineffective mitigations that can be bypassed by a skilled attacker (i.e. finding any new port and erasing the Interbase logs). If the response is final, advisory will be published on May 26th as scheduled.

2008-05-15: Vendor confirms that the response is final and that any further information will be notified to the customers.

2008-05-15: Core decides and communicates the vendor that the advisory will be published on May 20th, no further postponement is required by the coordinating parties.

About CoreLabs

CoreLabs, the research center of Core Security Technologies, is charged with anticipating the future needs
and requirements for information security technologies. We conduct our research in several important areas
of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing,
and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions
and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers,
project information and shared software tools for public use at: http://www.coresecurity.com/corelabs/.

About Core Security Technologies

Core Security Technologies develops strategic solutions that help security-conscious organizations worldwide
develop and maintain a proactive process for securing their networks. The company's flagship product,
CORE IMPACT, is the most comprehensive product for performing enterprise security assurance testing.
CORE IMPACT evaluates network, endpoint and end-user vulnerabilities and identifies what resources are exposed.
It enables organizations to determine if current security investments are detecting and preventing attacks.
Core Security Technologies augments its leading technology solution with world-class security consulting services, including penetration
testing and software security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core Security Technologies
can be reached at 617-399-6980 or on the Web at http://www.coresecurity.com.

Disclaimer

The contents of this advisory are copyright (c) 2008 Core Security Technologies and (c) 2008 CoreLabs,
and may be distributed freely provided that no fee is charged for this distribution and proper credit is given.

PGP/GPG Keys

This advisory has been signed with the GPG key of Core Security Technologies advisories team, which is
available for download at /legacy/files/attachments/core_security_advisories.asc.