Bug 2336865 - SELinux is preventing power-profiles- from 'write' accesses on the file scaling_governor.
Summary: SELinux is preventing power-profiles- from 'write' accesses on the file scali...
Keywords:
Status: CLOSED DUPLICATE of bug 2334965
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6810b65bdde99bade85d347ed25...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-01-10 04:21 UTC by Jack Greiner
Modified: 2025-01-27 14:10 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-01-27 14:10:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (1.93 KB, text/plain)
2025-01-10 04:21 UTC, Jack Greiner
no flags Details
File: os_info (760 bytes, text/plain)
2025-01-10 04:21 UTC, Jack Greiner
no flags Details

Description Jack Greiner 2025-01-10 04:21:32 UTC
Description of problem:
Setting the power profile using powerprofilesctl to any profile will trip SELinux.

Example command: powerprofilesctl launch -p performance glxgears

This will change the performance govenor to performance, and then launch glxgears. An SELinux warning will follow shortly afterwards.
SELinux is preventing power-profiles- from 'write' accesses on the file scaling_governor.

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

If you believe that power-profiles- should be allowed write access on the scaling_governor 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 'power-profiles-' --raw | audit2allow -M my-powerprofiles
# semodule -X 300 -i my-powerprofiles.pp

Additional Information:
Source Context                system_u:system_r:powerprofiles_t:s0
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                scaling_governor [ file ]
Source                        power-profiles-
Source Path                   power-profiles-
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-41.28-1.fc42.noarch
Local Policy RPM              selinux-policy-targeted-41.28-1.fc42.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.12.8-cb1.0.fc42.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Sat Jan 4 03:24:48 UTC 2025 x86_64
Alert Count                   1
First Seen                    2025-01-09 23:16:42 EST
Last Seen                     2025-01-09 23:16:42 EST
Local ID                      748afd34-b34f-4a72-bacf-67dd679f5474

Raw Audit Messages
type=AVC msg=audit(1736482602.719:1788): avc:  denied  { write } for  pid=13916 comm="power-profiles-" name="scaling_governor" dev="sysfs" ino=23996 scontext=system_u:system_r:powerprofiles_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1


Hash: power-profiles-,powerprofiles_t,sysfs_t,file,write

Version-Release number of selected component:
selinux-policy-targeted-41.28-1.fc42.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing power-profiles- from 'write' accesses on the file scaling_governor.
package:        selinux-policy-targeted-41.28-1.fc42.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.12.8-cb1.0.fc42.x86_64
component:      selinux-policy

Comment 1 Jack Greiner 2025-01-10 04:21:34 UTC
Created attachment 2065358 [details]
File: description

Comment 2 Jack Greiner 2025-01-10 04:21:35 UTC
Created attachment 2065359 [details]
File: os_info

Comment 3 Zdenek Pytela 2025-01-27 14:10:43 UTC

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


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