Description of problem: Hello, ras-mc-ctl is used by this service to label DIMMs into EDAC drivers. This way ECC errors on RAM sticks can match RAM slots on the motherboard. In enforcing mode the service fails to start. In permissive it works as expected and I get the following in audit.log: type=AVC msg=audit(1589799342.894:9623): avc: denied { write } for pid=642540 comm="ras-mc-ctl" name="dimm_label" dev="sysfs" ino=45185 scontext=system_u:system_r:rasdaemon_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 This kinda makes sense because it writes the labels into /sys/devices/system/edac/mc/mc0/dimm0/dimm_label for instance. Surprisingly, in enforcing mode, the only error I get is from systemd telling me it exited with the error code 1: (code=exited, status=1/FAILURE) Version-Release number of selected component (if applicable): selinux-policy-3.14.5-38.fc32.noarch rasdaemon-0.6.4-1.fc32.x86_64 How reproducible: Always Steps to Reproduce: [root@moonpool ~]# getenforce Enforcing [root@moonpool ~]# systemctl status ras-mc-ctl ● ras-mc-ctl.service - Initialize EDAC v3.0.0 Drivers For Machine Hardware Loaded: loaded (/usr/lib/systemd/system/ras-mc-ctl.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2020-05-18 12:49:55 CEST; 4min 47s ago Main PID: 641864 (code=exited, status=1/FAILURE) CPU: 44ms May 18 12:49:55 moonpool systemd[1]: Starting Initialize EDAC v3.0.0 Drivers For Machine Hardware... May 18 12:49:55 moonpool systemd[1]: ras-mc-ctl.service: Main process exited, code=exited, status=1/FAILURE May 18 12:49:55 moonpool systemd[1]: ras-mc-ctl.service: Failed with result 'exit-code'. May 18 12:49:55 moonpool systemd[1]: Failed to start Initialize EDAC v3.0.0 Drivers For Machine Hardware. [root@moonpool ~]# systemctl restart ras-mc-ctl Job for ras-mc-ctl.service failed because the control process exited with error code. See "systemctl status ras-mc-ctl.service" and "journalctl -xe" for details. [root@moonpool ~]# setenforce permissive [root@moonpool ~]# systemctl restart ras-mc-ctl [root@moonpool ~]# systemctl status ras-mc-ctl ● ras-mc-ctl.service - Initialize EDAC v3.0.0 Drivers For Machine Hardware Loaded: loaded (/usr/lib/systemd/system/ras-mc-ctl.service; enabled; vendor preset: disabled) Active: active (exited) since Mon 2020-05-18 12:55:42 CEST; 3s ago Process: 642540 ExecStart=/usr/sbin/ras-mc-ctl --register-labels (code=exited, status=0/SUCCESS) Main PID: 642540 (code=exited, status=0/SUCCESS) CPU: 47ms May 18 12:55:42 moonpool systemd[1]: Starting Initialize EDAC v3.0.0 Drivers For Machine Hardware... May 18 12:55:42 moonpool systemd[1]: Finished Initialize EDAC v3.0.0 Drivers For Machine Hardware.
This applies to Centos as well: (root) hostname: /etc>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; vendor preset: disabled) Active: inactive (dead) (root) hostname: /etc>systemctl start ras-mc-ctl.service Job for ras-mc-ctl.service failed because a fatal signal was delivered to the control process. See "systemctl status ras-mc-ctl.service" and "journalctl -xe" for details. (root) hostname: /etc>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; vendor preset: disabled) Active: failed (Result: signal) since Wed 2020-12-30 14:04:06 CET; 8s ago Process: 3265 ExecStart=/usr/sbin/ras-mc-ctl --register-labels (code=killed, signal=SEGV) Main PID: 3265 (code=killed, signal=SEGV) Dec 30 14:04:06 hostname.domain systemd[1]: Starting Initialize EDAC v3.0.0 Drivers For Machine Hardware... Dec 30 14:04:06 hostname.domain systemd[1]: ras-mc-ctl.service: main process exited, code=killed, status=11/SEGV Dec 30 14:04:06 hostname.domain systemd[1]: Failed to start Initialize EDAC v3.0.0 Drivers For Machine Hardware. Dec 30 14:04:06 hostname.domain systemd[1]: Unit ras-mc-ctl.service entered failed state. Dec 30 14:04:06 hostname.domain systemd[1]: ras-mc-ctl.service failed. (root) hostname: /etc>ras-mc-ctl --status ras-mc-ctl: drivers not loaded. (root) hostname: /etc>getenforce Enforcing (root) hostname: /etc>setenforce permissive (root) hostname: /etc>systemctl restart ras-mc-ctl.service (root) hostname: /etc>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; vendor preset: disabled) Active: active (exited) since Wed 2020-12-30 14:09:44 CET; 6s ago Process: 3352 ExecStart=/usr/sbin/ras-mc-ctl --register-labels (code=exited, status=0/SUCCESS) Main PID: 3352 (code=exited, status=0/SUCCESS) Dec 30 14:09:43 hostname.domain systemd[1]: Starting Initialize EDAC v3.0.0 Drivers For Machine Hardware... Dec 30 14:09:44 hostname.domain ras-mc-ctl[3352]: ras-mc-ctl: Error: No dimm labels for Intel Corporation model NUC6CAYB Dec 30 14:09:44 hostname.domain systemd[1]: Started Initialize EDAC v3.0.0 Drivers For Machine Hardware. (root) hostname: /etc>cat /etc/centos-release CentOS Linux release 7.9.2009 (Core) (root) hostname: /etc>
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This is still a problem on Fedora 34. Manually loading the labels with "sudo /usr/sbin/ras-mc-ctl --register-labels" works though. Only the systemd service fails to do it.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Still happens on Fedora 39: type=AVC msg=audit(1709359272.102:3163): avc: denied { write } for pid=15841 comm="ras-mc-ctl" name="dimm_label" dev="sysfs" ino=53742 scontext=system_u:system_r:rasdaemon_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1