Bug 1677484 - NetworkManager-ssh VPN connections timeout due to selinux policy
Summary: NetworkManager-ssh VPN connections timeout due to selinux policy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 29
Hardware: All
OS: All
low
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-15 03:42 UTC by Dan Fruehauf
Modified: 2019-05-24 23:59 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.14.2-59.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-24 21:49:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dan Fruehauf 2019-02-15 03:42:15 UTC
Description of problem:
NetworkManager-ssh cannot connect due to selinux policy

Version-Release number of selected component (if applicable):


How reproducible:
Any time


Steps to Reproduce:
1. Start a NetworkManager-ssh VPN connection


Actual results:
VPN conencts

Expected results:
VPN does not connect and fails due to selinux policy errors:
---
Feb 15 05:39:45 localhost NetworkManager[1030]: <info>  [1550201985.1846] audit: op="connection-activate" uuid="285c6950-9da6-4874-8fa5-23ec2c4016ce" name="nevela-ssh" pid=2646 uid=1000 result="success"
Feb 15 05:39:45 localhost NetworkManager[1030]: <info>  [1550201985.2125] vpn-connection[0x559a10250750,285c6950-9da6-4874-8fa5-23ec2c4016ce,"nevela-ssh",0]: Started the VPN service, PID 26816
Feb 15 05:39:45 localhost audit[918]: USER_AVC pid=918 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { acquire_svc } for service=org.freedesktop.NetworkManager.ssh.Connection_574 spid=26816 scontext=system_u:system_r:NetworkManager_ssh_t:s0 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=dbus permissive=0#012 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
Feb 15 05:39:50 localhost NetworkManager[1030]: <warn>  [1550201990.6393] vpn-connection[0x559a10250750,285c6950-9da6-4874-8fa5-23ec2c4016ce,"nevela-ssh",0]: Timed out waiting for the service to start
---

Additional info:
I am the maintainer and packager of NetworkManager-ssh.

If I disable selinux (setenforce 0), everything works as expected.

Comment 1 Lukas Vrabec 2019-02-15 09:06:34 UTC
Hi, 

Could you attach output of:

# rpm -q selinux-policy 

Thanks,
Lukas.

Comment 2 Dan Fruehauf 2019-02-15 09:16:46 UTC
Hi Lukas - it is version selinux-policy-3.14.1-51.fc28.noarch.

If possible, and you'd like to resolve this in real time with quicker feedback, I can logon to freenode and we can chat.

I'll just add that it used to work properly in previous Fedora versions, but I'm not quite sure when it stopped working.

Comment 5 Ben Cotton 2019-05-02 19:23:08 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Lukas Vrabec 2019-05-17 19:48:21 UTC
commit 623f4ec21fc7ae5c86496da1c539bb6c228520bd (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Fri May 17 21:47:59 2019 +0200

    Allow NetworkManager_ssh_t domain to open communication channel with system dbus. BZ(1677484)

Comment 7 Lukas Vrabec 2019-05-17 20:00:07 UTC
commit 623f4ec21fc7ae5c86496da1c539bb6c228520bd (HEAD -> rawhide, origin/rawhide, origin/HEAD)
Author: Lukas Vrabec <lvrabec>
Date:   Fri May 17 21:47:59 2019 +0200

    Allow NetworkManager_ssh_t domain to open communication channel with system dbus. BZ(1677484)

Comment 8 Fedora Update System 2019-05-18 11:05:28 UTC
selinux-policy-3.14.2-59.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-38a1de7619

Comment 9 Fedora Update System 2019-05-19 10:49:50 UTC
selinux-policy-3.14.2-59.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-38a1de7619

Comment 10 Dan Fruehauf 2019-05-20 01:12:55 UTC
Unfortunately this still doesn't work. I updated selinux-policy (selinux-policy-3.14.2-59.fc29.noarch)

Now this is the result:
---
May 20 11:11:00 localhost NetworkManager[1107]: <info>  [1558314660.5685] audit: op="connection-activate" uuid="d0a1a843-98ad-41dc-831b-7a8139771a8e" name="tfx-jump ssh" pid=2351 uid=1000 result="success"
May 20 11:11:00 localhost NetworkManager[1107]: <info>  [1558314660.5718] vpn-connection[0x563d7e8f8350,d0a1a843-98ad-41dc-831b-7a8139771a8e,"tfx-jump ssh",0]: Started the VPN service, PID 2876
May 20 11:11:00 localhost NetworkManager[1107]: <info>  [1558314660.5833] vpn-connection[0x563d7e8f8350,d0a1a843-98ad-41dc-831b-7a8139771a8e,"tfx-jump ssh",0]: Saw the service appear; activating connection
May 20 11:11:00 localhost audit[960]: USER_AVC pid=960 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.NetworkManager.VPN.Plugin member=NeedSecrets dest=:1.392 spid=1107 tpid=2876 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:system_r:NetworkManager_ssh_t:s0 tclass=dbus permissive=0#012 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
May 20 11:11:00 localhost NetworkManager[1107]: <error> [1558314660.5859] vpn-connection[0x563d7e8f8350,d0a1a843-98ad-41dc-831b-7a8139771a8e,"tfx-jump ssh",0]: plugin NeedSecrets request #1 failed: An SELinux policy prevents this sender from sending this message to this recipient, 0 matched rules; type="method_call", sender=":1.16" (uid=0 pid=1107 comm="/usr/sbin/NetworkManager --no-daemon " label="system_u:system_r:NetworkManager_t:s0") interface="org.freedesktop.NetworkManager.VPN.Plugin" member="NeedSecrets" error name="(unset)" requested_reply="0" destination=":1.392" (uid=0 pid=2876 comm="/usr/libexec/nm-ssh-service --bus-name org.freedes" label="system_u:system_r:NetworkManager_ssh_t:s0")
May 20 11:11:00 localhost audit[960]: USER_AVC pid=960 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.NetworkManager.VPN.Plugin member=Disconnect dest=:1.392 spid=1107 tpid=2876 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:system_r:NetworkManager_ssh_t:s0 tclass=dbus permissive=0#012 exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
---

Comment 11 Lukas Vrabec 2019-05-20 08:22:37 UTC
commit 085074dc85d49cc2160f5abd7fca59669ef4cd20 (HEAD -> rawhide, origin/rawhide, origin/HEAD)
Author: Lukas Vrabec <lvrabec>
Date:   Mon May 20 09:52:01 2019 +0200

    Allow dbus chat between NetworkManager_t and NetworkManager_ssh_t
    domains. BZ(1677484)

Comment 12 Fedora Update System 2019-05-24 21:49:27 UTC
selinux-policy-3.14.2-59.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Dan Fruehauf 2019-05-24 23:59:27 UTC
Hi, this bug cannot be closed. The problem still persists. See 2 posts back for a summary.


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