Bug 693282 - SELinux is preventing /opt/google/chrome/chrome-sandbox from read, append access on the file /home/kho/.xsession-errors.
Summary: SELinux is preventing /opt/google/chrome/chrome-sandbox from read, append acc...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:59ceb8d0e07...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-04 07:11 UTC by Kenneth Holmqvist
Modified: 2011-04-04 09:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-04 09:12:53 UTC
Type: ---


Attachments (Terms of Use)

Description Kenneth Holmqvist 2011-04-04 07:11:43 UTC
SELinux is preventing /opt/google/chrome/chrome-sandbox from read, append access on the file /home/kho/.xsession-errors.

*****  Plugin restorecon (81.8 confidence) suggests  *************************

If you want to fix the label. 
/home/kho/.xsession-errors default label should be xdm_home_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/kho/.xsession-errors

*****  Plugin file (7.00 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin file (7.00 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin catchall_labels (4.56 confidence) suggests  ********************

If you want to allow chrome-sandbox to have read append access on the .xsession-errors file
Then you need to change the label on /home/kho/.xsession-errors
Do
# semanage fcontext -a -t FILE_TYPE '/home/kho/.xsession-errors'
where FILE_TYPE is one of the following: user_tmpfs_t, chrome_sandbox_tmpfs_t, user_fonts_cache_t, chrome_sandbox_tmp_t, user_cron_spool_t, gnome_home_type, chrome_sandbox_t, cgroup_t. 
Then execute: 
restorecon -v '/home/kho/.xsession-errors'


*****  Plugin leaks (1.31 confidence) suggests  ******************************

If you want to ignore chrome-sandbox trying to read append access the .xsession-errors file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /opt/google/chrome/chrome-sandbox /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (1.31 confidence) suggests  ***************************

If you believe that chrome-sandbox should be allowed read append access on the .xsession-errors 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:
# grep chrome-sandbox /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c
                              0.c1023
Target Context                system_u:object_r:file_t:s0
Target Objects                /home/kho/.xsession-errors [ file ]
Source                        chrome-sandbox
Source Path                   /opt/google/chrome/chrome-sandbox
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           google-chrome-stable-10.0.648.204-79063
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-10.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.2-9.fc15.x86_64 #1 SMP
                              Wed Mar 30 16:55:57 UTC 2011 x86_64 x86_64
Alert Count                   3
First Seen                    Mon 04 Apr 2011 08:43:05 AM CEST
Last Seen                     Mon 04 Apr 2011 09:04:34 AM CEST
Local ID                      de400f7a-231f-4b27-a601-78f36b55eab0

Raw Audit Messages
type=AVC msg=audit(1301900674.159:88): avc:  denied  { read append } for  pid=1998 comm="chrome-sandbox" path="/home/kho/.xsession-errors" dev=sda2 ino=23855114 scontext=unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file


type=SYSCALL msg=audit(1301900674.159:88): arch=x86_64 syscall=execve success=yes exit=0 a0=52f1f18 a1=53402c0 a2=5341000 a3=7fffaab33a90 items=0 ppid=1993 pid=1998 auid=500 uid=500 gid=500 euid=0 suid=0 fsuid=0 egid=500 sgid=500 fsgid=500 tty=(none) ses=2 comm=chrome-sandbox exe=/opt/google/chrome/chrome-sandbox subj=unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023 key=(null)

Hash: chrome-sandbox,chrome_sandbox_t,file_t,file,read,append

audit2allow

#============= chrome_sandbox_t ==============
allow chrome_sandbox_t file_t:file { read append };

audit2allow -R

#============= chrome_sandbox_t ==============
allow chrome_sandbox_t file_t:file { read append };

Comment 1 Miroslav Grepl 2011-04-04 09:12:53 UTC
# restorecon -R -v /home

will fix your problem. This could happen if you mounted a device from a previous machine that did not support SELinux.


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