Bug 970218 - SELinux is preventing /usr/lib64/vte-2.90/gnome-pty-helper from read, write access on the chr_file ptmx.
Summary: SELinux is preventing /usr/lib64/vte-2.90/gnome-pty-helper from read, write a...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3a5861188dfecce229673a2f119...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-03 17:51 UTC by Graeme Frear
Modified: 2013-07-04 09:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-04 09:23:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Graeme Frear 2013-06-03 17:51:55 UTC
Description of problem:
trying to open a new terminal from right scale
SELinux is preventing /usr/lib64/vte-2.90/gnome-pty-helper from read, write access on the chr_file ptmx.

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

If you believe that gnome-pty-helper should be allowed read write access on the ptmx chr_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 gnome-pty-helpe /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                system_u:object_r:ptmx_t:s0
Target Objects                ptmx [ chr_file ]
Source                        gnome-pty-helpe
Source Path                   /usr/lib64/vte-2.90/gnome-pty-helper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-terminal-3.4.1.1-1.fc17.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                     (removed)
Platform                      Linux (removed) 3.8.13-100.fc17.x86_64 #1 SMP Mon
                              May 13 13:36:17 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-06-03 12:48:28 CDT
Last Seen                     2013-06-03 12:48:28 CDT
Local ID                      6a0283ad-4527-496c-802a-1e04d9e27932

Raw Audit Messages
type=AVC msg=audit(1370281708.793:71): avc:  denied  { read write } for  pid=2429 comm="gnome-terminal" name="ptmx" dev="devtmpfs" ino=1139 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1370281708.793:71): arch=x86_64 syscall=open success=no exit=EACCES a0=7fd5a171ac7e a1=2 a2=0 a3=7fff580baff0 items=0 ppid=2365 pid=2429 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=gnome-terminal exe=/usr/bin/gnome-terminal subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: gnome-pty-helpe,mozilla_plugin_t,ptmx_t,chr_file,read,write

audit2allow

#============= mozilla_plugin_t ==============
#!!!! This avc is allowed in the current policy

allow mozilla_plugin_t ptmx_t:chr_file { read write };

audit2allow -R

#============= mozilla_plugin_t ==============
#!!!! This avc is allowed in the current policy

allow mozilla_plugin_t ptmx_t:chr_file { read write };


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.13-100.fc17.x86_64
type:           libreport

Comment 1 Graeme Frear 2013-06-03 18:39:28 UTC
Prior to this i had entered: # chcon -R -t mozilla_home_t /home/gfrear/.rightscale as a possible fix for #967378

Comment 2 Miroslav Grepl 2013-06-04 14:47:45 UTC
what does 

# id -Z 

in your terminal?

Comment 3 Graeme Frear 2013-06-04 14:51:12 UTC
[root@stardrive: ~] #id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Comment 4 Daniel Walsh 2013-06-07 20:41:45 UTC
Are you running gnome-terminal inside of firefox?

Comment 5 Graeme Frear 2013-06-08 16:00:02 UTC
https://my.rightscale.com/acct/ . . . /managed_ssh invokes a new terminal, which unfortunately comes up with this error:

There was an error creating the child process for this terminal
getpt failed: No such file or directory

I see there's an update on #967378, I'll do that and get back to you later.

Comment 6 Graeme Frear 2013-06-12 13:38:22 UTC
No, no access yet. I did receive another Selinux warning which advised the following: grep gnome-pty-helpe /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp

Full of hope I returned to rightscale launched a console and lo and behold a new error.
ptsname_r failed: Inappropriate ioctl for device

Comment 7 Miroslav Grepl 2013-06-14 06:23:41 UTC
So you see this error with the local policy. It does not look like as SELinux issue. 

Does it work with

# semanage permissive -a mozilla_plugin_t

Comment 8 Graeme Frear 2013-06-15 02:48:12 UTC
Thank you!  :)
 02:46:58 up 10 days, 21:10,  1 user,  load average: 0.13, 0.07, 0.07

Comment 9 Daniel Walsh 2013-06-15 11:55:54 UTC
I think you would be better off disabling this feature, since we will probably not allow running a terminal as a firefox plugin out of the box.



I am trying to setup an account at that site to see what it is doing.

Comment 10 Fedora End Of Life 2013-07-04 00:58:06 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


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