Bug 2292513

Summary: SELinux is preventing zram-generator from 'write' accesses on the directory local-fs.target.wants.
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: 40CC: dominik, dwalsh, lvrabec, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8a627d9e33d8096474501afbb34f3dfb7554936c5313a8a8011886c9cc74637a;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-17 16:05:30 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-06-15 17:30:55 UTC
Description of problem:
SELinux is preventing zram-generator from 'write' accesses on the directory local-fs.target.wants.

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

If you believe that zram-generator should be allowed write access on the local-fs.target.wants 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 'zram-generator' --raw | audit2allow -M my-zramgenerator
# semodule -X 300 -i my-zramgenerator.pp

Additional Information:
Source Context                system_u:system_r:systemd_zram_generator_t:s0
Target Context                system_u:object_r:systemd_fstab_generator_unit_fil
                              e_t:s0
Target Objects                local-fs.target.wants [ dir ]
Source                        zram-generator
Source Path                   zram-generator
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.22-1.fc40.noarch
Local Policy RPM              selinux-policy-targeted-40.22-1.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.8.11-300.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Mon May 27 14:53:33 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-06-13 20:08:17 CEST
Last Seen                     2024-06-13 20:08:17 CEST
Local ID                      9daa0201-0eda-4841-ac6c-7a1d326922f6

Raw Audit Messages
type=AVC msg=audit(1718302097.98:502): avc:  denied  { write } for  pid=36100 comm="zram-generator" name="local-fs.target.wants" dev="tmpfs" ino=4231 scontext=system_u:system_r:systemd_zram_generator_t:s0 tcontext=system_u:object_r:systemd_fstab_generator_unit_file_t:s0 tclass=dir permissive=1


Hash: zram-generator,systemd_zram_generator_t,systemd_fstab_generator_unit_file_t,dir,write

Version-Release number of selected component:
selinux-policy-targeted-40.22-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
type:           libreport
kernel:         6.9.4-200.fc40.x86_64
package:        selinux-policy-targeted-40.22-1.fc40.noarch
reason:         SELinux is preventing zram-generator from 'write' accesses on the directory local-fs.target.wants.
component:      selinux-policy
hashmarkername: setroubleshoot
component:      selinux-policy

Comment 1 Dominik 'Rathann' Mierzejewski 2024-06-15 17:30:57 UTC
Created attachment 2037471 [details]
File: os_info

Comment 2 Dominik 'Rathann' Mierzejewski 2024-06-15 17:30:58 UTC
Created attachment 2037472 [details]
File: description

Comment 3 Zdenek Pytela 2024-06-17 16:05:30 UTC

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