Register | Forget Password | Login
Search :
SecurityReason

News

Search

SecurityAlert

About SecurityAlert

ExploitAlert

SecurityReason Research

WLB

WLB Database

Send to WLB

About WLB

RSS

News

SecurityAlert

World Laboratory of Bugtraq

ExploitAlert

Apache

PHP

Corporate

Contact

About us

Services

SecurePHP

Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Details : SecurityAlert

  Topic : Buffer-overflow and crash in Fenice OMS 1.10
  SecurityAlert : 794
  CVE : CVE-2006-2023
  CVE : CVE-2006-2022
  SecurityRisk : High  alert  (About)
  Remote Exploit : Yes
  Local Exploit : No
  Exploit Given : Yes
  Credit : Luigi Auriemma (aluigi autistici org)
  Published : 27.04.2006

  Affected Software : Fenice - Open Media Streaming Server



  Advisory Text :  

#######################################################################

Luigi Auriemma

Application: Fenice - Open Media Streaming Server
http://streaming.polito.it/server
Versions: <= 1.10 and current SVN 2005-07-26
Platforms: *nix, *BSD and others
Bugs: A] buffer-overflow in parse_url
B] crash in RTSP_msg_len
Exploitation: remote
Date: 23 Apr 2006
Author: Luigi Auriemma
e-mail: aluigi (at) autistici (dot) org [email concealed]
web: http://aluigi.altervista.org

#######################################################################

1) Introduction
2) Bugs
3) The Code
4) Fix

#######################################################################

===============
1) Introduction
===============

Fenice is the name of the Open Media Streaming Server (OMS) developed
by the italian team of the Politecnico di Torino University.
This open source server implements the RTSP, RTP and RTCP protocols.

#######################################################################

=======
2) Bugs
=======

-------------------------------
A] buffer-overflow in parse_url
-------------------------------

The RTSP module of Fenice uses a function (parse_url) for retrieving
the server, the port and the filename contained in the URI sent by the
client.
This function uses some strcpy calls for filling the server and
file_name buffers passed by the main function allowing an attacker to
use the consequent buffer-overflow vulnerability for executing possible
malicious code.

From rtsp/parse_url.c:

int parse_url(const char *url, char *server, unsigned short *port, char
*file_name)
// Note: this routine comes from OMS
{
/* expects format '[rtsp://server[:port/]]filename' */

...
strcpy(server, token);
...
token = strtok(NULL, " ");
if (token)
strcpy(file_name, token);
...
char *token = strtok(full, " tn");
if (token) {
strcpy(file_name, token);
server[0] = '';
valid_url = 1;
}
}
free(full);
return valid_url;
}

------------------------
B] crash in RTSP_msg_len
------------------------

The function which handles the Content-Length field sent by the client
doesn't check the size/sign of this parameter.
In the function RTSP_msg_len we can see the ml variable used to contain
the number of bytes in the header and bl for the Content-Length value.
When the end of the client's request is reached the program adds bl to
ml.
If bl (Content-Length) is a big value like 2147483647 or more ml will
become a negative number (ml is a signed integer like all the other
variables there) and the subsequent check "ml > rtsp->in_size" will be
bypassed.
The result is the reading access to an invalid zone of the memory which
will cause the immediate crash of the server.

From rtsp/RTSP_msg_len.c:

void RTSP_msg_len(int *hdr_len, int *body_len, RTSP_buffer * rtsp)
// This routine is from OMS.
{
int eom; /* end of message found */
int mb; /* message body exists */
int tc; /* terminator count */
int ws; /* white space */
int ml; /* total message length including any message body */
int bl; /* message body length */
char c; /* character */
char *p;

eom = mb = ml = bl = 0;
while (ml <= rtsp->in_size) {
...
if (eom) {
ml += bl; /* add in the message body length */
break; /* all done finding the end of the message. */
}
if (ml >= rtsp->in_size)
break;
...
if (sscanf(&(rtsp->in_buffer[ml]), "%d", &bl) != 1) {
fnc_log(FNC_LOG_FATAL,"invalid ContentLength encountered in
message.");
exit(-1);
}
}
}
}

if (ml > rtsp->in_size) {
fnc_log(FNC_LOG_FATAL,"buffer did not contain the entire RTSP message.");
exit(-1);
}
...
*hdr_len = ml - bl;
for (tc = rtsp->in_size - ml, p = &(rtsp->in_buffer[ml]); tc && (*p ==
''); p++, bl++, tc--);
*body_len = bl;
}

#######################################################################

===========
3) The Code
===========

A] GET /[about 320 'a's] HTTP/1.0

B] GET / HTTP/1.0
Content-Length: 4294967295

#######################################################################

======
4) Fix
======

A patch will be released soon.

#######################################################################

---
Luigi Auriemma
http://aluigi.altervista.org




  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

Microsoft VISTA TCP/IP stack buffer overflow

high- 2008-11-27

Microsoft Device IO Control wrapped by the iphlpapi.dll API shipping with Windows Vista 32 bit and 64 bit contains a possibly exploitable, buffer overflow corrupting kernel memory.

Apache rss

» Apache Tomcat information
   disclosure

» Apache Tomcat <=
   6.0.18 UTF8 Directory
   Traversal Vulnerability

» Apache Tomcat information
   disclosure vulnerability

» Apache Tomcat XSS
   vulnerability

PHP rss

» PHP 5.2.6 SAPI
   php_getuid() overload

» PHP
   ZipArchive::extractTo()
   Directory Traversal
   Vulnerability

» PHP 5.2.6 dba_replace()
   destroying file

» PHP 5.2.6 (error_log)
   safe_mode bypass

Copyright © SecurityReason. All Rights Reserved.