php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61430 Transposed memset() params in sapi/fpm/fpm/fpm_shm.c
Submitted: 2012-03-18 21:39 UTC Modified: 2012-03-19 20:48 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: michaelhood at gmail dot com Assigned: iliaa (profile)
Status: Closed Package: FPM related
PHP Version: 5.4.0 OS: Linux
Private report: No CVE-ID: None
 [2012-03-18 21:39 UTC] michaelhood at gmail dot com
Description:
------------
Affects all versions which bundle PHP-FPM. (>=5.3.3)

In fpm_shm_alloc there is a call to memset() to initialise the segment. The 
parameters to memset() are transposed. Since we are [trying to] initialise with 0,  
but passing 0 to size_t, it silently fails to do anything.

Patch attached, tested on 5.3.10 and 5.4.0.


Patches

mh_fix_fpm_shm.diff (last revision 2012-03-18 21:40 UTC by michaelhood at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-19 20:48 UTC] iliaa@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-03-19 20:48 UTC] iliaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
 [2012-04-17 03:23 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65062b47f35b858d6e6d0f91bacc929b470aa3a3
Log: Fix bug #61430 for trunk
 [2012-04-18 09:44 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65062b47f35b858d6e6d0f91bacc929b470aa3a3
Log: Fix bug #61430 for trunk
 [2012-07-24 23:36 UTC] rasmus@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65062b47f35b858d6e6d0f91bacc929b470aa3a3
Log: Fix bug #61430 for trunk
 [2013-11-17 09:32 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65062b47f35b858d6e6d0f91bacc929b470aa3a3
Log: Fix bug #61430 for trunk
 [2014-10-07 23:28 UTC] stas@php.net
Automatic comment on behalf of iliaal
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Log: Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
 [2014-10-07 23:39 UTC] stas@php.net
Automatic comment on behalf of iliaal
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Log: Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC