Bug 1427255

Summary: PHP doesn't fallback to urandom when getrandom is not available
Product: [Fedora] Fedora Reporter: Jiri Eischmann <jeischma>
Component: phpAssignee: Remi Collet <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 25CC: fedora, fran, jorton
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: php-7.0.17-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-18 19:53:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Eischmann 2017-02-27 17:14:36 UTC
If PHP is compiled on a newer kernel, it requires getrandom which is not available on older kernels. That causes problems when Fedora runs in a container on a host with an older kernel (e.g. RHEL 7). PHP should fallback to urandom in these cases. The bug has been fixed upstream, see the linked bug report.

This bug has a potential to break pretty much every security-concerned php app running on Fedora in a container on a host with an older kernel which is a typical scenario. In my case, it broke Nextcloud running on Fedora 25 in openvz on CentOS 7.

A temporary solution is downgrading to PHP 7.0.15 which doesn't suffer from this bug.

Comment 1 Remi Collet 2017-02-28 05:43:09 UTC
The fix for upstream bug 74105 will be part of PHP 7.0.17 (planed for March 17th).

I will try to provide a 7.0.17RC1 build later this week (planed for March 2nd).

Comment 2 Remi Collet 2017-02-28 14:03:47 UTC
Package:    php-7.1.3-0.1.RC1.fc26
Status:     complete
Built by:   remi

Package:    php-7.0.17-0.1.RC1.fc25
Status:     complete
Built by:   remi

Comment 3 Fedora Update System 2017-02-28 14:05:38 UTC
php-7.0.17-0.1.RC1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8f457feb78

Comment 4 Fedora Update System 2017-03-01 02:54:42 UTC
php-7.0.17-0.1.RC1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8f457feb78

Comment 5 Jiri Eischmann 2017-03-01 09:38:31 UTC
The provided build has fixed the issue for me.

Comment 6 Fedora Update System 2017-03-15 08:54:53 UTC
php-7.0.17-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-79e959b421

Comment 7 Fedora Update System 2017-03-15 19:58:34 UTC
php-7.0.17-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-79e959b421

Comment 8 Fedora Update System 2017-03-18 19:53:20 UTC
php-7.0.17-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.