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

Luigi Auriemma

Application:  Icecast
              http://www.icecast.org
Versions:     <= 2.0.1
Platforms:    only Win32 seems vulnerable but other platforms could be
              affected in some conditions
Bug:          array overflow
Risk:         critical
Exploitation: remote
Date:         28 September 2004
Author:       Luigi Auriemma
              e-mail: aluigi (at) altervista (dot) org [email concealed]
              web:    http://aluigi.altervista.org

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

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

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

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

Icecast is an audio broadcast system that streams music in both MP3 and
Ogg Vorbis format.

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

======
2) Bug
======

The Icecast server accepts a maximum of 32 headers in the clients HTTP
request.

In some environments (like in Win32) a request with more than 31
headers causes the overwriting of the return address of the vulnerable
function with a pointer to the beginning of the 32th header.

In short, is possible to execute remote code simply using the normal
HTTP request plus 31 headers followed by a shellcode that will be
executed directly without the need of calling/jumping to registers or
addresses or using other annoying techniques.

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

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

http://aluigi.altervista.org/poc/iceexec.zip

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

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

Version 2.0.2

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

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