Bug 2336090

Summary: SELinux is preventing ps from 'getattr' accesses on the chr_file /dev/ttyUSB0.
Product: [Fedora] Fedora Reporter: dani
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 41CC: agerstmayr, dani, fberat, jkurik, lchilton, nathans, sfeifer, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b5670f4882458c9eccdacd1e294a18d8c8e9fc09bfb9e236111ad582134d69b6;VARIANT_ID=cinnamon;
Fixed In Version: pcp-6.3.2-3.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-18 03:04:39 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: description
none
File: os_info none

Description dani 2025-01-07 08:33:12 UTC
Description of problem:
Plugged in my phone
SELinux is preventing ps from 'getattr' accesses on the chr_file /dev/ttyUSB0.

*****  Plugin catchall (100. confidence) suggests   **************************

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

Additional Information:
Source Context                system_u:system_r:pcp_pmie_t:s0
Target Context                system_u:object_r:usbtty_device_t:s0
Target Objects                /dev/ttyUSB0 [ chr_file ]
Source                        ps
Source Path                   ps
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-41.26-1.fc41.noarch
Local Policy RPM              pcp-selinux-6.3.2-2.fc41.x86_64
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.11.11-300.fc41.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Dec 5 18:38:25 UTC 2024 x86_64
Alert Count                   2
First Seen                    2024-12-16 08:58:27 IST
Last Seen                     2024-12-16 08:58:27 IST
Local ID                      1fac8cc8-39c7-4153-b79e-9ec10dab7830

Raw Audit Messages
type=AVC msg=audit(1734332307.636:772): avc:  denied  { getattr } for  pid=30721 comm="ps" path="/dev/ttyUSB0" dev="devtmpfs" ino=897 scontext=system_u:system_r:pcp_pmie_t:s0 tcontext=system_u:object_r:usbtty_device_t:s0 tclass=chr_file permissive=0


Hash: ps,pcp_pmie_t,usbtty_device_t,chr_file,getattr

Version-Release number of selected component:
selinux-policy-targeted-41.26-1.fc41.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing ps from 'getattr' accesses on the chr_file /dev/ttyUSB0.
package:        selinux-policy-targeted-41.26-1.fc41.noarch
component:      pcp
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.12.7-200.fc41.x86_64
comment:        Plugged in my phone
component:      pcp

Comment 1 dani 2025-01-07 08:33:14 UTC
Created attachment 2065012 [details]
File: description

Comment 2 dani 2025-01-07 08:33:16 UTC
Created attachment 2065013 [details]
File: os_info

Comment 3 Jan Kurik 2025-01-07 11:11:41 UTC
IMO this might be a duplicate of https://issues.redhat.com/browse/RHEL-69085

Comment 4 Fedora Update System 2025-01-09 14:19:45 UTC
FEDORA-2025-f69b50954b (pcp-6.3.2-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f69b50954b

Comment 5 Fedora Update System 2025-01-10 03:12:14 UTC
FEDORA-2025-f69b50954b has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-f69b50954b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f69b50954b

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

Comment 6 Fedora Update System 2025-01-18 03:04:39 UTC
FEDORA-2025-f69b50954b (pcp-6.3.2-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.