Bug 1584811 - SELinux is preventing php-fpm from 'map' accesses on the file /var/lib/phpMyAdmin/temp/twig/80/809dbf34efabcf21fa6d57b8d6f95b7ad7ac7d190851f4ef36fa9f94bac71c36.php.
Summary: SELinux is preventing php-fpm from 'map' accesses on the file /var/lib/phpMyA...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:27e4914a39fc18a9ab11fa8d17e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-31 17:31 UTC by George Petasis
Modified: 2018-06-09 20:41 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.14.2-22.fc29 selinux-policy-3.14.1-32.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-09 20:41:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description George Petasis 2018-05-31 17:31:19 UTC
Description of problem:
When I use phpMyAdmin in my Fedora 28 box, I keep getting many selinux alerts.
For some unknown reason, there are new files written in /var/lib/phpMyAdmin/temp/twig.
The new files created, like /var/lib/phpMyAdmin/temp/twig/80/809dbf34efabcf21fa6d57b8d6f95b7ad7ac7d190851f4ef36fa9f94bac71c36.php have
var_lib_t. 
SELinux is preventing php-fpm from 'map' accesses on the file /var/lib/phpMyAdmin/temp/twig/80/809dbf34efabcf21fa6d57b8d6f95b7ad7ac7d190851f4ef36fa9f94bac71c36.php.

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

If you believe that php-fpm should be allowed map access on the 809dbf34efabcf21fa6d57b8d6f95b7ad7ac7d190851f4ef36fa9f94bac71c36.php 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:var_lib_t:s0
Target Objects                /var/lib/phpMyAdmin/temp/twig/80/809dbf34efabcf21f
                              a6d57b8d6f95b7ad7ac7d190851f4ef36fa9f94bac71c36.ph
                              p [ file ]
Source                        php-fpm
Source Path                   php-fpm
Port                          <Άγνωστο>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-30.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.12-300.fc28.x86_64 #1 SMP Fri
                              May 25 21:13:28 UTC 2018 x86_64 x86_64
Alert Count                   36
First Seen                    2018-05-31 20:21:54 EEST
Last Seen                     2018-05-31 20:22:23 EEST
Local ID                      b056e67d-d04b-4f09-bcde-f216e67506e4

Raw Audit Messages
type=AVC msg=audit(1527787343.814:3824): avc:  denied  { map } for  pid=11315 comm="php-fpm" path="/var/lib/phpMyAdmin/temp/twig/80/809dbf34efabcf21fa6d57b8d6f95b7ad7ac7d190851f4ef36fa9f94bac71c36.php" dev="md126" ino=40632703 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: php-fpm,httpd_t,var_lib_t,file,map

Version-Release number of selected component:
selinux-policy-3.14.1-30.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.12-300.fc28.x86_64
type:           libreport

Comment 1 Fedora Update System 2018-06-06 13:36:02 UTC
selinux-policy-3.14.1-32.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-743a9247de

Comment 2 George Petasis 2018-06-06 15:21:51 UTC
I think that the latest updates fixed this issue.

Comment 3 Fedora Update System 2018-06-07 13:16:38 UTC
selinux-policy-3.14.1-32.fc28 has been pushed to the Fedora 28 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-2018-743a9247de

Comment 4 Fedora Update System 2018-06-09 20:41:43 UTC
selinux-policy-3.14.1-32.fc28 has been pushed to the Fedora 28 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.