Bug 1659559

Summary: SELinux is preventing certwatch from 'write' accesses on the directory /sys/kernel/debug.
Product: [Fedora] Fedora Reporter: John Griffiths <fedora.jrg01>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a7833d622bd44bc650f108f1dc0b772473eb043c96d2e4b0a9f6e16577725615;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-08 13:34:32 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 Griffiths 2018-12-14 16:43:47 UTC
Description of problem:
SELinux is preventing certwatch from 'write' accesses on the directory /sys/kernel/debug.

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

If you believe that certwatch should be allowed write access on the debug directory 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 'certwatch' --raw | audit2allow -M my-certwatch
# semodule -X 300 -i my-certwatch.pp

Additional Information:
Source Context                system_u:system_r:certwatch_t:s0-s0:c0.c1023
Target Context                system_u:object_r:debugfs_t:s0
Target Objects                /sys/kernel/debug [ dir ]
Source                        certwatch
Source Path                   certwatch
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-48.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.19.6-200.fc28.x86_64 #1 SMP Sun
                              Dec 2 18:03:32 UTC 2018 x86_64 x86_64
Alert Count                   36
First Seen                    2018-12-12 03:11:06 EST
Last Seen                     2018-12-14 03:30:13 EST
Local ID                      73cf0c00-ee0c-4cae-baa7-4d10fc82ab32

Raw Audit Messages
type=AVC msg=audit(1544776213.932:69097): avc:  denied  { write } for  pid=15458 comm="certwatch" name="/" dev="debugfs" ino=1 scontext=system_u:system_r:certwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:debugfs_t:s0 tclass=dir permissive=0


Hash: certwatch,certwatch_t,debugfs_t,dir,write

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

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

Potential duplicate: bug 1655357

Comment 1 Lukas Vrabec 2019-01-08 13:34:32 UTC

*** This bug has been marked as a duplicate of bug 1659558 ***