Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 885432

Summary: selinux prevents RHEV-M SSO plugin from accessing credentials channel created by ovirt/rhevm-guest-agent
Product: Red Hat Enterprise Linux 6 Reporter: Vinzenz Feenstra [evilissimo] <vfeenstr>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: cpelland, dwalsh, jbelka, michal.skrivanek, mmalik, pstehlik
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-188.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:33:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 882239, 886210    

Description Vinzenz Feenstra [evilissimo] 2012-12-09 12:21:09 UTC
Description of problem:
selinux prevents the access of the rhevm-guest-agent-gdm-plugin to connect to the SO_PASSCRED unix domain socket ('\x00/tmp/ovirt-cred-channel').

The unix domain socket is created by the service: ovirt-guest-agent from the package: rhevm-guest-agent


Audit log entry:
type=AVC msg=audit(1355047156.839:26940): avc:  denied  { connectto } for  pid=11187 comm="gdm-session-wor" path=002F746D702F6F766972742D637265642D6368616E6E656C scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=unix_stream_socket


Version-Release number of selected component (if applicable):
rhevm-guest-agent-1.0.5-7

How reproducible:
Always reproducible with selinux-policy-3.7.19-155

Steps to Reproduce:
1. Setup a RHEV-M Environment
2. Create a RHEL6.3 Desktop VM with rhevm-guest-agent-gdm-plugin installed
3. Join the computer to the domain
4. Single sign on from the user portal will not complete.
  
Actual results:
Single Sign on is not working because the access to the credential socket is blocked.

Expected results:
Access to the socket is not blocked.

Additional info:
Temporary workaround for affected users:
# grep 002F746D702F6F766972742D637265642D6368616E6E656C /var/log/audit/audit.log | audit2allow -M ovirt-guest-agent
# semodule -i ovirt-guest-agent.pp

Comment 1 Vinzenz Feenstra [evilissimo] 2012-12-09 12:24:19 UTC
Please note that the package rhevm-guest-agent was previously known as rhev-agent.
The package rhevm-guest-agent-gdm-plugin was previously known as rhev-agent-gdm-plugin-rhevcred.

Correction: The problem occurs within the SSO PAM module - rhevm-guest-agent-pam-module (Previously known as rhev-agent-pam-rhev-cred)

Comment 3 Vinzenz Feenstra [evilissimo] 2012-12-09 13:23:59 UTC
Additional note: 

The rhevm-guest-agent-kdm-plugin package is also affected by this. The workaround mentioned in comment#0 works for it as well.

Comment 4 Miroslav Grepl 2012-12-10 07:26:47 UTC
The problem is the ovirt-guest-agent service has not a policy.

What does

# ps -efZ |grep initrc

Comment 5 Vinzenz Feenstra [evilissimo] 2012-12-10 08:12:16 UTC
system_u:system_r:initrc_t:s0   175       1747     1  0 09:08 ?        00:00:00 /usr/bin/python /usr/share/ovirt-guest-agent/ovirt-guest-agent.py -p /var/run/ovirt-guest-agent.pid -d
system_u:system_r:initrc_t:s0   root      1790     1  0 09:08 ?        00:00:00 rhnsd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 1998 1934  0 09:10 tty1 00:00:00 grep initrc

Comment 6 Miroslav Grepl 2012-12-10 09:31:12 UTC
OK, we need to backport changes from Fedora.

Comment 7 Miroslav Grepl 2012-12-10 09:32:21 UTC
You can test it for now using

# chcon -t rhev_agentd_exec_t /usr/share/ovirt-guest-agent/ovirt-guest-agent.py

Also please updat to the latest policy build.

rhnsd deamon should be confined.

Comment 8 Miroslav Grepl 2012-12-10 14:56:22 UTC
Fixed in selinux-policy-3.7.19-186.el6

Comment 18 Jiri Belka 2012-12-21 13:13:30 UTC
Little issue with guest agent pid file (selinux type), will check when BZ882239 is solved.

Comment 20 errata-xmlrpc 2013-02-21 08:33:02 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.

http://rhn.redhat.com/errata/RHBA-2013-0314.html