SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] resolve syslog imuxsock denial
@ 2019-11-17  4:48 Sugar, David
  2019-11-23 15:27 ` Chris PeBenito
  0 siblings, 1 reply; 2+ messages in thread
From: Sugar, David @ 2019-11-17  4:48 UTC (permalink / raw)
  To: selinux-refpolicy

I'm seeing the following error while starting rsyslog:
Nov 17 02:01:38 localhost rsyslogd: cannot create '/run/systemd/journal/syslog': Permission denied [v8.24.0-41.el7_7.2]
Nov 17 02:01:38 localhost rsyslogd: imuxsock does not run because we could not aquire any socket  [v8.24.0-41.el7_7.2]
Nov 17 02:01:38 localhost rsyslogd: activation of module imuxsock failed [v8.24.0-41.el7_7.2]

With the following denials:
type=AVC msg=audit(1573958708.773:1896): avc:  denied  { create } for  pid=2347 comm="rsyslogd" name="syslog" scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_runtime_t:s0 tclass=sock_file permissive=1
type=AVC msg=audit(1573958708.773:1897): avc:  denied  { setattr } for  pid=2347 comm="rsyslogd" name="syslog" dev="tmpfs" ino=19368 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_runtime_t:s0 tclass=sock_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 3d5b57f1..42d77a24 100644
--- a/policy/modules/system/logging.te
+++ b/policy/modules/system/logging.te
@@ -432,6 +432,8 @@ allow syslogd_t syslogd_runtime_t:file map;
 files_pid_filetrans(syslogd_t, syslogd_runtime_t, file)
 allow syslogd_t syslogd_runtime_t:dir create_dir_perms;
 
+allow syslogd_t syslogd_runtime_t:sock_file { create setattr };
+
 kernel_read_crypto_sysctls(syslogd_t)
 kernel_read_system_state(syslogd_t)
 kernel_read_network_state(syslogd_t)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] resolve syslog imuxsock denial
  2019-11-17  4:48 [PATCH] resolve syslog imuxsock denial Sugar, David
@ 2019-11-23 15:27 ` Chris PeBenito
  0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2019-11-23 15:27 UTC (permalink / raw)
  To: Sugar, David, selinux-refpolicy

On 11/16/19 11:48 PM, Sugar, David wrote:
> I'm seeing the following error while starting rsyslog:
> Nov 17 02:01:38 localhost rsyslogd: cannot create '/run/systemd/journal/syslog': Permission denied [v8.24.0-41.el7_7.2]
> Nov 17 02:01:38 localhost rsyslogd: imuxsock does not run because we could not aquire any socket  [v8.24.0-41.el7_7.2]
> Nov 17 02:01:38 localhost rsyslogd: activation of module imuxsock failed [v8.24.0-41.el7_7.2]
> 
> With the following denials:
> type=AVC msg=audit(1573958708.773:1896): avc:  denied  { create } for  pid=2347 comm="rsyslogd" name="syslog" scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_runtime_t:s0 tclass=sock_file permissive=1
> type=AVC msg=audit(1573958708.773:1897): avc:  denied  { setattr } for  pid=2347 comm="rsyslogd" name="syslog" dev="tmpfs" ino=19368 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:syslogd_runtime_t:s0 tclass=sock_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 3d5b57f1..42d77a24 100644
> --- a/policy/modules/system/logging.te
> +++ b/policy/modules/system/logging.te
> @@ -432,6 +432,8 @@ allow syslogd_t syslogd_runtime_t:file map;
>   files_pid_filetrans(syslogd_t, syslogd_runtime_t, file)
>   allow syslogd_t syslogd_runtime_t:dir create_dir_perms;
>   
> +allow syslogd_t syslogd_runtime_t:sock_file { create setattr };
> +
>   kernel_read_crypto_sysctls(syslogd_t)
>   kernel_read_system_state(syslogd_t)
>   kernel_read_network_state(syslogd_t)

Merged.

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17  4:48 [PATCH] resolve syslog imuxsock denial Sugar, David
2019-11-23 15:27 ` Chris PeBenito

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git