From ${URL} : PHP FPM is the FastCGI Process Manager for PHP which can manage several pools of PHP FastCGI processors, often running with different user permissions for privilege separation. Web servers connect to these pools through one socket per configured process pool. When using UNIX sockets, the socket's permissions default to 0666 if not overriden explicitly ("listen.mode"). This is true even if the owner of the socket is changed explicitly ("listen.user", "listen.group"). Depending on the concrete scenario, this may result in privilege escalation. Any local user with the ability to connect to UNIX sockets can run arbitrary (PHP) code with the target process pool's permissions [1]. Ubuntu 14.04 Beta's default config seems to be vulnerable, any local user can run code as the 'www-data' user [2]. Other versions or distributions have not been tested, but may well be vulnerable, too. This issue is both about the example config [3] and the actual code [4]. No CVE has been requested by me or the PHP team (AFAIK) so far. Stanislav Malyshev from the PHP team has prepared a patch [5], which will be part of php-5.4.28. This issue is not public yet. Suggested embargo date: 2014-04-29 References (some still marked private at the time of writing): [1] https://bugs.php.net/bug.php?id=67060 [2] https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1307027 [3] https://github.com/php/php-src/blob/php-5.5.11/sapi/fpm/php-fpm.conf.in#L172 [4] https://github.com/php/php-src/blob/php-5.5.11/sapi/fpm/fpm/fpm_unix.c#L31 [5] https://hoffmann-christian.info/files/php-fpm/0001-Fix-bug-67060-use-default-mode-of-660.patch @maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
5.4.28 and 5.5.12 seems to fix the problem. Is fine to stabilize them?
so, is it fine to stablize?
(In reply to Matthew Thode ( prometheanfire ) from comment #2) > so, is it fine to stablize? I am sorry this slipped past me. Yes. It is fine to stabilise.
Arches, please test and mark stable: =dev-lang/php-5.4.28 =dev-lang/php-5.5.12 Target Keywords : "alpha amd64 arm hppa ia64 ppc ppc64 spark x86" Thank you!
Stable for HPPA.
amd64 stable
arm stable
alpha stable
ia64 stable
ppc64 stable
ppc stable
sparc stable
x86 stable. Maintainer(s), please cleanup. Security, please add it to the existing request, or file a new one.
Arches, Thank you for your work Maintainer(s), please drop the vulnerable version. Added to existing GLSA Request
CVE-2014-0185 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-0185): sapi/fpm/fpm/fpm_unix.c in the FastCGI Process Manager (FPM) in PHP before 5.4.28 and 5.5.x before 5.5.12 uses 0666 permissions for the UNIX socket, which allows local users to gain privileges via a crafted FastCGI client.
No vulnerable version in 5.4 and 5.5 branch left in tree. 5.3 branch is not treated in this bug but rather in bug 519932
This issue was resolved and addressed in GLSA 201408-11 at http://security.gentoo.org/glsa/glsa-201408-11.xml by GLSA coordinator Kristian Fiskerstrand (K_F).