Bug 2234359 - SELinux is preventing openconnect from 'open' accesses on the chr_file /dev/vhost-net.
Summary: SELinux is preventing openconnect from 'open' accesses on the chr_file /dev/v...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: x86_64
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:99a23871218cbaa2bacdc9a7aa4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-24 06:42 UTC by Jan Vlug
Modified: 2023-09-06 01:19 UTC (History)
10 users (show)

Fixed In Version: selinux-policy-38.27-1.fc38
Clone Of:
Environment:
Last Closed: 2023-09-06 01:19:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2023-08-24 06:42 UTC, Jan Vlug
no flags Details
File: description (1.93 KB, text/plain)
2023-08-24 06:42 UTC, Jan Vlug
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1851 0 None open Allow openconnect vpn open vhost net device 2023-08-24 16:17:06 UTC

Description Jan Vlug 2023-08-24 06:42:09 UTC
Description of problem:
Connecting to a VPN. I have to do 2FA with the Microsoft Authenticator app on an Android phone.
SELinux is preventing openconnect from 'open' accesses on the chr_file /dev/vhost-net.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that openconnect should be allowed open access on the vhost-net chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'openconnect' --raw | audit2allow -M my-openconnect
# semodule -X 300 -i my-openconnect.pp

Additional Information:
Source Context                system_u:system_r:vpnc_t:s0
Target Context                system_u:object_r:vhost_device_t:s0
Target Objects                /dev/vhost-net [ chr_file ]
Source                        openconnect
Source Path                   openconnect
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.25-1.fc38.noarch
Local Policy RPM              selinux-policy-targeted-38.25-1.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.4.11-200.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Aug 16 17:42:12 UTC 2023
                              x86_64
Alert Count                   8
First Seen                    2023-08-14 16:03:32 CEST
Last Seen                     2023-08-24 08:39:02 CEST
Local ID                      38905f85-1145-4de4-8ca0-94ba201559cc

Raw Audit Messages
type=AVC msg=audit(1692859142.168:1643): avc:  denied  { open } for  pid=147003 comm="openconnect" path="/dev/vhost-net" dev="devtmpfs" ino=666 scontext=system_u:system_r:vpnc_t:s0 tcontext=system_u:object_r:vhost_device_t:s0 tclass=chr_file permissive=0


Hash: openconnect,vpnc_t,vhost_device_t,chr_file,open

Version-Release number of selected component:
selinux-policy-targeted-38.25-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.11
kernel:         6.4.11-200.fc38.x86_64
package:        selinux-policy-targeted-38.25-1.fc38.noarch
hashmarkername: setroubleshoot
reason:         SELinux is preventing openconnect from 'open' accesses on the chr_file /dev/vhost-net.
type:           libreport
comment:        Connecting to a VPN. I have to do 2FA with the Microsoft Authenticator app on an Android phone.
component:      selinux-policy
component:      selinux-policy

Comment 1 Jan Vlug 2023-08-24 06:42:11 UTC
Created attachment 1984924 [details]
File: os_info

Comment 2 Jan Vlug 2023-08-24 06:42:13 UTC
Created attachment 1984925 [details]
File: description

Comment 3 Jan Vlug 2023-08-24 06:45:34 UTC
Is this the same as bug 2221507?

Comment 4 Zdenek Pytela 2023-08-24 16:17:07 UTC
(In reply to Jan Vlug from comment #3)
> Is this the same as bug 2221507?

Not exactly, will be addressed by the next build.

Comment 5 Fedora Update System 2023-09-04 10:41:49 UTC
FEDORA-2023-7d46bd4184 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-7d46bd4184

Comment 6 Fedora Update System 2023-09-05 02:22:25 UTC
FEDORA-2023-7d46bd4184 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-7d46bd4184`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-7d46bd4184

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-09-06 01:19:56 UTC
FEDORA-2023-7d46bd4184 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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