Bug 619983

Summary: SELinux is preventing ps "getattr" access on /dev/tty4.
Product: [Fedora] Fedora Reporter: Christopher Antila <christopher>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:9f67b64323042b77a0c6e17f0782ff39e5142fd23c32c6b4d4ee56abcfc0ba50
Fixed In Version: selinux-policy-3.6.32-120.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-20 01:44:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christopher Antila 2010-07-31 06:32:57 UTC
Summary:

SELinux is preventing ps "getattr" access on /dev/tty4.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by ps. It is not expected that this access is
required by ps and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:unconfined_r:nsplugin_t:s0
Target Context                system_u:object_r:tty_device_t:s0
Target Objects                /dev/tty4 [ chr_file ]
Source                        ps
Source Path                   ps
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-118.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.16-141.fc12.x86_64 #1 SMP Wed Jul 7
                              04:49:59 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 31 Jul 2010 01:13:46 AM EDT
Last Seen                     Sat 31 Jul 2010 01:13:46 AM EDT
Local ID                      c4e64a82-1b90-41ca-9a36-a0dfbcacef67
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1280553226.359:36): avc:  denied  { getattr } for  pid=2174 comm="ps" path="/dev/tty4" dev=devtmpfs ino=4980 scontext=unconfined_u:unconfined_r:nsplugin_t:s0 tcontext=system_u:object_r:tty_device_t:s0 tclass=chr_file



Hash String generated from  catchall,ps,nsplugin_t,tty_device_t,chr_file,getattr
audit2allow suggests:

#============= nsplugin_t ==============
allow nsplugin_t tty_device_t:chr_file getattr;

Comment 1 Miroslav Grepl 2010-08-02 16:58:22 UTC
I will add

term_getattr_unallocated_ttys(nsplugin_t)

Comment 2 Daniel Walsh 2010-08-03 17:44:50 UTC
interface(`term_dontaudit_getattr_all_ttys',`
	gen_require(`
		attribute ttynode;
		type tty_device_t;
	')

	dev_list_all_dev_nodes($1)
	dontaudit $1 ttynode:chr_file getattr;
	dontaudit $1 tty_device_t:chr_file getattr;
')

I think fixing the interface would be better.

Comment 3 Miroslav Grepl 2010-08-05 11:35:52 UTC
Fixed in selinux-policy-3.6.32-120.fc12

Comment 4 Fedora Update System 2010-08-05 13:18:32 UTC
selinux-policy-3.6.32-120.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12

Comment 5 Fedora Update System 2010-08-05 23:22:39 UTC
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12

Comment 6 Fedora Update System 2010-08-20 01:38:54 UTC
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.