Bug 1586031 - SELinux is preventing java from map access on the file /tmp/hsperfdata_pkiuser/25250
Summary: SELinux is preventing java from map access on the file /tmp/hsperfdata_pkiuse...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-05 10:58 UTC by Lukas Slebodnik
Modified: 2018-10-30 10:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:05:00 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:05:28 UTC

Description Lukas Slebodnik 2018-06-05 10:58:52 UTC
SELinux is preventing java from map access on the file /tmp/hsperfdata_pkiuser/25250.

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

If you believe that java should be allowed map access on the 25250 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 -i my-java.pp


Additional Information:
Source Context                system_u:system_r:tomcat_t:s0
Target Context                system_u:object_r:tomcat_tmp_t:s0
Target Objects                /tmp/hsperfdata_pkiuser/25250 [ file ]
Source                        java
Source Path                   java
Port                          <Unknown>
Host                          c106.testrelm.test
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-201.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     c106.testrelm.test
Platform                      Linux c106.testrelm.test 3.10.0-894.el7.x86_64 #1
                              SMP Mon May 28 17:01:44 EDT 2018 x86_64 x86_64
Alert Count                   13
First Seen                    2018-06-05 06:16:04 EDT
Last Seen                     2018-06-05 06:21:09 EDT
Local ID                      cb5ca6f5-a3fe-4acb-9873-8979280ef257

Raw Audit Messages
type=AVC msg=audit(1528194069.370:452): avc:  denied  { map } for  pid=25250 comm="java" path="/tmp/hsperfdata_pkiuser/25250" dev="dm-0" ino=1088638 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:tomcat_tmp_t:s0 tclass=file permissive=0


Hash: java,tomcat_t,tomcat_tmp_t,file,map

Comment 2 Milos Malik 2018-06-05 20:02:13 UTC
Following SELinux denials appeared in enforcing mode:
----
type=PROCTITLE msg=audit(06/05/2018 21:59:09.054:192) : proctitle=/usr/lib/jvm/jre/bin/java -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/c 
type=MMAP msg=audit(06/05/2018 21:59:09.054:192) : fd=5 flags=MAP_SHARED 
type=SYSCALL msg=audit(06/05/2018 21:59:09.054:192) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x8000 a2=PROT_READ|PROT_WRITE a3=MAP_SHARED items=0 ppid=1 pid=24279 auid=unset uid=tomcat gid=tomcat euid=tomcat suid=tomcat fsuid=tomcat egid=tomcat sgid=tomcat fsgid=tomcat tty=(none) ses=unset comm=java exe=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/bin/java subj=system_u:system_r:tomcat_t:s0 key=(null) 
type=AVC msg=audit(06/05/2018 21:59:09.054:192) : avc:  denied  { map } for  pid=24279 comm=java path=/tmp/hsperfdata_tomcat/24279 dev="vda3" ino=25737536 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:tomcat_tmp_t:s0 tclass=file permissive=0 
----
type=PROCTITLE msg=audit(06/05/2018 21:59:14.064:194) : proctitle=jsvc.exec -nodetach -pidfile /var/run/jsvc-tomcat.pid -user tomcat -outfile /usr/share/tomcat/logs/catalina.out -errfile /usr/sh 
type=MMAP msg=audit(06/05/2018 21:59:14.064:194) : fd=7 flags=MAP_SHARED 
type=SYSCALL msg=audit(06/05/2018 21:59:14.064:194) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x8000 a2=PROT_READ|PROT_WRITE a3=MAP_SHARED items=0 ppid=25041 pid=25086 auid=unset uid=tomcat gid=tomcat euid=tomcat suid=tomcat fsuid=tomcat egid=tomcat sgid=tomcat fsgid=tomcat tty=(none) ses=unset comm=jsvc exe=/usr/bin/jsvc subj=system_u:system_r:tomcat_t:s0 key=(null) 
type=AVC msg=audit(06/05/2018 21:59:14.064:194) : avc:  denied  { map } for  pid=25086 comm=jsvc path=/tmp/hsperfdata_tomcat/25086 dev="vda3" ino=25737536 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:tomcat_tmp_t:s0 tclass=file permissive=0 
----

Comment 6 errata-xmlrpc 2018-10-30 10:05:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3111


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