Allow auditctl_t to read bin_t symlinks.
PATCH 1/1 Allow auditctl_t to read bin_t symlinks.
on RHEL7 insmod, rmmod, modprobe (and others?) are a symlinks to ../bin/kmod. But policy didn't allow auditctl_t to follow that link.
type=AVC msg=audit(1543853530.925:141): avc: denied { read } for pid=6937 comm="auditctl" name="insmod" dev="dm-1" ino=628383 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 type=AVC msg=audit(1543853530.925:143): avc: denied { read } for pid=6937 comm="auditctl" name="rmmod" dev="dm-1" ino=628387 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 type=AVC msg=audit(1543853530.926:145): avc: denied { read } for pid=6937 comm="auditctl" name="modprobe" dev="dm-1" ino=628386 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 type=AVC msg=audit(1543853797.766:60): avc: denied { read } for pid=6942 comm="auditctl" name="insmod" dev="dm-1" ino=628383 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=1
--- policy/modules/system/logging.te | 2 ++ 1 file changed, 2 insertions(+)
policy/modules/system/logging.te +2 -0
@@ -107,6 +107,8 @@ read_files_pattern(auditctl_t, auditd_etc_t, auditd_etc_t) allow auditctl_t auditd_etc_t:dir list_dir_perms; dontaudit auditctl_t auditd_etc_t:file map; +corecmd_search_bin(auditctl_t) + # Needed for adding watches files_getattr_all_dirs(auditctl_t) files_getattr_all_files(auditctl_t)
Signature · 1 line
2.19.2
Quoted 31 lines · David Sugar
on RHEL7 insmod, rmmod, modprobe (and others?) are a symlinks to ../bin/kmod. But policy didn't allow
auditctl_tto follow that link.type=AVC msg=audit(1543853530.925:141): avc: denied { read } for pid=6937 comm="auditctl" name="insmod" dev="dm-1" ino=628383 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 type=AVC msg=audit(1543853530.925:143): avc: denied { read } for pid=6937 comm="auditctl" name="rmmod" dev="dm-1" ino=628387 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 type=AVC msg=audit(1543853530.926:145): avc: denied { read } for pid=6937 comm="auditctl" name="modprobe" dev="dm-1" ino=628386 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 type=AVC msg=audit(1543853797.766:60): avc: denied { read } for pid=6942 comm="auditctl" name="insmod" dev="dm-1" ino=628383 scontext=system_u:system_r:auditctl_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=1
Signed-off-by Dave Sugar <[email protected]>--- policy/modules/system/logging.te | 2 ++ 1 file changed, 2 insertions(+)policy/modules/system/logging.te +0
-0
policy/modules/system/logging.te read_files_pattern(auditctl_t, auditd_etc_t, auditd_etc_t) · line 114
Quoted 8 lines
policy/modules/system/logging.te +2
-0@@ -107,6 +107,8 @@ read_files_pattern(auditctl_t, auditd_etc_t, auditd_etc_t) allow auditctl_t auditd_etc_t:dir list_dir_perms; dontaudit auditctl_t auditd_etc_t:file map; +corecmd_search_bin(auditctl_t) + # Needed for adding watches files_getattr_all_dirs(auditctl_t) files_getattr_all_files(auditctl_t)
Merged.
Signature · 1 line
Chris PeBenito