Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
.`php-fpm` causes SELinux AVC denials when `php-opcache` is installed with PHP 7.2
When the `php-opcache` package is installed, the FastCGI Process Manager (`php-fpm`) causes SELinux AVC denials. To work around this problem, change the default configuration in the `/etc/php.d/10-opcache.ini` file to the following:
----
opcache.huge_code_pages=0
----
Note that this problem affects only the `php:7.2` stream, not the `php:7.3` one.
2 possible fix:
1/ runtime
- change default provided configuration to opcache.huge_code_pages=0
(whichh may allow user to enable it....)
2/ buldtime
- add --disable-huge-code-pages build option
- clean configuration file
In both case, a configuration change is needed
Comment 12Ralph Williamson
2020-12-19 18:17:10 UTC
The previous comment indicates a configuration change is a possible mitigation. But it does not work for me.
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
opcache.huge_code_pages=0
# php -v
PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
# ausearch -m AVC
----
time->Sat Dec 19 03:33:45 2020
type=AVC msg=audit(1608370425.385:153): avc: denied { execmem } for pid=742 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0
(In reply to Ralph Williamson from comment #12)
> The previous comment indicates a configuration change is a possible
> mitigation. But it does not work for me.
>
> ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
> ; This should improve performance, but requires appropriate OS configuration.
> opcache.huge_code_pages=0
>
> # php -v
> PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS )
> Copyright (c) The PHP Group
> Zend Engine v3.4.0, Copyright (c) Zend Technologies
> with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
Hi Ralph,
this doesn't look like php delivered by RedHat in rhel-8.3.
Latest php 7.4 is php-common-7.4.6-4.module+el8.3.0+7002+2eb69d76
# php -v
PHP 7.4.6 (cli) (built: May 12 2020 08:09:15) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
>
> # ausearch -m AVC
>
> ----
> time->Sat Dec 19 03:33:45 2020
> type=AVC msg=audit(1608370425.385:153): avc: denied { execmem } for
> pid=742 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0
> tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0
Comment 15RHEL Program Management
2021-02-01 07:32:18 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.
Description of problem: When package 'php-opcache' is installed then php-fpm cause selinux AVC. Version-Release number of selected component (if applicable): php-fpm-7.2.11-1.module+el8+2561+1aca3413 How reproducible: Always Steps to Reproduce: 1. yum install php php-fpm php-opcache 2. service php-fpm restart 3. ausearch -m AVC Actual results: ---- time->Tue Jan 29 08:16:41 2019 type=PROCTITLE msg=audit(1548767801.906:957): proctitle=2F7573722F7362696E2F7068702D66706D002D2D6E6F6461656D6F6E697A65 type=SYSCALL msg=audit(1548767801.906:957): arch=c000003e syscall=9 success=no exit=-13 a0=55cc52600000 a1=200000 a2=7 a3=40032 items=0 ppid=1 pid=10585 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="php-fpm" exe="/usr/sbin/php-fpm" subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(1548767801.906:957): avc: denied { execmem } for pid=10585 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0 ---- time->Tue Jan 29 08:16:41 2019 type=PROCTITLE msg=audit(1548767801.906:958): proctitle=2F7573722F7362696E2F7068702D66706D002D2D6E6F6461656D6F6E697A65 type=SYSCALL msg=audit(1548767801.906:958): arch=c000003e syscall=9 success=no exit=-13 a0=55cc52600000 a1=200000 a2=7 a3=32 items=0 ppid=1 pid=10585 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="php-fpm" exe="/usr/sbin/php-fpm" subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(1548767801.906:958): avc: denied { execmem } for pid=10585 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0 type=AVC msg=audit(1545048868.378:1504): avc: denied { execmem } for pid=17365 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0 Expected results: no AVC. Additional info: No AVC if php-opcache is not installed.