-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What to do about OpenSSL? #96
Comments
Kill it. |
v2.0.0 that doesn't rely on OpenSSL at all seems to be the best choice. |
👍 For killing it in a 2.0.0 release. |
Though, actually, given the seriousness, I'm inclined to say that actually a 1.3.0 is a better bet to ensure this gets widely deployed, quickly. |
http://semver.org/ dictates a major version increment with an incompatible API change, which removing support for OpenSSL almost certainly is |
This is not an API change. In fact, the public API (and semver.org does always say "public API") is tied to PHP 7.0.0's, so you almost by definition can't break SemVer compatibility. |
That's true (ish), which is why my first comment was for 2.0.0, but on reflection, I think 1.3.0 is better, despite semver for the reasons I said already. Most applications are restricting the version to 1.x for this package. I agree with @narfbg in terms of saying this isn't actually a break. Only the internal API has changed. |
Right. And the area where the issue is most likely going to occur is in WordPress, which already catches the Exception and falls back to what they used previously. Unless anyone objects I'm going to roll out 1.3.0 without OpenSSL. |
No objection about 1.3.0 from me. |
@paragonie-scott, I'm curious about your thoughts on a better CSPRNG to use in PHP, given your RFC (currently in voting phase) to kill mcrypt and our concerns with OpenSSL. Is there a better library we should eventually move into the PHP core that provides the same (yet more secure) functionality (i.e. LibreSSL, libsodium, etc.)? |
@ramsey Yes, for a CSPRNG, it's called The water is muddy here: CSPRNG aside, libsodium (which random_compat prefers if it's available) is highly regarded by cryptography/security experts. I have another RFC to add libsodium to PHP in 7.1, pending some changes after 1.0.3 of the PHP extension (which will sync up with 1.0.9 of the library) is finished. |
To clarify, the post-1.0.3 changes are API related but functionally zero: Instead of |
Can't say I'm that bothered |
Well, obviously! ;-) |
1c435ec removes OpenSSL. I'll tag/sign a release on Friday. |
Just to weigh in here, while I agree that the other reasons are good ones to remove it, OpenSSL doesn't actually use MD5 for the RAND calls. It's not much better, but by default in 1.0.1 it seems to be using SHA1 (Unless you explicitly build it to use MD5... or less...). A quick check of the compile options (Use |
* Remove OpenSSL from available RNGs, due to overwhelming security concerns
See: paragonie/random_compat#96 This vulnerability is actually two years old, but has recently been added to the sensio security checker database. EngineBlock was not affected because the insecure openssl function is only used when all other providers (like mcrypt) are not installed.
will there be an 1.4.x tag which is not listed on sensio labs (e.g. with openssl disabled?) |
That's what v2.x is. |
Related Information: paragonie/random_compat#96 Fixes neos#1222
@paragonie-scott Is it correct to say this is not affecting PHP 5.6.24 and higher? Asking in regards to the listing on security-advisories |
@paragonie-scott - thanks just created an pull request in neos/flow 3.3 to switch to v2 ... thanks a lot |
@andrerom I believe so. However, the decision to trust a userspace PRNG rather than the kernel's CSPRNG was a mistake that we will never repeat. |
Clear, I was more thinking a 1.5 release bumping php requirements would allow security advisories to avoid blindly marking whole 1.x branch as insecure, when in fact it depends. |
Honestly, just upgrade to v2.x. Other than the OpenSSL drop, there are no other significant changes. |
I just did it for 2 projects, works like a charm - thanks a lot. |
Awesome! If anyone else stumbles over this, I've just updated the readme to use headers instead of bold text so you can link folks directly to the relevant section: https://github.com/paragonie/random_compat/blob/master/README.md#version-conflict-with-other-php-project |
Related Information: paragonie/random_compat#96 Fixes #1222
See: paragonie/random_compat#96 This vulnerability is actually two years old, but has recently been added to the sensio security checker database. EngineBlock was not affected because the insecure openssl function is only used when all other providers (like mcrypt) are not installed. Backport from d960d82.
I'm stuck between several possible avenues:
I'm interested in everyone's opinions here. The status quo is simply unacceptable.
The text was updated successfully, but these errors were encountered: