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.

Bug 1693137

Summary: AVC denied map for php-cgi when php-pecl-apcu is installed
Product: Red Hat Enterprise Linux 8 Reporter: David Jež <djez>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: jheger, lvrabec, mmalik, plautrba, ssekidde, zpytela
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.14.3-12.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:11:10 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 David Jež 2019-03-27 08:43:26 UTC
Description of problem:
When package 'php-pecl-apcu' is installed then php-cgi cause selinux AVC.

Version-Release number of selected component (if applicable):
php-fpm-7.2.11-1.module+el8+2561+1aca3413.x86_64
php-common-7.2.11-1.module+el8+2561+1aca3413.x86_64
php-7.2.11-1.module+el8+2561+1aca3413.x86_64
php-pecl-apcu-5.1.12-1.module+el8+2561+1aca3413.x86_64
php-cli-7.2.11-1.module+el8+2561+1aca3413.x86_64

How reproducible:
Always

Steps to Reproduce:
1. get a RHEL-8.0 machine (targeted policy is active)
2. install php-pecl-apcu package
3. run one of following automated test cases:
   * TC#576587 - /CoreOS/php/Security/CVE-2012-1823-command-line-arg-injecting-with-php-cgi [php:7.2 httpd:2.4]
   * TC#576615 - /CoreOS/php/Security/CVE-2012-2311-incomplete-php-cgi-arg-handling-fix [php:7.2 httpd:2.4]
4. search for SELinux denials

Actual results:
type=PROCTITLE msg=audit(1553619697.221:648): proctitle="/usr/bin/php-cgi"
type=SYSCALL msg=audit(1553619697.221:648): arch=c00000b7 syscall=222 success=no exit=-13 a0=0 a1=2000000 a2=3 a3=1 items=0 ppid=31854 pid=32166 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="php-cgi" exe="/usr/bin/php-cgi" subj=system_u:system_r:httpd_sys_script_t:s0 key=(null)
type=AVC msg=audit(1553619697.221:648): avc:  denied  { map } for  pid=32166 comm="php-cgi" path=2F746D702F6170632E723348493672202864656C6574656429 dev="dm-0" ino=1062493 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:httpd_sys_rw_content_t:s0 tclass=file permissive=0
----
time->Tue Mar 26 13:01:37 2019
type=PROCTITLE msg=audit(1553619697.871:652): proctitle="/usr/bin/php-cgi"
type=SYSCALL msg=audit(1553619697.871:652): arch=c00000b7 syscall=222 success=no exit=-13 a0=0 a1=2000000 a2=3 a3=1 items=0 ppid=31854 pid=32181 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="php-cgi" exe="/usr/bin/php-cgi" subj=system_u:system_r:httpd_sys_script_t:s0 key=(null)
type=AVC msg=audit(1553619697.871:652): avc:  denied  { map } for  pid=32181 comm="php-cgi" path=2F746D702F6170632E32376C705239202864656C6574656429 dev="dm-0" ino=1062493 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:httpd_sys_rw_content_t:s0 tclass=file permissive=0

Expected results:
no SELinux denial

Comment 1 Jakub Heger 2019-06-24 13:38:58 UTC
Has this bug been fixed? Affected test cases no longer fail.

Comment 2 Jakub Heger 2019-06-28 08:43:07 UTC
Never mind, I they are still failling. Any progress on the fix?

Comment 17 errata-xmlrpc 2019-11-05 22:11:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3547