Bug 2335134 - SELinux prevents ras-mc-ctl.service from starting
Summary: SELinux prevents ras-mc-ctl.service from starting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 41
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-01-01 10:12 UTC by Dezponia Veil
Modified: 2025-09-14 13:20 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-41.47-1.fc41
Clone Of:
Environment:
Last Closed: 2025-09-14 01:35:18 UTC
Type: ---
Embargoed:
zpytela: mirror+


Attachments (Terms of Use)
ras-mc-ctl.service sealert output (2.25 KB, text/plain)
2025-01-01 10:14 UTC, Dezponia Veil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 2810 0 None open Allow ras-mc-ctl write to sysfs files 2025-08-01 18:56:18 UTC
Red Hat Bugzilla 1836861 0 medium CLOSED Standard policy prevents service ras-mc-ctl.service from package rasdaemon to start 2025-09-14 13:20:49 UTC
Red Hat Issue Tracker FC-1819 0 None None None 2025-07-16 08:13:09 UTC

Description Dezponia Veil 2025-01-01 10:12:25 UTC
Starting the service ras-mc-ctl.service from the rasdaemon package fails when SELinux is set to enforcing mode.

Reproducible: Always

Steps to Reproduce:
1. Install rasdaemon package with `dnf install rasdaemon`
2. Start rasdaemon.service with `systemctl start rasdemon`. Note that this works.
3. Try to start ras-mc-ctl.service with `systemctl start ras-mc-ctl.service`. Note that this fails with an error from systemctl.
4. Set SELinux to permissive mode with `setenforcing 0`.
5. Try to start ras-mc-ctl.service again. Note that now it works.
Actual Results:  
# systemctl start ras-mc-ctl.service
Job for ras-mc-ctl.service failed because the control process exited with error code.
See "systemctl status ras-mc-ctl.service" and "journalctl -xeu ras-mc-ctl.service" for details.

Expected Results:  
# systemctl start ras-mc-ctl.service
# systemctl status ras-mc-ctl.service
● ras-mc-ctl.service - Initialize EDAC v3.0.0 Drivers For Machine Hardware
     Loaded: loaded (/usr/lib/systemd/system/ras-mc-ctl.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: active (exited) since XYAZ XXXX-XX-XX XX:XX:XX YYY; 1min 00s ago
---

I've included the output of "sealert -l" when running SELinux in permissive mode as a log file to this bug report. Below is the Raw Audit Messages from this output:

type=AVC msg=audit(1735686000.621:305): avc:  denied  { write } for  pid=4494 comm="ras-mc-ctl" name="dimm_label" dev="sysfs" ino=60664 scontext=system_u:system_r:rasdaemon_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1
type=SYSCALL msg=audit(1735686000.621:305): arch=x86_64 syscall=openat success=yes exit=ESRCH a0=ffffff9c a1=556391175920 a2=80241 a3=1b6 items=0 ppid=1 pid=4494 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ras-mc-ctl exe=/usr/bin/perl subj=system_u:system_r:rasdaemon_t:s0 key=(null)


Package versions
Linux 6.12.6-200.fc41.x86_64 #1 SMP
selinux-policy-targeted-41.27-1.fc41.noarch
rasdaemon-0.8.0-5.fc41.x86_64

Comment 1 Dezponia Veil 2025-01-01 10:14:37 UTC
Created attachment 2064421 [details]
ras-mc-ctl.service sealert output

Comment 2 Dezponia Veil 2025-01-01 10:23:47 UTC
For reference the sysfs file "dimm_label" can be found here: /sys/devices/system/edac/mc/mc*/(dimm|rank)*/dimm_label

In my system it looks like this:
# ls -lahZ /sys/devices/system/edac/mc/mc0/rank0/dimm_label 
-rw-r--r--. 1 root root system_u:object_r:sysfs_t:s0 4,0K  X xxx XX.XX /sys/devices/system/edac/mc/mc0/rank0/dimm_label

Comment 3 Fedora Update System 2025-09-09 17:04:52 UTC
FEDORA-2025-acfddac85e (selinux-policy-41.47-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-acfddac85e

Comment 4 Fedora Update System 2025-09-10 02:41:27 UTC
FEDORA-2025-acfddac85e 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-acfddac85e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-acfddac85e

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

Comment 5 Fedora Update System 2025-09-14 01:35:18 UTC
FEDORA-2025-acfddac85e (selinux-policy-41.47-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.