Bug 858328 - SELinux is preventing /usr/bin/remote-viewer from 'create' accesses on the file installer1.png.
SELinux is preventing /usr/bin/remote-viewer from 'create' accesses on the fi...
Status: CLOSED CANTFIX
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:26c51f7b1c8103735d153776bdf...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-18 12:43 EDT by Jason Brooks
Modified: 2012-09-28 05:50 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-27 06:44:36 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)
File: type (9 bytes, text/plain)
2012-09-18 12:43 EDT, Jason Brooks
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-09-18 12:43 EDT, Jason Brooks
no flags Details

  None (edit)
Description Jason Brooks 2012-09-18 12:43:54 EDT
Additional info:
libreport version: 2.0.13
kernel:         3.4.6-2.fc17.x86_64

description:
:SELinux is preventing /usr/bin/remote-viewer from 'create' accesses on the file installer1.png.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that remote-viewer should be allowed create access on the installer1.png 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 remote-viewer /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
:                              0.c1023
:Target Context                unconfined_u:object_r:user_home_t:s0
:Target Objects                installer1.png [ file ]
:Source                        remote-viewer
:Source Path                   /usr/bin/remote-viewer
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           virt-viewer-0.5.3-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-146.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.6-2.fc17.x86_64 #1 SMP Thu Jul
:                              19 22:54:16 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-09-18 09:42:35 PDT
:Last Seen                     2012-09-18 09:42:35 PDT
:Local ID                      5ba7dc7b-0409-49bf-a542-74e0777b63cc
:
:Raw Audit Messages
:type=AVC msg=audit(1347986555.750:9048): avc:  denied  { create } for  pid=27563 comm="remote-viewer" name="installer1.png" scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1347986555.750:9048): arch=x86_64 syscall=open success=no exit=EACCES a0=51dc810 a1=241 a2=1b6 a3=238 items=0 ppid=27559 pid=27563 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=remote-viewer exe=/usr/bin/remote-viewer subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)
:
:Hash: remote-viewer,mozilla_plugin_t,user_home_t,file,create
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Jason Brooks 2012-09-18 12:43:56 EDT
Created attachment 614056 [details]
File: type
Comment 2 Jason Brooks 2012-09-18 12:43:58 EDT
Created attachment 614057 [details]
File: hashmarkername
Comment 3 Daniel Walsh 2012-09-19 21:26:40 EDT
Do you know where it is trying to create

installer1.png

What does remote-viewer do?

To get this to work you might want to turn off your plugin lockdown with SELinux

setsebool -P 
unconfined_mozilla_plugin_transition 1
Comment 4 Daniel Walsh 2012-09-19 21:28:28 EDT
Opps that should have been


setsebool -P 
unconfined_mozilla_plugin_transition 0
Comment 5 Jason Brooks 2012-09-20 11:25:39 EDT
(In reply to comment #3)
> Do you know where it is trying to create
> 
> installer1.png
> 
> What does remote-viewer do?

I'm using remote-viewer to access a VM desktop (hosted on a separate machine under ovirt) via spice. remote-viewer has a "take screenshot" option, and that's what I'm using. I'm forgetting now exactly where I was saving the file, probably in my ~/Pictures, definitely somewhere in my home dir.

> 
> To get this to work you might want to turn off your plugin lockdown with
> SELinux
> 
> setsebool -P 
> unconfined_mozilla_plugin_transition 1

Thanks
Comment 6 Miroslav Grepl 2012-09-20 13:23:16 EDT
Dan, 
it looks like we get lot of apps which run as mozilla_plugin_t and these apps will need to run without mozilla_plugin confinement. 

We could just add them to on the list which is a part of a new setroubleshoot plugin?
Comment 7 Jason Brooks 2012-09-20 13:32:15 EDT
(In reply to comment #6)
> Dan, 
> it looks like we get lot of apps which run as mozilla_plugin_t and these
> apps will need to run without mozilla_plugin confinement. 
> 
> We could just add them to on the list which is a part of a new
> setroubleshoot plugin?

With oVirt, remote-viewer is launched from a firefox plugin, spice-xpi.
Comment 8 Daniel Walsh 2012-09-26 17:03:27 EDT
That is fine, but what directory is spice trying to write to?

locate installer1.png

If we could label the directory this content gets created in, somewhere other then ~/ then we could allow the access and continue to run with confinement.
Comment 9 Jason Brooks 2012-09-26 17:59:06 EDT
(In reply to comment #8)
> That is fine, but what directory is spice trying to write to?
> 
> locate installer1.png

It didn't write anywhere, it wasn't allowed.

When you go to File --> Screenshot in remote viewer, the app puts you in the default gnome file dialog, in recently used folders. By default, it invites you to choose some arbitrary place in your home dir.

> 
> If we could label the directory this content gets created in, somewhere
> other then ~/ then we could allow the access and continue to run with
> confinement.

~/Pictures would be a sane default. I imagine that'd have to be implemented in remote viewer.
Comment 10 Miroslav Grepl 2012-09-27 06:44:36 EDT
setsebool -P unconfined_mozilla_plugin_transition 0

needs to be executed in this case.
Comment 11 Daniel Walsh 2012-09-28 05:50:44 EDT
So spice-xpi needs to be added to the mozplugin.

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