Bug 967120 - SELinux is preventing /opt/google/chrome/chrome from 'getattr' accesses on the file /home/scottt/libpeerconnection.log.
Summary: SELinux is preventing /opt/google/chrome/chrome from 'getattr' accesses on th...
Keywords:
Status: CLOSED DUPLICATE of bug 960792
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8a0379333a3d6b587a21fa03b15...
: 977170 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-24 19:33 UTC by Scott Tsai
Modified: 2013-06-24 09:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-04 20:26:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Scott Tsai 2013-05-24 19:33:33 UTC
Description of problem:
Start google-chrome-beta-28.0.1500.20-201172.x86_64
SELinux is preventing /opt/google/chrome/chrome from 'getattr' accesses on the file /home/scottt/libpeerconnection.log.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/home/scottt/libpeerconnection.log default label should be user_home_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/scottt/libpeerconnection.log

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that chrome should be allowed getattr access on the libpeerconnection.log 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 /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                unconfined_u:object_r:user_home_dir_t:s0
Target Objects                /home/scottt/libpeerconnection.log [ file ]
Source                        chrome
Source Path                   /opt/google/chrome/chrome
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           google-chrome-beta-28.0.1500.20-201172.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-96.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-200.fc18.x86_64 #1 SMP Mon
                              May 13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-05-25 03:28:27 CST
Last Seen                     2013-05-25 03:28:27 CST
Local ID                      ad308f48-2419-43d6-9b37-a3410597a9f3

Raw Audit Messages
type=AVC msg=audit(1369423707.610:111): avc:  denied  { getattr } for  pid=2731 comm="chrome" path="/home/scottt/libpeerconnection.log" dev="sda3" ino=7421885 scontext=unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=file


type=SYSCALL msg=audit(1369423707.610:111): arch=x86_64 syscall=fstat success=yes exit=0 a0=d a1=7fff1dba0410 a2=7fff1dba0410 a3=0 items=0 ppid=0 pid=2731 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 ses=2 tty=(none) comm=chrome exe=/opt/google/chrome/chrome subj=unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023 key=(null)

Hash: chrome,chrome_sandbox_t,user_home_dir_t,file,getattr

audit2allow

#============= chrome_sandbox_t ==============
allow chrome_sandbox_t user_home_dir_t:file getattr;

audit2allow -R
require {
	type chrome_sandbox_t;
	type user_home_dir_t;
	class file getattr;
}

#============= chrome_sandbox_t ==============
allow chrome_sandbox_t user_home_dir_t:file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Comment 1 Scott Tsai 2013-05-24 20:08:46 UTC
Description of problem:
Start google-chrome-beta-28.0.1500.20-201172.x86_64

Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Comment 2 GoinEasy9 2013-05-24 23:25:51 UTC
I'm running F17 with updates-testing enabled.  Here's my similar error:

SELinux is preventing /opt/google/chrome/chrome from create access on the file libpeerconnection.log.

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

If you believe that chrome should be allowed create access on the libpeerconnection.log 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 /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                unconfined_u:object_r:user_home_dir_t:s0
Target Objects                libpeerconnection.log [ file ]
Source                        chrome
Source Path                   /opt/google/chrome/chrome
Port                          <Unknown>
Host                          fedora17kde64
Source RPM Packages           google-chrome-beta-28.0.1500.20-201172.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-169.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     fedora17kde64
Platform                      Linux fedora17kde64 3.8.13-100.fc17.x86_64 #1 SMP
                              Mon May 13 13:36:17 UTC 2013 x86_64 x86_64
Alert Count                   5
First Seen                    2013-05-24 00:16:53 EDT
Last Seen                     2013-05-24 19:17:08 EDT
Local ID                      8e92602a-ea3e-4a51-84d6-d24c3e908203

Raw Audit Messages
type=AVC msg=audit(1369437428.131:142): avc:  denied  { create } for  pid=15463 comm="chrome" name="libpeerconnection.log" scontext=unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=file


type=SYSCALL msg=audit(1369437428.131:142): arch=x86_64 syscall=open success=no exit=EACCES a0=7fc43afa5948 a1=441 a2=1b6 a3=0 items=0 ppid=0 pid=15463 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) comm=chrome exe=/opt/google/chrome/chrome subj=unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023 key=(null)

Hash: chrome,chrome_sandbox_t,user_home_dir_t,file,create

audit2allow

#============= chrome_sandbox_t ==============
allow chrome_sandbox_t user_home_dir_t:file create;

audit2allow -R

#============= chrome_sandbox_t ==============
allow chrome_sandbox_t user_home_dir_t:file create;

Comment 3 Miroslav Grepl 2013-05-28 06:55:16 UTC
What is /home/scottt/libpeerconnection.log?

Execute

# restorecon -R -v /home/scottt/libpeerconnection.log

Comment 4 Scott Tsai 2013-05-29 00:34:21 UTC
(In reply to Miroslav Grepl from comment #3)
> What is /home/scottt/libpeerconnection.log?

"libpeerconnection" is part of Google Chrome's implementation of WebRTC, e.g. http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob;f=chrome/chrome_browser.gypi;h=711e4fbb55c4fdc03c7c19995d30a909dd522107;hb=fea174faa9f61b1a59f4136421e83d7f63b9331f#l2953

Basically UDP with some basic NATT abilities in the browser exposed to Javascript. Used for video calls etc.

The fact that google-chrome-beta-28.0.1500.20-201172.x86_64 wants to write a log file in $HOME is probably just sloppy coding.

> Execute
> # restorecon -R -v /home/scottt/libpeerconnection.log


$ ls -Z ~/libpeerconnection.log 
-rw-rw-r--. scottt scottt unconfined_u:object_r:user_home_dir_t:s0 /home/scottt/libpeerconnection.log
$ restorecon -R -v ~/libpeerconnection.log 
restorecon reset /home/scottt/libpeerconnection.log context unconfined_u:object_r:user_home_dir_t:s0->unconfined_u:object_r:user_home_t:s0

Comment 5 GoinEasy9 2013-05-31 17:30:19 UTC
On my 2 F17 installs, SELinux prevented libpeerconnection.log from being created.  I created an empty libpeerconnection.log in my home directory, then, executed restorecon -R -v /home/GoinEasy9/libpeerconnection.log and the AVC errors disappeared.

Comment 6 Daniel Walsh 2013-06-04 20:26:29 UTC

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

Comment 7 Miroslav Grepl 2013-06-24 09:35:57 UTC
*** Bug 977170 has been marked as a duplicate of this bug. ***


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