Bug 2036972

Summary: SELinux is preventing pool-ModemManag from 'getattr' accesses on the chr_file /dev/wwan0mbim0.
Product: [Fedora] Fedora Reporter: David Auer (2nd Account) <dreua+bugzilla2>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7b7518c3b5fa492c642c9eb2876d5fe731e5815011d09d3f2ede3e0f7f078b65;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-12 18:22:02 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:

Description David Auer (2nd Account) 2022-01-04 14:36:26 UTC
Description of problem:
On each boot (ThinkPad L14)
SELinux is preventing pool-ModemManag from 'getattr' accesses on the chr_file /dev/wwan0mbim0.

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

If you want to allow pool-ModemManag to have getattr access on the wwan0mbim0 chr_file
Then you need to change the label on /dev/wwan0mbim0 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE '/dev/wwan0mbim0'
# restorecon -v '/dev/wwan0mbim0'

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

If you believe that pool-ModemManag should be allowed getattr access on the wwan0mbim0 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 'pool-ModemManag' --raw | audit2allow -M my-poolModemManag
# semodule -X 300 -i my-poolModemManag.pp

Additional Information:
Source Context                system_u:system_r:modemmanager_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                /dev/wwan0mbim0 [ chr_file ]
Source                        pool-ModemManag
Source Path                   pool-ModemManag
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-35.7-1.fc35.noarch
Local Policy RPM              selinux-policy-targeted-35.7-1.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.15.12-200.fc35.x86_64 #1 SMP Wed
                              Dec 29 15:03:38 UTC 2021 x86_64 x86_64
Alert Count                   95
First Seen                    2021-10-07 09:00:02 CEST
Last Seen                     2022-01-04 09:00:46 CET
Local ID                      7bddbce3-a5e4-4363-8abe-ffeee132c7c0

Raw Audit Messages
type=AVC msg=audit(1641283246.246:236): avc:  denied  { getattr } for  pid=3264 comm="pool-ModemManag" path="/dev/wwan0mbim0" dev="devtmpfs" ino=723 scontext=system_u:system_r:modemmanager_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0


Hash: pool-ModemManag,modemmanager_t,device_t,chr_file,getattr

Version-Release number of selected component:
selinux-policy-targeted-35.7-1.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.15.2
hashmarkername: setroubleshoot
kernel:         5.15.12-200.fc35.x86_64
type:           libreport

Comment 1 David Auer (2nd Account) 2022-01-04 14:41:34 UTC
Comes in pairs with: 2036973

Comment 2 Zdenek Pytela 2022-01-12 18:22:02 UTC

*** This bug has been marked as a duplicate of bug 1961571 ***