Bug 834913 - SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64/jre/bin/java from 'getattr' accesses on the directory /tmp/hsperfdata_root.
SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64/jre/bin/...
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:4fef9bc77d6d110bb7bafaef8fc...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-24 16:48 EDT by mei_tr8630
Modified: 2012-10-17 04:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-17 04:51:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mei_tr8630 2012-06-24 16:48:47 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.2-1.fc16.x86_64
time:           Sun 24 Jun 2012 11:46:55 PM EEST

description:
:SELinux is preventing /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64/jre/bin/java from 'getattr' accesses on the directory /tmp/hsperfdata_root.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that java should be allowed getattr access on the hsperfdata_root 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:
:# grep java /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:httpd_t:s0
:Target Context                system_u:object_r:initrc_tmp_t:s0
:Target Objects                /tmp/hsperfdata_root [ dir ]
:Source                        java
:Source Path                   /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64/jre
:                              /bin/java
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           java-1.7.0-openjdk-1.7.0.3-2.1.fc17.6.x86_64
:                              java-1.7.0-openjdk-1.7.0.3-2.2.1.fc17.8.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-121.fc17.noarch selinux-
:                              policy-3.10.0-132.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.2-1.fc16.x86_64 #1 SMP Thu Jun
:                              14 20:17:26 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    Sun 24 Jun 2012 11:15:05 PM EEST
:Last Seen                     Sun 24 Jun 2012 11:44:07 PM EEST
:Local ID                      612e8dfd-b482-4e65-8b4e-085fee1f5153
:
:Raw Audit Messages
:type=AVC msg=audit(1340570647.99:31): avc:  denied  { getattr } for  pid=1101 comm="java" path="/tmp/hsperfdata_root" dev="dm-1" ino=524530 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1340570647.99:31): arch=x86_64 syscall=lstat success=no exit=EACCES a0=7f322c006ce0 a1=7f3231eb4b30 a2=7f3231eb4b30 a3=0 items=0 ppid=1 pid=1101 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=java exe=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64/jre/bin/java subj=system_u:system_r:httpd_t:s0 key=(null)
:
:Hash: java,httpd_t,initrc_tmp_t,dir,getattr
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-06-25 02:45:43 EDT
What apps do you use?

tomcat?
Comment 2 Daniel Walsh 2012-06-25 16:48:42 EDT
This looks like the init script creates /tmp/hsperfdata_root at boot and then apache uses the directory?  Seems like this might be a bad idea.  Would probably be better if this was done in /run/httpd/

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