Bug 1444546 - SELinux is preventing php-fpm from 'execute' accesses on the file 2F616E6F6E5F6875676570616765202864656C6574656429.
Summary: SELinux is preventing php-fpm from 'execute' accesses on the file 2F616E6F6E5...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 26
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4ceaa3b690b3e9d1e1ba191f94f...
: 1507289 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-22 05:53 UTC by Mikhail
Modified: 2018-01-22 16:25 UTC (History)
10 users (show)

Fixed In Version: selinux-policy-3.13.1-260.17.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-19 21:32:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2017-04-22 05:53:51 UTC
Description of problem:
SELinux is preventing php-fpm from 'execute' accesses on the file 2F616E6F6E5F6875676570616765202864656C6574656429.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that php-fpm should be allowed execute access on the 2F616E6F6E5F6875676570616765202864656C6574656429 file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'php-fpm' --raw | audit2allow -M my-phpfpm
# semodule -X 300 -i my-phpfpm.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:hugetlbfs_t:s0
Target Objects                2F616E6F6E5F6875676570616765202864656C6574656429 [
                              file ]
Source                        php-fpm
Source Path                   php-fpm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-249.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed)
                              4.11.0-0.rc7.git0.1.fc26.x86_64+debug #1 SMP Mon
                              Apr 17 17:55:44 UTC 2017 x86_64 x86_64
Alert Count                   5
First Seen                    2017-04-15 21:53:06 +05
Last Seen                     2017-04-21 01:23:28 +05
Local ID                      81fac950-5154-435f-82e1-9a15678e7b03

Raw Audit Messages
type=AVC msg=audit(1492719808.962:2193): avc:  denied  { execute } for  pid=14637 comm="php-fpm" path=2F616E6F6E5F6875676570616765202864656C6574656429 dev="hugetlbfs" ino=2462238 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:hugetlbfs_t:s0 tclass=file permissive=1


Hash: php-fpm,httpd_t,hugetlbfs_t,file,execute

Version-Release number of selected component:
selinux-policy-3.13.1-249.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.0-0.rc7.git0.1.fc26.x86_64+debug
type:           libreport

Comment 1 Robert Scheck 2017-09-08 09:25:20 UTC
I am seeing the same here (but on RHEL and for php-cli rather php-fpm).
Can this get addressed on Fedora at least, please? This must be somehow
related to PHP 7.x:

type=AVC msg=audit(1504861022.452:11575): avc:  denied  { execute } for  pid=63316 comm="php" path=2F616E6F6E5F6875676570616765202864656C6574656429 dev="hugetlbfs" ino=4487400 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:hugetlbfs_t:s0 tclass=file
type=SYSCALL msg=audit(1504861022.452:11575): arch=c000003e syscall=9 success=no exit=-13 a0=55ba83c00000 a1=200000 a2=7 a3=40032 items=0 ppid=1 pid=63316 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="php"
 exe="/opt/remi/php70/root/usr/bin/php" subj=system_u:system_r:httpd_t:s0 key=(null)

Comment 2 Lukas Vrabec 2017-10-30 16:47:54 UTC
*** Bug 1507289 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Vrabec 2017-10-30 16:49:01 UTC
Fixed in Fedora26+. This fix will be part of the next updates.

Comment 4 Robert Scheck 2017-10-30 16:59:10 UTC
Is that a large change? Do you see a chance that this could get backported
to RHEL 7 (when using SCLs), if I file a bug report?

Comment 5 Lukas Vrabec 2017-10-30 17:00:06 UTC
Create a BZ for RHEL7 please.

Comment 6 Robert Scheck 2017-10-30 22:16:04 UTC
Done, it's bug #1507682 (for those stumbling over it via Google like me).

Comment 7 Milos Malik 2017-10-31 07:56:22 UTC
Just using "ausearch -i -if /dev/stdin" to interpret hexadecimal strings:

----
type=SYSCALL msg=audit(09/08/2017 10:57:02.452:11575) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x55ba83c00000 a1=0x200000 a2=PROT_READ|PROT_WRITE|PROT_EXEC a3=MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_HUGETLB items=0 ppid=1 pid=63316 auid=unset uid=unknown(48) gid=unknown(48) euid=unknown(48) suid=unknown(48) fsuid=unknown(48) egid=unknown(48) sgid=unknown(48) fsgid=unknown(48) tty=(none) ses=unset comm=php 
type=AVC msg=audit(09/08/2017 10:57:02.452:11575) : avc:  denied  { execute } for  pid=63316 comm=php path=/anon_hugepage (deleted) dev="hugetlbfs" ino=4487400 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:hugetlbfs_t:s0 tclass=file 
----

Comment 8 Fedora Update System 2017-11-16 21:08:43 UTC
selinux-policy-3.13.1-260.16.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-39e6a2f7e7

Comment 9 Fedora Update System 2017-11-18 01:45:16 UTC
selinux-policy-3.13.1-260.16.fc26 has been pushed to the Fedora 26 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-39e6a2f7e7

Comment 10 Fedora Update System 2017-11-21 16:22:04 UTC
selinux-policy-3.13.1-260.17.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-39e6a2f7e7

Comment 11 Fedora Update System 2017-11-22 11:07:19 UTC
selinux-policy-3.13.1-260.17.fc26 has been pushed to the Fedora 26 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-39e6a2f7e7

Comment 12 Fedora Update System 2017-12-19 21:32:13 UTC
selinux-policy-3.13.1-260.17.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.