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 1141228 - --attach doesn't work with SELinux
Summary: --attach doesn't work with SELinux
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-viewer
Version: 7.2
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 7.2
Assignee: Virt Viewer Maint
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 999926 1181288
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-12 13:27 UTC by Ján Tomko
Modified: 2015-11-19 07:34 UTC (History)
18 users (show)

Fixed In Version: virt-viewer-2.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 999926
Environment:
Last Closed: 2015-11-19 07:34:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2211 0 normal SHIPPED_LIVE virt-viewer, spice-gtk, and libgovirt bug fix and enhancement update 2015-11-19 08:27:40 UTC

Description Ján Tomko 2014-09-12 13:27:03 UTC
virt-viewer doing --attach passes a socket created by socketpair() to libvirtd via the virDomainOpenGraphics API.

Libvirt is unable to change the label on the socket after it has been created, so this results in AVC denials (see bug 999926).

To fix this, virDomainOpenGraphicsFD has been introduced, which leaves the socket creation to libvirt:
https://bugzilla.redhat.com/show_bug.cgi?id=999926#c39

Pending upstream patch for virt-viewer that uses the new API for --attach:
https://www.redhat.com/archives/virt-tools-list/2014-September/msg00096.html

Comment 2 RHEL Program Management 2014-09-29 22:45:55 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 4 Fabiano Fidêncio 2014-10-01 17:04:26 UTC
Patch was pushed upstream but, the fix itself, depends on libvirt 1.2.8.

Comment 9 zhoujunqin 2015-06-23 08:33:13 UTC
Environment setup:
# getenforce 
Enforcing

I can reproduce this issue with package:
libvirt-1.2.16-1.el7.x86_64
virt-viewer-0.6.0-12.el7.x86_64

Steps to reproduce:
# virt-viewer -c qemu:///session --debug --attach rhel7.1
...

Get audit.log:
# cat  /var/log/audit/audit.log |grep -i AVC 
type=AVC msg=audit(1435047455.297:1367): avc:  denied  { setopt } for  pid=21672 comm="qemu-kvm" scontext=system_u:system_r:svirt_t:s0:c10,c912 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket
type=AVC msg=audit(1435047455.297:1368): avc:  denied  { getattr } for  pid=21672 comm="qemu-kvm" scontext=system_u:system_r:svirt_t:s0:c10,c912 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket
type=AVC msg=audit(1435047455.297:1369): avc:  denied  { getattr } for  pid=21672 comm="qemu-kvm" scontext=system_u:system_r:svirt_t:s0:c10,c912 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket
type=AVC msg=audit(1435047455.297:1370): avc:  denied  { getattr } for  pid=21672 comm="qemu-kvm" scontext=system_u:system_r:svirt_t:s0:c10,c912 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket
type=AVC msg=audit(1435047455.297:1371): avc:  denied  { getattr } for  pid=21672 comm="qemu-kvm" scontext=system_u:system_r:svirt_t:s0:c10,c912 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket


Then try to verify this bug with new build:
libvirt-1.2.16-1.el7.x86_64
virt-viewer-2.0-3.el7.x86_64

Steps to verify:

# virt-viewer -c qemu:///session --debug --attach rhel7.1 
...

# cat  /var/log/audit/audit.log |grep -i AVC

Result: There is no AVC info in audit.log.

So move this bug from ON_QA to VERIFIED.

Comment 11 errata-xmlrpc 2015-11-19 07:34:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2211.html


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