Bug 1608282

Summary: SELinux is preventing java from search access on the directory /sys/fs/cgroup
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.14.1-36.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-29 03:24:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Slebodnik 2018-07-25 09:12:19 UTC
SELinux is preventing java from search access on the directory /sys/fs/cgroup.

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

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


Additional Information:
Source Context                system_u:system_r:pki_tomcat_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup [ dir ]
Source                        java
Source Path                   java
Port                          <Unknown>
Host                          host.example.test
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     host.example.test
Platform                      Linux host.example.test 4.17.7-200.fc28.x86_64 #1
                              SMP Tue Jul 17 16:28:31 UTC 2018 x86_64 x86_64
Alert Count                   105
First Seen                    2018-07-25 04:31:29 EDT
Last Seen                     2018-07-25 04:36:04 EDT
Local ID                      2dd354a8-7df3-4c78-97ed-1d06d2c63347

Raw Audit Messages
type=AVC msg=audit(1532507764.656:559): avc:  denied  { search } for  pid=2161 comm="java" name="/" dev="tmpfs" ino=17420 scontext=system_u:system_r:pki_tomcat_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=0


Hash: java,pki_tomcat_t,cgroup_t,dir,search

Comment 1 Lukas Slebodnik 2018-07-25 09:23:14 UTC
And in permissive mode:

SELinux is preventing java from search access on the directory /sys/fs/cgroup.

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

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


Additional Information:
Source Context                system_u:system_r:pki_tomcat_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup [ dir ]
Source                        java
Source Path                   java
Port                          <Unknown>
Host                          host.example.test
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     host.example.test
Platform                      Linux host.example.test
                              4.17.7-200.fc28.x86_64 #1 SMP Tue Jul 17 16:28:31
                              UTC 2018 x86_64 x86_64
Alert Count                   7
First Seen                    2018-07-25 05:09:22 EDT
Last Seen                     2018-07-25 05:16:27 EDT
Local ID                      828c8190-2e7c-49b9-9a75-f973676c2b4a

Raw Audit Messages
type=AVC msg=audit(1532510187.134:476): avc:  denied  { search } for  pid=1911 comm="java" name="/" dev="tmpfs" ino=12480 scontext=system_u:system_r:pki_tomcat_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=1


Hash: java,pki_tomcat_t,cgroup_t,dir,search

Comment 2 Lukas Slebodnik 2018-07-25 09:23:26 UTC
SELinux is preventing java from read access on the file memory.limit_in_bytes.

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

If you believe that java should be allowed read access on the memory.limit_in_bytes 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 'java' --raw | audit2allow -M my-java
# semodule -X 300 -i my-java.pp


Additional Information:
Source Context                system_u:system_r:pki_tomcat_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                memory.limit_in_bytes [ file ]
Source                        java
Source Path                   java
Port                          <Unknown>
Host                          host.example.test
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     host.example.test
Platform                      Linux host.example.test
                              4.17.7-200.fc28.x86_64 #1 SMP Tue Jul 17 16:28:31
                              UTC 2018 x86_64 x86_64
Alert Count                   7
First Seen                    2018-07-25 05:09:22 EDT
Last Seen                     2018-07-25 05:16:27 EDT
Local ID                      18a375ae-b766-4585-b545-70bd6fef74ad

Raw Audit Messages
type=AVC msg=audit(1532510187.134:477): avc:  denied  { read } for  pid=1911 comm="java" name="memory.limit_in_bytes" dev="cgroup" ino=6602 scontext=system_u:system_r:pki_tomcat_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1


Hash: java,pki_tomcat_t,cgroup_t,file,read

Comment 3 Lukas Slebodnik 2018-07-25 09:24:02 UTC
SELinux is preventing java from open access on the file /sys/fs/cgroup/memory/system.slice/system-pki\x2dtomcatd.slice/pki-tomcatd/memory.limit_in_bytes.

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

If you believe that java should be allowed open access on the memory.limit_in_bytes 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 'java' --raw | audit2allow -M my-java
# semodule -X 300 -i my-java.pp


Additional Information:
Source Context                system_u:system_r:pki_tomcat_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup/memory/system.slice/system-
                              pki\x2dtomcatd.slice/pki-tomcatd@pki-
                              tomcat.service/memory.limit_in_bytes [ file ]
Source                        java
Source Path                   java
Port                          <Unknown>
Host                          host.example.test
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     host.example.test
Platform                      Linux host.example.test
                              4.17.7-200.fc28.x86_64 #1 SMP Tue Jul 17 16:28:31
                              UTC 2018 x86_64 x86_64
Alert Count                   7
First Seen                    2018-07-25 05:09:22 EDT
Last Seen                     2018-07-25 05:16:27 EDT
Local ID                      b520e29c-08f1-4098-bcc0-d11ef2276c87

Raw Audit Messages
type=AVC msg=audit(1532510187.134:478): avc:  denied  { open } for  pid=1911 comm="java" path="/sys/fs/cgroup/memory/system.slice/system-pki\x2dtomcatd.slice/pki-tomcatd/memory.limit_in_bytes" dev="cgroup" ino=6602 scontext=system_u:system_r:pki_tomcat_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1


Hash: java,pki_tomcat_t,cgroup_t,file,open

Comment 4 Lukas Slebodnik 2018-07-25 09:24:38 UTC
SELinux is preventing java from getattr access on the file /sys/fs/cgroup/memory/system.slice/system-pki\x2dtomcatd.slice/pki-tomcatd/memory.limit_in_bytes.

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

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


Additional Information:
Source Context                system_u:system_r:pki_tomcat_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup/memory/system.slice/system-
                              pki\x2dtomcatd.slice/pki-tomcatd@pki-
                              tomcat.service/memory.limit_in_bytes [ file ]
Source                        java
Source Path                   java
Port                          <Unknown>
Host                          host.example.test
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     host.example.test
Platform                      Linux host.example.test
                              4.17.7-200.fc28.x86_64 #1 SMP Tue Jul 17 16:28:31
                              UTC 2018 x86_64 x86_64
Alert Count                   7
First Seen                    2018-07-25 05:09:22 EDT
Last Seen                     2018-07-25 05:16:27 EDT
Local ID                      3d50981a-cfc5-4605-ab6b-862c2b5d6c7a

Raw Audit Messages
type=AVC msg=audit(1532510187.134:479): avc:  denied  { getattr } for  pid=1911 comm="java" path="/sys/fs/cgroup/memory/system.slice/system-pki\x2dtomcatd.slice/pki-tomcatd/memory.limit_in_bytes" dev="cgroup" ino=6602 scontext=system_u:system_r:pki_tomcat_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=1


Hash: java,pki_tomcat_t,cgroup_t,file,getattr

Comment 8 Fedora Update System 2018-07-25 22:31:02 UTC
selinux-policy-3.14.1-36.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1050fb248b

Comment 9 Fedora Update System 2018-07-26 16:32:56 UTC
selinux-policy-3.14.1-36.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-1050fb248b

Comment 10 Fedora Update System 2018-07-29 03:24:44 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.