Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 2022902

Summary: SELinux is preventing Mobile Broadband connections
Product: [Fedora] Fedora Reporter: Philip Heron <phil>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 35CC: alexvillacislasso, dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, pkoncity, vmojzis, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-35.18-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-23 03:13:55 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:

Description Philip Heron 2021-11-12 22:47:22 UTC
Description of problem:

I have a Huawei E160 USB dongle and tried to enable a connection but Network Manager just throws an error saying the activation failed. There are several entries in audit.log relating to pppd:

type=AVC msg=audit(1636745917.291:337): avc:  denied  { create } for  pid=7745 comm="pppd" name="LCK..ttyUSB0" scontext=system_u:system_r:pppd_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file permissive=0
type=AVC msg=audit(1636746093.459:354): avc:  denied  { open } for  pid=7857 comm="pppd" path="/run/lock/LCK..ttyUSB0" dev="tmpfs" ino=2136 scontext=system_u:system_r:pppd_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file permissive=0

I've tried creating a policy for these with audit2allow, which although did stop any further notices appearing in audit.log didn't fix the issue. With the custom policies applied, the connection was failing with this error:

pppd[1672]: Can't open existing lock file /var/lock/LCK..ttyUSB0: Permission denied

There's nothing in audit.log relating to that. I finally give setenforce 0 a try, and it has started working perfectly.

Something in F35's default policy is preventing pppd from accessing those lock files. It works out of the box on Fedora 34.

Comment 1 Zdenek Pytela 2022-04-08 13:53:06 UTC
(In reply to Philip Heron from comment #0)
> Something in F35's default policy is preventing pppd from accessing those
> lock files. It works out of the box on Fedora 34.

Probably a change in pppd as selinux-policy only had a rule for a directory in /run/lock.

Comment 2 Zdenek Pytela 2022-04-12 09:36:56 UTC
*** Bug 2074239 has been marked as a duplicate of this bug. ***

Comment 3 Zdenek Pytela 2022-04-12 09:37:05 UTC
*** Bug 2074238 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2022-06-07 09:25:32 UTC
FEDORA-2022-9e53cb5027 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9e53cb5027

Comment 5 Fedora Update System 2022-06-08 01:20:22 UTC
FEDORA-2022-9e53cb5027 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-9e53cb5027`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9e53cb5027

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

Comment 6 Fedora Update System 2022-06-23 03:13:55 UTC
FEDORA-2022-9e53cb5027 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.