Bug 518832

Summary: setroubleshoot: SELinux is preventing restorecon "associate" access on /dev/pts/ptmx.
Product: [Fedora] Fedora Reporter: Frank Murphy <frankly3d>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, jkubin, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:23bd5d4613118361ee78297be1738e3664f7b8505431ee360ee6d10a33cb4e0e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-24 14:17:59 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 Frank Murphy 2009-08-23 14:08:26 UTC
The following was filed automatically by setroubleshoot:

Summary:

SELinux is preventing restorecon "associate" access on /dev/pts/ptmx.

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

SELinux denied access requested by restorecon. It is not expected that this
access is required by restorecon 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://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Additional Information:

Source Context                system_u:object_r:ptmx_t:s0
Target Context                system_u:object_r:devpts_t:s0
Target Objects                /dev/pts/ptmx [ filesystem ]
Source                        restorecon
Source Path                   /sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.71-10.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.28-5.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31-0.167.rc6.git6.fc12.x86_64 #1 SMP Thu Aug
                              20 21:12:05 EDT 2009 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 23 Aug 2009 15:05:30 IST
Last Seen                     Sun 23 Aug 2009 15:05:30 IST
Local ID                      314eb190-6f94-4e97-bb5b-40b784c79c78
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1251036330.846:19669): avc:  denied  { associate } for  pid=2030 comm="restorecon" name="ptmx" dev=devpts ino=2 scontext=system_u:object_r:ptmx_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=filesystem

node=(removed) type=SYSCALL msg=audit(1251036330.846:19669): arch=c000003e syscall=189 success=yes exit=0 a0=7f64e76db7e0 a1=7f64e6425b19 a2=7f64e75d0ae0 a3=1c items=0 ppid=2010 pid=2030 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="restorecon" exe="/sbin/setfiles" subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)


audit2allow suggests:

#============= ptmx_t ==============
allow ptmx_t devpts_t:filesystem associate;

Comment 1 Frank Murphy 2009-08-23 14:11:55 UTC
was running as su
restorecon -R -v '/'

after moving some files.

Comment 2 Daniel Walsh 2009-08-23 17:10:18 UTC
I ran this bug through audit2why and it says that it is fixed in poliyc in -5 release,  So something is strange on you machine.

# grep associate /var/log/audit/audit.log | audit2allow -w

What does it say?

If you execute semodule -B

Do you get any errors?

Comment 3 Frank Murphy 2009-08-23 18:24:49 UTC
(In reply to comment #2)
> I ran this bug through audit2why and it says that it is fixed in poliyc in -5
> release,  So something is strange on you machine.
> 
> # grep associate /var/log/audit/audit.log | audit2allow -w
> 
> What does it say?

type=AVC msg=audit(1251036330.846:19669): avc:  denied  { associate } for  pid=2030 comm="restorecon" name="ptmx" dev=devpts ino=2 scontext=system_u:object_r:ptmx_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=filesystem

	Was caused by:
		Missing type enforcement (TE) allow rule.

		You can use audit2allow to generate a loadable module to allow this access.

> 
> If you execute semodule -B
> 
> Do you get any errors?  

No

Comment 4 Daniel Walsh 2009-08-24 14:17:59 UTC
Strange,

I believe that line is in -5 policy.

I just built selinux-policy-3.6.28-6.fc12.noarch

And verified that this allow rule is in the policy.

Please update to it when it shows up in rawhide or download it from koji.