Skip to content

Commit

Permalink
Allow pcmsensor write nmi_watchdog state information
Browse files Browse the repository at this point in the history
The commit addresses the following AVC denial:
type=PROCTITLE msg=audit(10/24/2024 09:51:41.105:265) : proctitle=/usr/sbin/pcm-sensor-server
type=PATH msg=audit(10/24/2024 09:51:41.105:265) : item=1 name=/proc/sys/kernel/nmi_watchdog inode=6631 dev=00:16 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysctl_kernel_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(10/24/2024 09:51:41.105:265) : item=0 name=/proc/sys/kernel/ inode=1530 dev=00:16 mode=dir,555 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysctl_kernel_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=SYSCALL msg=audit(10/24/2024 09:51:41.105:265) : arch=x86_64 syscall=openat success=yes exit=59 a0=AT_FDCWD a1=0x5612b4e8a1ce a2=O_WRONLY|O_CREAT|O_TRUNC a3=0x1b6 items=2 ppid=1 pid=8210 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=pcm-sensor-serv exe=/usr/sbin/pcm-sensor-server subj=system_u:system_r:pcmsensor_t:s0 key=(null)
type=AVC msg=audit(10/24/2024 09:51:41.105:265) : avc:  denied  { write } for  pid=8210 comm=pcm-sensor-serv name=nmi_watchdog dev="proc" ino=6631 scontext=system_u:system_r:pcmsensor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file permissive=1

Resolves: RHEL-52838
  • Loading branch information
zpytela committed Jan 27, 2025
1 parent 488ae2e commit 5e3e821
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions policy/modules/contrib/pcm.te
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ allow pcmsensor_t self:process { ptrace setrlimit };

kernel_read_proc_files(pcmsensor_t)
kernel_read_debugfs(pcmsensor_t)
kernel_write_nmi_watchdog_state(pcmsensor_t)

dev_rw_cpu_microcode(pcmsensor_t)
# /sys/module/msr/parameters/allow_writes
Expand Down

0 comments on commit 5e3e821

Please sign in to comment.