Bug 2249928 - SELinux is preventing systemd-sleep from 'write' accesses on the directory /sys/firmware/efi/efivars.
Summary: SELinux is preventing systemd-sleep from 'write' accesses on the directory /s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 39
Hardware: x86_64
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d18202ee9548b597f83b3afb5ed...
: 2251000 2251508 2252681 2252796 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-15 23:37 UTC by Troy Volin
Modified: 2024-01-02 10:28 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-01-02 10:28:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (699 bytes, text/plain)
2023-11-15 23:37 UTC, Troy Volin
no flags Details
File: description (1.92 KB, text/plain)
2023-11-15 23:37 UTC, Troy Volin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1941 0 None open Allow systemd-sleep create efivarfs files 2023-11-16 16:43:42 UTC

Description Troy Volin 2023-11-15 23:37:24 UTC
Description of problem:
Using NVIDIA proprietary drivers. I just told KDE to hybernate. It failed and left system unusable until I held power-off for four seconds
SELinux is preventing systemd-sleep from 'write' accesses on the directory /sys/firmware/efi/efivars.

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

If you believe that systemd-sleep should be allowed write access on the efivars directory 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 'systemd-sleep' --raw | audit2allow -M my-systemdsleep
# semodule -X 300 -i my-systemdsleep.pp

Additional Information:
Source Context                system_u:system_r:systemd_sleep_t:s0
Target Context                system_u:object_r:efivarfs_t:s0
Target Objects                /sys/firmware/efi/efivars [ dir ]
Source                        systemd-sleep
Source Path                   systemd-sleep
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-39.1-1.fc39.noarch
Local Policy RPM              selinux-policy-targeted-39.1-1.fc39.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.5.11-300.fc39.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Nov 8 22:37:57 UTC 2023 x86_64
Alert Count                   1
First Seen                    2023-11-16 00:18:26 CET
Last Seen                     2023-11-16 00:18:26 CET
Local ID                      210d4090-2227-461d-a998-774c04de36b3

Raw Audit Messages
type=AVC msg=audit(1700090306.889:353): avc:  denied  { write } for  pid=4539 comm="systemd-sleep" name="/" dev="efivarfs" ino=18441 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:efivarfs_t:s0 tclass=dir permissive=0


Hash: systemd-sleep,systemd_sleep_t,efivarfs_t,dir,write

Version-Release number of selected component:
selinux-policy-targeted-39.1-1.fc39.noarch

Additional info:
reporter:       libreport-2.17.11
component:      selinux-policy
kernel:         6.5.11-300.fc39.x86_64
package:        selinux-policy-targeted-39.1-1.fc39.noarch
hashmarkername: setroubleshoot
reason:         SELinux is preventing systemd-sleep from 'write' accesses on the directory /sys/firmware/efi/efivars.
comment:        Using NVIDIA proprietary drivers. I just told KDE to hybernate. It failed and left system unusable until I held power-off for four seconds
type:           libreport
component:      selinux-policy

Comment 1 Troy Volin 2023-11-15 23:37:27 UTC
Created attachment 1999682 [details]
File: os_info

Comment 2 Troy Volin 2023-11-15 23:37:28 UTC
Created attachment 1999683 [details]
File: description

Comment 3 Troy Volin 2023-11-15 23:50:09 UTC
Bug #2240320 sounds like this exactly. But the fix for that was in selinux-policy-targeted-38.29-1.
And I am running selinux-policy-targeted-39.1-1

Comment 4 Zdenek Pytela 2023-11-16 16:43:43 UTC
Looks the permission to create files was not allowed.

Comment 5 Zdenek Pytela 2023-11-22 09:59:04 UTC
*** Bug 2251000 has been marked as a duplicate of this bug. ***

Comment 6 Zdenek Pytela 2023-11-27 07:50:38 UTC
*** Bug 2251508 has been marked as a duplicate of this bug. ***

Comment 7 Zdenek Pytela 2023-12-04 09:50:56 UTC
*** Bug 2252681 has been marked as a duplicate of this bug. ***

Comment 8 Zdenek Pytela 2023-12-05 10:19:09 UTC
*** Bug 2252796 has been marked as a duplicate of this bug. ***


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