Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235676 (CVE-2008-4107) - <dev-php5/suhosin-0.9.27: makes php + certain webapps invulnerable to RNG attacks (CVE-2008-4107)
Summary: <dev-php5/suhosin-0.9.27: makes php + certain webapps invulnerable to RNG att...
Status: RESOLVED FIXED
Alias: CVE-2008-4107
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Security
URL: http://www.suspekt.org/2008/08/17/mt_...
Whiteboard: B4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-25 13:31 UTC by Christian Hoffmann (RETIRED)
Modified: 2011-01-02 19:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Hoffmann (RETIRED) gentoo-dev 2008-08-25 13:31:07 UTC
This is not an ordinary security bug...
See $URL for a full explanation. Basically, suhosin-0.9.27 improves PHP's random number generation and prevents webapps from doing stupid things like using (mt_)srand($predictable_seed).
This is mostly a problem in webapps and should be fixed there, but in the meantime this new suhosin version provides a good workaround.
It also mitigates the problem of shared PHP installations in case of random numbers, where an evil user could initialize the random number generator (which is shared) with 0 or something.

All in all, these issues might lead to guessable tokens (such as those which are used for password reset services, confirmation emails, ...).

As this greatly improves security in certain webapps (don't have a list of those though), I'm requesting early stabilization.
Comment 1 Christian Hoffmann (RETIRED) gentoo-dev 2008-08-25 13:36:51 UTC
Arches, please test and mark stable:
  =dev-php5/suhosin-0.9.27

Target keywords: alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd
Already stable: amd64 (by me)

Testing can be done similar to dev-lang/php by trying certain webapps (phpMyAdmin, blog software, whatever) and making sure they still work as expected (i.e. with vanilla PHP).
Comment 2 Markus Meier gentoo-dev 2008-08-25 17:26:11 UTC
x86 stable
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-25 17:37:25 UTC
Stable for HPPA.
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2008-08-25 19:52:54 UTC
ppc stable
Comment 5 Raúl Porcel (RETIRED) gentoo-dev 2008-08-26 08:59:32 UTC
alpha/ia64/sparc stable
Comment 6 Markus Rothe (RETIRED) gentoo-dev 2008-08-29 07:17:36 UTC
ppc64 stable
Comment 7 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2008-09-08 17:17:46 UTC
I guess this one could be closed since all supported arches are stable?
Comment 8 Robert Buchholz (RETIRED) gentoo-dev 2008-09-09 14:43:23 UTC
Is the suhosin RNS installed/used by default for our PHP now?
Comment 9 Robert Buchholz (RETIRED) gentoo-dev 2008-09-19 15:27:41 UTC
CVE-2008-4107 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-4107):
  The (1) rand and (2) mt_rand functions in PHP 5.2.6 do not produce
  cryptographically strong random numbers, which allows attackers to
  leverage exposures in products that rely on these functions for
  security-relevant functionality, as demonstrated by the
  password-reset functionality in Joomla! 1.5.x and WordPress before
  2.6.2, a different vulnerability than CVE-2008-2107, CVE-2008-2108,
  and CVE-2008-4102.

Comment 10 Christian Hoffmann (RETIRED) gentoo-dev 2008-10-13 16:04:36 UTC
No, we are not enabling by default at the moment. Do you think we should? Upstream tries to convince distributions to drop using suhosin it all as they dislike any 3rd-party patches and claim that PHP already supports most of it (in 5.3+ though, and not everything either).

I'd prefer to keep it as-is at the moment, simply enabling suhosin now might cause breakage (as certain settings can be too restrictive for some setups). We could enable it in 5.3+, but I don't know whether the benefit there is still that hight that it makes sense at all.

Opinions?
Comment 11 Robert Buchholz (RETIRED) gentoo-dev 2009-01-13 16:59:24 UTC
Well, we need to do something about the issues that suhosn addresses and upstream does not really care. It is my understanding, suhosin is now enabled by default on Debian and Ubuntu systems, so web applications breakage should be resolved soon.
Comment 12 Christian Hoffmann (RETIRED) gentoo-dev 2009-04-14 16:17:24 UTC
Well, what to do now? I'd rather not want to be the one who is responsible for the change of enabling it by default in php-5.2.. this is very likely to cause unwanted side effects.
Whether or not to enable in 5.3 is something which has to be reevaluated, because certain things have improved in vanilla php (no, i don't have any details).

So.. I'd really mark this as WONTFIX for 5.2. What'd work for me would be an ewarn regarding that (i.e. explicitly suggest to enable the USE flag, but noting the possible consequences).
Comment 13 Christian Hoffmann (RETIRED) gentoo-dev 2009-12-21 08:31:44 UTC
Do we want it as default for 5.3? The decision should be made in the next one or two weeks.
Comment 14 Jamie Learmonth 2010-03-11 00:24:41 UTC
Although suhosin is actively maintained and being applied to the 5.3 branch of PHP, it is likely to cause more problems than it solves.

I suggest this only be enabled by default in hardened profiles.
Comment 15 Tim Sammut (RETIRED) gentoo-dev 2011-01-02 05:00:24 UTC
Rating this B4. GLSA Vote: no.
Comment 16 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2011-01-02 18:58:41 UTC
GLSA Vote: no.
Comment 17 Tim Sammut (RETIRED) gentoo-dev 2011-01-02 19:16:39 UTC
(In reply to comment #16)
> GLSA Vote: no.
> 

Thanks! Closing noglsa.