From: Russell Coker <russell@coker.com.au>
To: Dominick Grift <dominick.grift@defensec.nl>
Cc: selinux-refpolicy@vger.kernel.org
Subject: Re: [PATCH] matrixd (synapse) policy
Date: Tue, 19 Jan 2021 10:33:30 +1100 [thread overview]
Message-ID: <9533895.9IaMh57lMM@liv> (raw)
In-Reply-To: <ypjlim7umgh1.fsf@defensec.nl>
On Tuesday, 19 January 2021 2:07:06 AM AEDT Dominick Grift wrote:
> > +allow matrixd_t self:fifo_file rw_file_perms;
> > +allow matrixd_t self:tcp_socket create_stream_socket_perms;
> > +allow matrixd_t self:netlink_route_socket rw_netlink_socket_perms;
>
> r_netlink_route_socket_perms probably
r_netlink_socket_perms works. There isn't a r_netlink_route_socket_perms.
> > +corenet_tcp_connect_http_port(matrixd_t)
> > +corenet_tcp_connect_http_cache_port(matrixd_t)
> > +corenet_udp_bind_generic_port(matrixd_t)
> > +corenet_tcp_bind_http_port(matrixd_t)
> > +corenet_udp_bind_reserved_port(matrixd_t)
> > +
> > +allow matrixd_t self:udp_socket create_socket_perms;
> > +allow matrixd_t self:unix_dgram_socket { create getopt setopt write };
>
> create_socket_perms
Done.
> > +# https://cffi.readthedocs.io/en/latest/using.html#callbacks
> > +allow matrixd_t self:process execmem;
> > +
> > +can_exec(matrixd_t, { matrixd_tmp_t matrixd_var_t })
>
> Are you sure that it requires "execute_no_trans" here and not just "map
> execute"? Can you show the avc denials that prompted this rule to be added?
I've removed that line and haven't been able to recreate whatever made me add
it. I'll submit a new patch without it.
> > +
> > +kernel_read_system_state(matrixd_t)
> > +kernel_search_fs_sysctls(matrixd_t)
> > +kernel_read_vm_overcommit_sysctl(matrixd_t)
> > +kernel_search_vm_sysctl(matrixd_t)
> > +
> > +corecmd_exec_bin(matrixd_t)
> > +corecmd_shell_entry_type(matrixd_t)
>
> Why would the matrixd_t domain be entered via shell_exec_t? Can you show
> the avc denials that prompted this rule to be added?
corecmd_shell_entry_type() wasn't needed.
Thanks for your review.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
prev parent reply other threads:[~2021-01-18 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 14:47 [PATCH] matrixd (synapse) policy Russell Coker
2021-01-18 15:07 ` Dominick Grift
2021-01-18 23:33 ` Russell Coker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9533895.9IaMh57lMM@liv \
--to=russell@coker.com.au \
--cc=dominick.grift@defensec.nl \
--cc=selinux-refpolicy@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.