Bug 2141233 - SELinux is preventing qgis_mapserv.fc from 'setattr' accesses on the Verzeichnis /usr/lib/fontconfig/cache.
Summary: SELinux is preventing qgis_mapserv.fc from 'setattr' accesses on the Verzeich...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 37
Hardware: x86_64
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5938f22c0a6a9c9ebd415e67175...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-09 08:36 UTC by Jonathan Haas
Modified: 2023-06-27 19:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-27 19:03:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jonathan Haas 2022-11-09 08:36:29 UTC
Description of problem:
Launched QGIS server to serve a WMF layer
SELinux is preventing qgis_mapserv.fc from 'setattr' accesses on the Verzeichnis /usr/lib/fontconfig/cache.

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

Wenn Sie denken, dass es qgis_mapserv.fc standardmäßig erlaubt sein sollte, setattr Zugriff auf cache directory zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# ausearch -c 'qgis_mapserv.fc' --raw | audit2allow -M my-qgismapservfc
# semodule -X 300 -i my-qgismapservfc.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:fonts_cache_t:s0
Target Objects                /usr/lib/fontconfig/cache [ dir ]
Source                        qgis_mapserv.fc
Source Path                   qgis_mapserv.fc
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           fontconfig-2.14.0-3.fc37.x86_64
                              fontconfig-2.14.0-3.fc37.i686
SELinux Policy RPM            selinux-policy-targeted-37.12-2.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.12-2.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.19.16-301.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Oct 21 15:55:37 UTC 2022
                              x86_64 x86_64
Alert Count                   18
First Seen                    2022-11-09 09:35:12 CET
Last Seen                     2022-11-09 09:35:12 CET
Local ID                      cef87f60-23a2-4025-9919-d77944d87d87

Raw Audit Messages
type=AVC msg=audit(1667982912.727:469): avc:  denied  { setattr } for  pid=14490 comm="qgis_mapserv.fc" name="cache" dev="dm-0" ino=940642 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:fonts_cache_t:s0 tclass=dir permissive=0


Hash: qgis_mapserv.fc,httpd_t,fonts_cache_t,dir,setattr

Version-Release number of selected component:
selinux-policy-targeted-37.12-2.fc37.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         5.19.16-301.fc37.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2022-11-16 15:45:07 UTC
I am afraid this is not a permission we want to add to selinux policy, this is a room for a local policy.

It can be a new policy with assigning new types for the GIS files and let httpd transition, or allow the access with default types according to the audited denials.

Comment 2 Zdenek Pytela 2023-06-27 19:03:26 UTC
As no new information appeared during the past weeks, we are going to close this bug. If you need to pursue this matter further, feel free to reopen this bug and attach the needed information.


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