#38322 [NEW]: reading past array in sscanf leads to arbitary code execution

From: Date: Fri, 04 Aug 2006 00:36:22 +0000
Subject: #38322 [NEW]: reading past array in sscanf leads to arbitary code execution
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100311@lists.php.net to get a copy of this message
From: heintz at hotmail dot com Operating system: all PHP version: 5.1.4 PHP Bug Type: Strings related Bug description: reading past array in sscanf leads to arbitary code execution Description: ------------ ext/standard/scanf.c line ~887 --- if (numVars) { current = args[objIndex++]; --- objIndex points past the end of array in other format cases too Reproduce code: --------------- sscanf('foo ','$1s',$str); http://www.plain-text.info/sscanf_bug.txt - full description Actual result: -------------- will try to dereference a pointer to pointer which usually causes segmentation fault -- Edit bug report at http://bugs.php.net/?id=38322&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38322&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38322&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38322&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38322&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38322&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38322&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38322&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38322&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38322&r=support Expected behavior: http://bugs.php.net/fix.php?id=38322&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38322&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38322&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38322&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38322&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38322&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38322&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38322&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38322&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38322&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38322&r=mysqlcfg

« previous php.bugs (#100311) next »