Bug #68812 [Asn->Csd]: Unchecked return value

From: Date: Tue, 09 Jun 2015 12:02:31 +0000
Subject: Bug #68812 [Asn->Csd]: Unchecked return value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193240@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68812&edit=1 ID: 68812 Updated by: cmb@php.net Reported by: bugreports at internot dot info Summary: Unchecked return value -Status: Assigned +Status: Closed Type: Bug Package: Other web server Operating System: Linux Ubuntu 14.04 PHP Version: master-Git-2015-01-12 (Git) Assigned To: gwang Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2015-06-08 19:52:19] gwang@php.net Fix has been committed. You can apply following patch diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index baf0db3..a109909 100644 @@ -3131,10 +3131,20 @@ static int lsapi_initSuEXEC() if ( !s_defaultUid || !s_defaultGid ) { pw = getpwnam( "nobody" ); - if ( !s_defaultUid ) - s_defaultUid = pw->pw_uid; - if ( !s_defaultGid ) - s_defaultGid = pw->pw_gid; + if ( pw ) + { + if ( !s_defaultUid ) + s_defaultUid = pw->pw_uid; + if ( !s_defaultGid ) + s_defaultGid = pw->pw_gid; + } + else + { + if ( !s_defaultUid ) + s_defaultUid = 10000; + if ( !s_defaultGid ) + s_defaultGid = 10000; + } } return 0; } ------------------------------------------------------------------------ [2015-06-08 18:27:31] cmb@php.net George, can you please have a look at this issue? ------------------------------------------------------------------------ [2015-01-12 15:48:45] bugreports at internot dot info Description: ------------ Hi, In /sapi/litespeed/lsapilib.c: 3114 pw = getpwnam( "nobody" ); is not checked against NULL, as it is everywhere else. This may cause a null pointer dereference. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68812&edit=1

« previous php.bugs (#193240) next »