Bug 1588429

Summary: SELinux is preventing /usr/sbin/ModemManager from read access on the file /etc/passwd.
Product: Red Hat Enterprise Linux 7 Reporter: Thomas Haller <thaller>
Component: ModemManagerAssignee: Antonio Cardace <acardace>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: acardace, aloughla, jkoten, jmaxwell, lrintel, mboisver, mmilgram, rkhan, sababu, sukulkar, till, tpelka, vbenes
Target Milestone: rcKeywords: OtherQA
Target Release: 7.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ModemManager-1.6.10-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 20:27: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:
Bug Depends On:    
Bug Blocks: 1797742    

Description Thomas Haller 2018-06-07 10:35:11 UTC
Saw on current rhel-7.5:

Jun 07 12:21:37 localhost.localdomain setroubleshoot[877]: SELinux is preventing /usr/sbin/ModemManager from read access on the file /etc/passwd. For complete SELinux messages run: sealert -l 837b5554-cd2e-48e9-9a8c-8d777b526e0b
Jun 07 12:21:37 localhost.localdomain python[877]: SELinux is preventing /usr/sbin/ModemManager from read access on the file /etc/passwd.
                                                   
                                                   *****  Plugin catchall (100. confidence) suggests   **************************
                                                   
                                                   If you believe that ModemManager should be allowed read access on the passwd 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 -i my-ModemManager.pp
                                                   


From https://bugzilla.redhat.com/show_bug.cgi?id=1585611#c13 , file "sosreport-localhost.localdomain-20180607130321/sos_commands/logs/journalctl_--no-pager_--boot"

Comment 2 Lubomir Rintel 2018-06-11 14:55:45 UTC
Upstream ticket & patch:
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/50

Comment 5 Marcelo Ricardo Leitner 2019-07-03 15:10:20 UTC
Mass-moving bugs RHEL <= 7.6.0 to 7.7.0.
As we are past RFE deadline for 7.7.0 and we should have no new features on 7.8.0, please evaluate if it's still wanted on RHEL7 and contact PM for exception. You may also move it to RHEL8 if that's wanted. Thanks!

Comment 7 Lubomir Rintel 2019-08-30 14:32:59 UTC
This is a purely cosmetical issue, fixed upstream and in RHEL-8.

Do we need to also add the fix to RHEL-7.8?

Comment 16 Antonio Cardace 2020-04-22 14:56:47 UTC
Upstream fix has been backported to RHEL-7.9 and new build is available "ModemManager-1.6.10-4.el7"  https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1174426.

Comment 19 Sangam 2020-05-25 19:32:52 UTC
Hello Antonio,

My apologies for the delay, I have tested the behavior with MM ( ModemManager-1.6.10-4.el7 ) and it works as expected. 


[root@RHEL7-Modem-test ~]# uname -a
Linux RHEL7-Modem-test 3.10.0-1062.12.1.el7.x86_64 #1 SMP Thu Dec 12 06:44:49 EST 2019 x86_64 x86_64 x86_64 GNU/Linux

[root@RHEL7-Modem-test ~]# rpm -qa ModemManager
ModemManager-1.6.10-4.el7.x86_64

[root@RHEL7-Modem-test ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31
[root@RHEL7-Modem-test ~]# 



May 26 00:57:34 RHEL7-Modem-test ModemManager[18052]: <info>  ModemManager (version 1.6.10-4.el7) starting in system bus...
May 26 00:57:34 RHEL7-Modem-test journal: Removing a network device that was not added
May 26 00:57:34 RHEL7-Modem-test journal: Removing a network device that was not added
May 26 00:57:34 RHEL7-Modem-test systemd: Started Modem Manager.
May 26 00:57:34 RHEL7-Modem-test NetworkManager[5735]: <info>  [1590434854.0949] modem-manager: ModemManager now available
May 26 00:57:34 RHEL7-Modem-test abrt-server: Package 'ModemManager' isn't signed with proper key
May 26 00:57:34 RHEL7-Modem-test abrt-server: 'post-create' on '/var/spool/abrt/ccpp-2020-05-26-00:57:33-17768' exited with 1
May 26 00:57:34 RHEL7-Modem-test abrt-server: Deleting problem directory '/var/spool/abrt/ccpp-2020-05-26-00:57:33-17768'
May 26 00:57:35 RHEL7-Modem-test systemd: Starting Cleanup of Temporary Directories...
May 26 00:57:35 RHEL7-Modem-test systemd: Started Cleanup of Temporary Directories.
May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB1): port attributes not fully set
May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB0): port attributes not fully set
May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB3): port attributes not fully set
May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB2): port attributes not fully set

Thanks
Sangam

Comment 20 Tomas Pelka 2020-06-19 19:06:23 UTC
(In reply to Sangam from comment #19)
> Hello Antonio,
> 
> My apologies for the delay, I have tested the behavior with MM (
> ModemManager-1.6.10-4.el7 ) and it works as expected. 
> 
> 
> [root@RHEL7-Modem-test ~]# uname -a
> Linux RHEL7-Modem-test 3.10.0-1062.12.1.el7.x86_64 #1 SMP Thu Dec 12
> 06:44:49 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
> 
> [root@RHEL7-Modem-test ~]# rpm -qa ModemManager
> ModemManager-1.6.10-4.el7.x86_64
> 
> [root@RHEL7-Modem-test ~]# sestatus
> SELinux status:                 enabled
> SELinuxfs mount:                /sys/fs/selinux
> SELinux root directory:         /etc/selinux
> Loaded policy name:             targeted
> Current mode:                   enforcing
> Mode from config file:          enforcing
> Policy MLS status:              enabled
> Policy deny_unknown status:     allowed
> Max kernel policy version:      31
> [root@RHEL7-Modem-test ~]# 
> 
> 
> 
> May 26 00:57:34 RHEL7-Modem-test ModemManager[18052]: <info>  ModemManager
> (version 1.6.10-4.el7) starting in system bus...
> May 26 00:57:34 RHEL7-Modem-test journal: Removing a network device that was
> not added
> May 26 00:57:34 RHEL7-Modem-test journal: Removing a network device that was
> not added
> May 26 00:57:34 RHEL7-Modem-test systemd: Started Modem Manager.
> May 26 00:57:34 RHEL7-Modem-test NetworkManager[5735]: <info> 
> [1590434854.0949] modem-manager: ModemManager now available
> May 26 00:57:34 RHEL7-Modem-test abrt-server: Package 'ModemManager' isn't
> signed with proper key
> May 26 00:57:34 RHEL7-Modem-test abrt-server: 'post-create' on
> '/var/spool/abrt/ccpp-2020-05-26-00:57:33-17768' exited with 1
> May 26 00:57:34 RHEL7-Modem-test abrt-server: Deleting problem directory
> '/var/spool/abrt/ccpp-2020-05-26-00:57:33-17768'
> May 26 00:57:35 RHEL7-Modem-test systemd: Starting Cleanup of Temporary
> Directories...
> May 26 00:57:35 RHEL7-Modem-test systemd: Started Cleanup of Temporary
> Directories.
> May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB1):
> port attributes not fully set
> May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB0):
> port attributes not fully set
> May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB3):
> port attributes not fully set
> May 26 00:57:35 RHEL7-Modem-test ModemManager[18052]: <warn>  (ttyUSB2):
> port attributes not fully set
> 
> Thanks
> Sangam

Thanks Sangam, moving to verified.

Comment 22 errata-xmlrpc 2020-09-29 20:27:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ModemManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3998