Issue Details (XML | Word | Printable)

Key: CORE-4058
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Alexander Peshkov
Reporter: Spencer McIntyre
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Remote Stack Buffer Overflow in Firebird SQL Server

Created: 05/Mar/13 08:16 PM   Updated: 23/Apr/13 02:21 PM
Component/s: None
Affects Version/s: 2.5.2
Fix Version/s: 2.1.5 Update 1, 2.5.2 Update 1, 2.1.6, 2.5.3

Time Tracking:
Not Specified

File Attachments: 1. File bof.py (2 kB)

Environment: Tested on Windows XP, 7, Server 2003 and Server 2008 with Firebird versions 2.1.3-2.1.5 and 2.5.1-2.5.2

Planning Status: Unspecified


 Description  « Hide
The FirebirdSQL server is vulnerable to a stack buffer overflow that can be
triggered when an unauthenticated user sends a specially crafted packet. The
result can lead to remote code execution as the user which runs the FirebirdSQL
server.

Proof of Concept and technical details:
https://gist.github.com/zeroSteiner/85daef257831d904479c

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 06/Mar/13 07:30 AM
Attachned python script to reproduce

Alexander Peshkov added a comment - 06/Mar/13 11:38 AM
A reason is a bug when extracting a group number from the CNCT info, sent by client. Size of received data was not checked. Bug exists from the first most days of firebird.

The main irony here is that this group info was never used later in the code, and therefore was cleaned up in the trunk. I.e. trunk does not require fixing.

Spencer McIntyre added a comment - 06/Mar/13 02:00 PM
I just tested against the latest build for 2.5.3 Windows 32-bit. Specifically I tested the classic, super and superclassic versions from this http://web.firebirdsql.org/download/snapshot_builds/win/2.5/Firebird-2.5.3.26618-0_Win32.zip and they were still vulnerable except for the classic version.

Could you please provide me a revision number for when this issue was fixed?

Spencer McIntyre added a comment - 06/Mar/13 05:49 PM
I just heard back from MITRE who has reserved CVE-2013-2492 to identify this vulnerability.

Dmitry Yemanov added a comment - 07/Mar/13 05:43 AM
The fixed snapshot builds will be available today, build numbers are 26623 for v2.5 and 18514 for v2.1.