Bug 1712324 - SELinux is preventing ModemManager from read, write access on the chr_file cdc-wdm2.
Summary: SELinux is preventing ModemManager from read, write access on the chr_file cd...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e74a87de15577dc59091ce6fe12...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-21 10:50 UTC by dimkas
Modified: 2019-05-21 11:31 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-05-21 11:31:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description dimkas 2019-05-21 10:50:29 UTC
Description of problem:
Turning on 3G modem conection
SELinux is preventing ModemManager from read, write access on the chr_file cdc-wdm2.

*****  Plugin device (91.4 confidence) suggests   ****************************

If you want to allow ModemManager to have read write access on the cdc-wdm2 chr_file
Then you need to change the label on cdc-wdm2 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE 'cdc-wdm2'
# restorecon -v 'cdc-wdm2'

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that ModemManager should be allowed read write access on the cdc-wdm2 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 'ModemManager' --raw | audit2allow -M my-ModemManager
# semodule -X 300 -i my-ModemManager.pp

Additional Information:
Source Context                system_u:system_r:modemmanager_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                cdc-wdm2 [ chr_file ]
Source                        ModemManager
Source Path                   ModemManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-37.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.0.16-300.fc30.x86_64 #1 SMP Tue
                              May 14 19:33:09 UTC 2019 x86_64 x86_64
Alert Count                   2
First Seen                    2019-05-21 12:31:07 EEST
Last Seen                     2019-05-21 12:31:07 EEST
Local ID                      ef95b9f6-bb54-4929-be99-f944a53d9acb

Raw Audit Messages
type=AVC msg=audit(1558431067.141:448): avc:  denied  { read write } for  pid=899 comm="ModemManager" name="cdc-wdm2" dev="devtmpfs" ino=204388 scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0


Hash: ModemManager,modemmanager_t,device_t,chr_file,read,write

Version-Release number of selected component:
selinux-policy-3.14.3-37.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.16-300.fc30.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-05-21 11:31:16 UTC
Hi, 

Could you please run: 

# restorecon -Rv / 

It should fix your issue. 

Thanks,
Lukas.


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