Bug 2334965 - SELinux is preventing power-profiles- from 'write' accesses on the file energy_performance_preference.
Summary: SELinux is preventing power-profiles- from 'write' accesses on the file energ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 41
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6810b65bdde99bade85d347ed25...
: 2321391 2321924 2321933 2322485 2323024 2329824 2334081 2336865 2338135 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-30 18:12 UTC by Fabio Valentini
Modified: 2025-02-03 01:18 UTC (History)
17 users (show)

Fixed In Version: selinux-policy-41.31-1.fc41
Clone Of:
Environment:
Last Closed: 2025-02-03 01:18:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (2.01 KB, text/plain)
2024-12-30 18:12 UTC, Fabio Valentini
no flags Details
File: os_info (754 bytes, text/plain)
2024-12-30 18:12 UTC, Fabio Valentini
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 2535 0 None Merged Allow power-profiles-daemon write sysfs files 2025-01-27 14:01:47 UTC

Description Fabio Valentini 2024-12-30 18:12:24 UTC
Description of problem:
This seems to happen when power-profiles-daemon attempts to set the performance profile (for example, when launching a game).
SELinux is preventing power-profiles- from 'write' accesses on the file energy_performance_preference.

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

If you believe that power-profiles- should be allowed write access on the energy_performance_preference 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_performance_preference [ 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.27-1.fc41.noarch
Local Policy RPM              selinux-policy-targeted-41.27-1.fc41.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.12.7-200.fc41.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Dec 27 17:05:33 UTC 2024
                              x86_64
Alert Count                   3
First Seen                    2024-12-29 14:56:15 CET
Last Seen                     2024-12-30 13:55:41 CET
Local ID                      20e96f94-3318-4051-b501-0a71c5c71016

Raw Audit Messages
type=AVC msg=audit(1735563341.961:181): avc:  denied  { write } for  pid=2897 comm="power-profiles-" name="energy_performance_preference" dev="sysfs" ino=23260 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.27-1.fc41.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing power-profiles- from 'write' accesses on the file energy_performance_preference.
package:        selinux-policy-targeted-41.27-1.fc41.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.12.7-200.fc41.x86_64
comment:        This seems to happen when power-profiles-daemon attempts to set the performance profile (for example, when launching a game).
component:      selinux-policy

Comment 1 Fabio Valentini 2024-12-30 18:12:27 UTC
Created attachment 2064299 [details]
File: description

Comment 2 Fabio Valentini 2024-12-30 18:12:29 UTC
Created attachment 2064300 [details]
File: os_info

Comment 3 Zdenek Pytela 2025-01-27 14:02:01 UTC
*** Bug 2338135 has been marked as a duplicate of this bug. ***

Comment 4 Zdenek Pytela 2025-01-27 14:08:48 UTC
*** Bug 2321924 has been marked as a duplicate of this bug. ***

Comment 5 Zdenek Pytela 2025-01-27 14:09:03 UTC
*** Bug 2321933 has been marked as a duplicate of this bug. ***

Comment 6 Zdenek Pytela 2025-01-27 14:09:26 UTC
*** Bug 2322485 has been marked as a duplicate of this bug. ***

Comment 7 Zdenek Pytela 2025-01-27 14:09:43 UTC
*** Bug 2329824 has been marked as a duplicate of this bug. ***

Comment 8 Zdenek Pytela 2025-01-27 14:09:51 UTC
*** Bug 2334081 has been marked as a duplicate of this bug. ***

Comment 9 Zdenek Pytela 2025-01-27 14:10:13 UTC
*** Bug 2321391 has been marked as a duplicate of this bug. ***

Comment 10 Zdenek Pytela 2025-01-27 14:10:35 UTC
*** Bug 2323024 has been marked as a duplicate of this bug. ***

Comment 11 Zdenek Pytela 2025-01-27 14:10:43 UTC
*** Bug 2336865 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2025-01-28 15:37:45 UTC
FEDORA-2025-9da160c869 (selinux-policy-41.30-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-9da160c869

Comment 13 Fedora Update System 2025-01-29 05:50:47 UTC
FEDORA-2025-9da160c869 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-9da160c869`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-9da160c869

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

Comment 14 Fedora Update System 2025-02-02 02:01:32 UTC
FEDORA-2025-62c612355c 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-62c612355c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-62c612355c

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

Comment 15 Fedora Update System 2025-02-03 01:18:48 UTC
FEDORA-2025-62c612355c (selinux-policy-41.31-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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