Bug 1772976

Summary: SELinux is preventing systemd-tmpfile from 'getattr' accesses on the file /var/tmp/sos.qbc3h4zl/sosreport-atlantis-2019-11-12-yojbsre/proc/sys/vm/compact_memory.
Product: [Fedora] Fedora Reporter: John W Smith <jazzer2007>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 31CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:42eba8e102cb2ac59ff139459da4b6b5c05f3a7857cefbad45db98877d3b679d;
Fixed In Version: selinux-policy-3.14.4-44.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-21 01:38:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John W Smith 2019-11-15 18:02:03 UTC
Description of problem:
SELinux is preventing systemd-tmpfile from 'getattr' accesses on the file /var/tmp/sos.qbc3h4zl/sosreport-atlantis-2019-11-12-yojbsre/proc/sys/vm/compact_memory.

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

If you believe that systemd-tmpfile should be allowed getattr access on the compact_memory 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 'systemd-tmpfile' --raw | audit2allow -M my-systemdtmpfile
# semodule -X 300 -i my-systemdtmpfile.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                system_u:object_r:sysctl_vm_t:s0
Target Objects                /var/tmp/sos.qbc3h4zl/sosreport-atlantis-2019-11-1
                              2-yojbsre/proc/sys/vm/compact_memory [ file ]
Source                        systemd-tmpfile
Source Path                   systemd-tmpfile
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.4-39.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.3.11-300.fc31.x86_64 #1 SMP Tue
                              Nov 12 19:08:07 UTC 2019 x86_64 x86_64
Alert Count                   5
First Seen                    2019-11-14 20:30:23 EST
Last Seen                     2019-11-15 11:39:02 EST
Local ID                      2ada11a4-9154-4eec-9a9a-06a94bd8b228

Raw Audit Messages
type=AVC msg=audit(1573835942.618:406): avc:  denied  { getattr } for  pid=14493 comm="systemd-tmpfile" path="/var/tmp/sos.qbc3h4zl/sosreport-atlantis-2019-11-12-yojbsre/proc/sys/vm/compact_memory" dev="dm-6" ino=111970404 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:sysctl_vm_t:s0 tclass=file permissive=1


Hash: systemd-tmpfile,systemd_tmpfiles_t,sysctl_vm_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.14.4-39.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.3.11-300.fc31.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2019-11-19 15:52:33 UTC
*** Bug 1774072 has been marked as a duplicate of this bug. ***

Comment 2 Zdenek Pytela 2019-11-20 17:40:31 UTC
A PR has been sent for a review:
https://github.com/fedora-selinux/selinux-policy/pull/295

Comment 3 Lukas Vrabec 2019-11-22 16:33:09 UTC
Fixes from Fedora: 
commit e3cabc4de1c28fb92398666900b0db3592b9b593 (HEAD -> rawhide, origin/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Wed Nov 20 11:42:31 2019 +0100

    Dontaudit systemd_tmpfiles_t getattr of all file types BZ(1772976)

Comment 4 Fedora Update System 2020-01-14 01:43:38 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 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-2020-397eea28b7

Comment 5 Fedora Update System 2020-01-21 01:38:49 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.