I happened to take a look at the audit logs for my two public Fedora mirrors today and found hundreds of thousands of of the following denials: type=AVC msg=audit(1524757500.315:63341066): avc: denied { map } for pid=29361 comm="httpd" path="/srv/mirror/pub/fedora-buffet/epel/7/x86_64/Packages/o/openmx-data-3.8.1-9.el7.noarch.rpm" dev="bcache0" ino=32664828575 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:public_content_t:s0 tclass=file permissive=0 I can't tell when this started because the audit log fills completely in a few hours as it happens for every URL accessed. I figure someone would have reported it by now if it was a common occurrence but my bugzilla searching failed to turn anything up. All I see in the policy with sesearch -A -s httpd_t -t public_content_t is: allow httpd_t file_type:dir { getattr open search }; allow httpd_t file_type:filesystem getattr; allow httpd_t public_content_t:dir { getattr ioctl lock open read search }; allow httpd_t public_content_t:file { getattr ioctl lock open read }; allow httpd_t public_content_t:lnk_file { getattr read }; so maybe this is another instance where the map privilege needs to be added? I see that, assuming I can use sesearch correctly, map is allowed for httpd_sys_content_t and user_home_t (with the appropriate boolean set). I'm not sure why public_content_t would be different. I am currently running selinux-policy-3.13.1-283.32.fc27.noarch from updates-testing.
I should add that doing the following quiets things down, in case someone else runs into this: echo "(allow httpd_t public_content_t (file (map)))" > /tmp/httpd-quiet.cil semodule -i /tmp/httpd-quiet.cil
I'm not entirely sure if a more limited map interface for public_content_t is needed or if adding this to the existing miscfiles_read_public_files interface is reasonable. diff --git i/policy/modules/system/miscfiles.if w/policy/modules/system/miscfiles.if index 73fc71dbc..71638a80d 100644 --- i/policy/modules/system/miscfiles.if +++ w/policy/modules/system/miscfiles.if @@ -771,6 +771,7 @@ interface(`miscfiles_read_public_files',` ') allow $1 { public_content_t public_content_rw_t }:dir list_dir_perms; + allow $1 { public_content_t public_content_rw_t }:file map; read_files_pattern($1, { public_content_t public_content_rw_t }, { public_content_t public_content_rw_t }) read_lnk_files_pattern($1, { public_content_t public_content_rw_t }, { public_content_t public_content_rw_t }) ') This diff is against the rawhide branch of the https://github.com/fedora-selinux/selinux-policy repo. I filed it as https://github.com/fedora-selinux/selinux-policy/pull/213 in the hope that it helps speed up a fix.
I'm not sure if the changes in the 3.13.1-283.34 package were supposed to help with this, but I did test that package and found that the denials are still present.
selinux-policy-3.13.1-283.35.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2a57dc63c1
selinux-policy-3.13.1-283.35.fc27 has been pushed to the Fedora 27 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-2a57dc63c1
selinux-policy-3.13.1-283.35.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.