You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rasdaemon package (for ECC memory error reporting) contains a ras-mc-ctl systemd service that assigns labels to memory DIMM slots on boot using sysfs. The current selinux policy (selinux-policy-40.27-1.fc40.noarch) prevents that service from running properly and it seems that the denials are dontaudited.
These are the denials I'm encountering after temporarily disabling dontaudit rules:
For the second denial, the dimm_label filename are from paths like /sys/devices/system/edac/mc/mc0/rank4/dimm_label.
To work around the problem, I created the following CIL policy and the service was able to successfully run afterwards:
# Required for the process to run at all. Without this, it exits with status 1 without doing anything.
(allow rasdaemon_t kmod_exec_t (file (getattr)))
# Required for the process to actually make the necessary sysfs writes. Without this, it fails with: `Unable to open /sys/devices/system/edac/mc/mc0/rank4/dimm_label`.
(allow rasdaemon_t sysfs_t (file (write)))
This is reproducible 100% time, but to test it, it requires access to a motherboard that both uses ECC memory and supports reporting errors via an EDAC driver.
Install rasdaemon
sudo dnf install rasdaemon
Configure human readable labels in /etc/ras/dimm_labels.d/foobar
(The vendor and model can be found with ras-mc-ctl --mainboard. The available locations can be found in ras-mc-ctl --print-labels. mc0 csrow 2 channel 0, for example, corresponds to 0.2.0. The label names, like DIMM_A1, are arbitrary strings.)
Temporarily disable dontaudit rules
sudo semanage dontaudit off
Start ras-mc-ctl
sudo systemctl start ras-mc-ctl
The service fails to start and the denials from above are sent to the audit log. The SYSFS CONTENTS column of ras-mc-ctl --print-labels shows that the labels did not get written to sysfs.
The text was updated successfully, but these errors were encountered:
The rasdaemon package (for ECC memory error reporting) contains a
ras-mc-ctl
systemd service that assigns labels to memory DIMM slots on boot using sysfs. The current selinux policy (selinux-policy-40.27-1.fc40.noarch
) prevents that service from running properly and it seems that the denials aredontaudit
ed.These are the denials I'm encountering after temporarily disabling dontaudit rules:
For the second denial, the
dimm_label
filename are from paths like/sys/devices/system/edac/mc/mc0/rank4/dimm_label
.To work around the problem, I created the following CIL policy and the service was able to successfully run afterwards:
This is reproducible 100% time, but to test it, it requires access to a motherboard that both uses ECC memory and supports reporting errors via an EDAC driver.
Install rasdaemon
Configure human readable labels in
/etc/ras/dimm_labels.d/foobar
Example:
(The vendor and model can be found with
ras-mc-ctl --mainboard
. The available locations can be found inras-mc-ctl --print-labels
.mc0 csrow 2 channel 0
, for example, corresponds to0.2.0
. The label names, like DIMM_A1, are arbitrary strings.)Temporarily disable dontaudit rules
Start
ras-mc-ctl
The service fails to start and the denials from above are sent to the audit log. The
SYSFS CONTENTS
column ofras-mc-ctl --print-labels
shows that the labels did not get written to sysfs.The text was updated successfully, but these errors were encountered: