* [PATCH] Allow auditctl_t to read bin_t symlinks.
@ 2018-12-07 0:20 David Sugar
2018-12-11 22:53 ` Chris PeBenito
0 siblings, 1 reply; 2+ messages in thread
From: David Sugar @ 2018-12-07 0:20 UTC (permalink / raw)
To: selinux-refpolicy
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
Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
policy/modules/system/logging.te | 2 ++
1 file changed, 2 insertions(+)
diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te
index 7020a476..483084a5 100644
--- a/policy/modules/system/logging.te
+++ b/policy/modules/system/logging.te
@@ -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)
--
2.19.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Allow auditctl_t to read bin_t symlinks.
2018-12-07 0:20 [PATCH] Allow auditctl_t to read bin_t symlinks David Sugar
@ 2018-12-11 22:53 ` Chris PeBenito
0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2018-12-11 22:53 UTC (permalink / raw)
To: David Sugar, selinux-refpolicy
On 12/6/18 7:20 PM, David Sugar wrote:
> 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
>
> Signed-off-by: Dave Sugar <dsugar@tresys.com>
> ---
> policy/modules/system/logging.te | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te
> index 7020a476..483084a5 100644
> --- a/policy/modules/system/logging.te
> +++ b/policy/modules/system/logging.te
> @@ -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.
--
Chris PeBenito
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-11 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 0:20 [PATCH] Allow auditctl_t to read bin_t symlinks David Sugar
2018-12-11 22:53 ` Chris PeBenito
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).