RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 840858 - can't connect to virsh console with disabled unconfined module
Summary: can't connect to virsh console with disabled unconfined module
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-17 12:04 UTC by Petr Lautrbach
Modified: 2014-06-18 02:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:43:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Lautrbach 2012-07-17 12:04:43 UTC
Description of problem:
I can run and stop virtual machine with virsh command but I can't connect to console:

$ virsh start rawhide
Domain rawhide started

$ virsh console rawhide
Connected to domain rawhide
Escape character is ^]
error: Couldn't create lock file for pty '/dev/pts/18' in path '/var/lock/LCK.._pts_18': Permission denied

# semodule -l | grep unconfined
unconfined      3.3.0   Disabled
unconfineduser  1.0.0

# rpm -q selinux-policy
selinux-policy-3.10.0-137.el7.noarch


AVCs in permissive mode:
----
time->Tue Jul 17 13:52:54 2012
type=SYSCALL msg=audit(1342525974.276:5497): arch=c000003e syscall=2 success=yes exit=20 a0=7fbde0001b30 a1=c1 a2=1a4 a3=c items=0 ppid=1 pid=871 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="libvirtd" exe="/usr/sbin/libvirtd" subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1342525974.276:5497): avc:  denied  { write open } for  pid=871 comm="libvirtd" name="LCK.._pts_18" dev="tmpfs" ino=35051143 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=file
type=AVC msg=audit(1342525974.276:5497): avc:  denied  { create } for  pid=871 comm="libvirtd" name="LCK.._pts_18" scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=file
type=AVC msg=audit(1342525974.276:5497): avc:  denied  { add_name } for  pid=871 comm="libvirtd" name="LCK.._pts_18" scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=dir
type=AVC msg=audit(1342525974.276:5497): avc:  denied  { write } for  pid=871 comm="libvirtd" name="lock" dev="tmpfs" ino=12303 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=dir
----
time->Tue Jul 17 13:52:54 2012
type=SYSCALL msg=audit(1342525974.276:5496): arch=c000003e syscall=2 success=no exit=-2 a0=7fbde0001b30 a1=0 a2=0 a3=17 items=0 ppid=1 pid=871 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="libvirtd" exe="/usr/sbin/libvirtd" subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1342525974.276:5496): avc:  denied  { read } for  pid=871 comm="libvirtd" name="lock" dev="dm-1" ino=1573725 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=lnk_file
----
time->Tue Jul 17 13:52:56 2012
type=SYSCALL msg=audit(1342525976.268:5498): arch=c000003e syscall=87 success=yes exit=0 a0=1697de0 a1=0 a2=7fbe0937c728 a3=17 items=0 ppid=1 pid=866 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="libvirtd" exe="/usr/sbin/libvirtd" subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1342525976.268:5498): avc:  denied  { unlink } for  pid=866 comm="libvirtd" name="LCK.._pts_18" dev="tmpfs" ino=35051143 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=file
type=AVC msg=audit(1342525976.268:5498): avc:  denied  { remove_name } for  pid=866 comm="libvirtd" name="LCK.._pts_18" dev="tmpfs" ino=35051143 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=dir

Comment 1 Daniel Walsh 2012-07-19 17:55:13 UTC
Are these LCK files in a particular directory?

Comment 2 Petr Lautrbach 2012-07-23 10:49:59 UTC
According to the error message "Couldn't create lock file for pty '/dev/pts/18' in path '/var/lock/LCK.._pts_18': Permission denied" and configure.ac from libvirt source, they seem to be always located to /var/lock

Comment 3 Daniel Walsh 2012-07-23 15:54:28 UTC
Ok I added a label for lock files created by libvirt.

Should be fixed in selinux-policy-3.11.0-12.el7

Comment 6 Ludek Smid 2014-06-13 12:43:16 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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