Bug 970218 - SELinux is preventing /usr/lib64/vte-2.90/gnome-pty-helper from read, write access on the chr_file ptmx.
SELinux is preventing /usr/lib64/vte-2.90/gnome-pty-helper from read, write a...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-03 13:51 EDT by Graeme Frear
Modified: 2013-07-04 05:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-04 05:23:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Graeme Frear 2013-06-03 13:51:55 EDT
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.
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
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-
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


#============= 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 14:39:28 EDT
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 10:47:45 EDT
what does 

# id -Z 

in your terminal?
Comment 3 Graeme Frear 2013-06-04 10:51:12 EDT
[root@stardrive: ~] #id -Z
Comment 4 Daniel Walsh 2013-06-07 16:41:45 EDT
Are you running gnome-terminal inside of firefox?
Comment 5 Graeme Frear 2013-06-08 12:00:02 EDT
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 09:38:22 EDT
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 02:23:41 EDT
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-14 22:48:12 EDT
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 07:55:54 EDT
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-03 20:58:06 EDT
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.