Bug 488591 - SELinux is preventing tpvmlp (cupsd_t) "read write" to ./LCK..ttyS0 (var_lock_t).
SELinux is preventing tpvmlp (cupsd_t) "read write" to ./LCK..ttyS0 (var_lock...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-03-04 16:13 EST by John C. Vestal
Modified: 2009-03-05 10:32 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-03-05 10:32:35 EST
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 John C. Vestal 2009-03-04 16:13:00 EST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16

This is coming from VMWare tools on VMWare Fusion when auto-configure printers from the Mac to the virtual is enabled.


SELinux is preventing tpvmlp (cupsd_t) "read write" to ./LCK..ttyS0

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 tpvmlp. It is not expected that this access
is required by tpvmlp 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for ./LCK..ttyS0,

restorecon -v './LCK..ttyS0'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:var_lock_t:s0
Target Objects                ./LCK..ttyS0 [ file ]
Source                        tpvmlp
Source Path                   /usr/lib/vmware-tools/bin32/vmware-tpvmlp
Port                          <Unknown>
Host                          jvestal-5
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.13-46.fc10
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   catchall_file
Host Name                     jvestal-5
Platform                      Linux jvestal-5 #1
                              SMP Mon Feb 23 13:21:22 EST 2009 i686 i686
Alert Count                   1777
First Seen                    Tue 03 Mar 2009 10:05:17 PM EST
Last Seen                     Tue 03 Mar 2009 10:08:16 PM EST
Local ID                      6f884514-fdac-4c37-b32a-9a9922443194
Line Numbers                  

Raw Audit Messages            

node=jvestal-5 type=AVC msg=audit(1236136096.235:1794): avc:  denied  { read write } for  pid=5613 comm="tpvmlp" name="LCK..ttyS0" dev=dm-0 ino=10540 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lock_t:s0 tclass=file

node=jvestal-5 type=SYSCALL msg=audit(1236136096.235:1794): arch=40000003 syscall=5 success=no exit=-13 a0=86d33f8 a1=2 a2=1a4 a3=85eac38 items=0 ppid=5419 pid=5613 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="tpvmlp" exe="/usr/lib/vmware-tools/bin32/vmware-tpvmlp" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Reproducible: Always

Steps to Reproduce:
1.  Enable automatic printer registration in the VM from VMWare Fusion on the Mac
2. Login with SELinux enabled.
Actual Results:  
Thousands of errors a minute.

Expected Results:  
No error message.
Comment 1 Daniel Walsh 2009-03-05 10:32:35 EST
tpvmlp is leaking an open file descriptor to cups.  SELinux is closing the leaked file descriptor and everything is continuing.

vmware should close their file descriptors on exec

fcntl(fd, F_SETFD, FD_CLOEXEC)

Which would prevent this avc.

Please report this to vmware.

You can allow this for now.

# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

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