Bug 2234359

Summary: SELinux is preventing openconnect from 'open' accesses on the chr_file /dev/vhost-net.
Product: [Fedora] Fedora Reporter: Jan Vlug <jan.public>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 38CC: dwalsh, francois.poirotte, jan.public, lvrabec, mmalik, nknazeko, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:99a23871218cbaa2bacdc9a7aa42ebd0da46aba35ac4c8e9ba8ac355dc3d371e;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-38.27-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-06 01:19:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: description none

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.