Buffer-overflow in WinUAE 1.4.4

2007-12-27 / 2007-12-28
Risk: High
Local: No
Remote: Yes
CWE: CWE-119


Ogólna skala CVSS: 6.8/10
Znaczenie: 6.4/10
Łatwość wykorzystania: 8.6/10
Wymagany dostęp: Zdalny
Złożoność ataku: Średnia
Autoryzacja: Nie wymagana
Wpływ na poufność: Częściowy
Wpływ na integralność: Częściowy
Wpływ na dostępność: Częściowy

####################################################################### Luigi Auriemma Application: WinUAE http://www.winuae.net Versions: <= 1.4.4 Platforms: Windows Bug: buffer-overflow Exploitation: local Date: 21 Dec 2007 Author: Luigi Auriemma e-mail: aluigi (at) autistici (dot) org [email concealed] web: aluigi.org ####################################################################### 1) Introduction 2) Bug 3) The Code 4) Fix ####################################################################### =============== 1) Introduction =============== WinUAE is the most known and used Amiga emulator for Windows. A note about this advisory: UAE (and consequently WinUAE) is affected by some design bugs which introduce other security problems (as pointed by the same developer) so I focused only on the following non-design security bug. ####################################################################### ====== 2) Bug ====== WinUAE supports various types of compressed floppy disk images. Gzip compression (images with gz, adz, roz and hdz extensions) is handled by an internal function called zfile_gunzip in which is used a stack buffer of 1000 (MAX_DPATH) bytes for including the name of the file available in the gzipped archive. The instructions which copy the name from the archive to the buffer don't check it's length allowing an attacker to exploit the subsequent buffer-overflow for executing malicious code. From zfile.c: struct zfile *zfile_gunzip (struct zfile *z) { uae_u8 header[2 + 1 + 1 + 4 + 1 + 1]; z_stream zs; int i, size, ret, first; uae_u8 flags; long offset; char name[MAX_DPATH]; uae_u8 buffer[8192]; ... do { zfile_fread (name + i, 1, 1, z); } while (name[i++]); ... ####################################################################### =========== 3) The Code =========== http://aluigi.org/poc/winuaebof.zip ####################################################################### ====== 4) Fix ====== Version 1.4.5 ####################################################################### --- Luigi Auriemma http://aluigi.org


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top