Bug 2321933

Summary: SELinux is preventing power-profiles- from 'write' accesses on the file energy_perf_bias.
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 41CC: dominik, dwalsh, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6810b65bdde99bade85d347ed2571b92adf5b51c464dae1aca9d932b16adbcbe;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-27 14:09:03 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: os_info
none
File: description none

Description Dominik 'Rathann' Mierzejewski 2024-10-26 16:19:54 UTC
Description of problem:
SELinux is preventing power-profiles- from 'write' accesses on the file energy_perf_bias.

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

If you believe that power-profiles- should be allowed write access on the energy_perf_bias 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                energy_perf_bias [ 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.23-1.fc41.noarch
Local Policy RPM              selinux-policy-targeted-41.23-1.fc41.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.11.5-300.fc41.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Tue Oct 22 20:11:15 UTC 2024
                              x86_64
Alert Count                   5
First Seen                    2024-10-26 13:03:05 CEST
Last Seen                     2024-10-26 18:11:05 CEST
Local ID                      a0411f97-2792-481b-bd14-68cd629145a2

Raw Audit Messages
type=AVC msg=audit(1729959065.782:569): avc:  denied  { write } for  pid=2215 comm="power-profiles-" name="energy_perf_bias" dev="sysfs" ino=12194 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.23-1.fc41.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing power-profiles- from 'write' accesses on the file energy_perf_bias.
package:        selinux-policy-targeted-41.23-1.fc41.noarch
kernel:         6.11.5-300.fc41.x86_64
hashmarkername: setroubleshoot
component:      selinux-policy
type:           libreport
component:      selinux-policy

Comment 1 Dominik 'Rathann' Mierzejewski 2024-10-26 16:19:57 UTC
Created attachment 2053850 [details]
File: os_info

Comment 2 Dominik 'Rathann' Mierzejewski 2024-10-26 16:19:58 UTC
Created attachment 2053851 [details]
File: description

Comment 3 Dominik 'Rathann' Mierzejewski 2024-10-26 16:21:25 UTC
Possible duplicate of bug 2319317, bug 2319316.

Comment 4 Dominik 'Rathann' Mierzejewski 2024-10-26 16:22:11 UTC
Looks like it was fixed in rawhide, but I'm getting this in F41.

Comment 5 Zdenek Pytela 2025-01-27 14:09:03 UTC

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