Commit Graph

1252 Commits

Author SHA1 Message Date
Chris PeBenito d823a4c661 spamassassin: Remove unnecessary brackets in type alias.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-04-09 09:34:57 -04:00
Chris PeBenito 5b78c1c86b spamassassin: Add missing class requires in systemd interfaces.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-04-09 09:34:02 -04:00
Chris PeBenito 4cff02edd2 spamassassin: Rename systemd interfaces.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-04-09 09:33:07 -04:00
Chris PeBenito b2b385891d spamassassin: Move systemd interfaces.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-04-09 09:32:25 -04:00
Russell Coker 47b44a0fc7 latest ver of trivial mail server patch
Yes mmap is the standard way of accessing the mail spool.

Removed spamd_gpg_t because there's no point to it, the separation doesn't
provide an actual benefit.

Made the other requested changes.

Signed-off-by: Russell Coker <russell@coker.com.au>
2020-04-09 09:29:10 -04:00
Chris PeBenito a2ec18d2a3 dbus, systemd: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-04-06 11:40:56 -04:00
Chris PeBenito ba3818ebcc dbus: Rename tunable to dbus_pass_tuntap_fd.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-04-06 11:40:02 -04:00
David Sommerseth 79c7859a48
dbus: Add tunable - dbus_can_pass_tuntap_fd
D-Bus services wanting to pass file descriptors for
tun/tap devices need to read/write privileges to /dev/tun.

Without this privilege the following denial will happen:

    type=AVC msg=audit(1582227542.557:3045): avc:  denied  { read write } for  pid=1741 comm="dbus-daemon" path="/dev/net/tun" dev="devtmpfs" ino=486 scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tun_tap_device_t:s0 tclass=chr_file permissive=0

This is needed by OpenVPN 3 Linux, where an unprivileged
process (openvpn3-service-client) requests a tun device
from a privileged service (openvpn3-service-netcfg) over
the D-Bus system bus.

GitHub-Issue: #190
Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-04-02 22:40:00 +02:00
Daniel Burgener 6409045cdc Change incorrect template definitions into interface definitions
Signed-off-by: Daniel Burgener <Daniel.Burgener@microsoft.com>
2020-03-28 14:08:57 -04:00
Chris PeBenito dc1a274f06 corenetwork, devices, bluetooth: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-03-22 17:20:42 -04:00
Chris PeBenito 7dc5df7ea4 Merge pull request #199 from bigon/bluetoothd 2020-03-22 17:00:06 -04:00
Laurent Bigonville 6c810a07c9 Label bluetooth daemon as bluetooth_exec_t
Signed-off-by: Laurent Bigonville <bigon@bigon.be>
2020-03-20 13:00:48 +01:00
Chris PeBenito b2cc317a64 various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-03-19 14:07:12 -04:00
Chris PeBenito 1f6ef018db networkmanager: Fix interface commenting.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-03-19 14:04:13 -04:00
Chris PeBenito ecfaae80de Merge pull request #192 from topimiettinen/raw_memory_access_boolean 2020-03-19 13:07:57 -04:00
Chris PeBenito b3959fb415 Merge pull request #196 from gtrentalancia/watch-perms 2020-03-19 13:05:42 -04:00
Guido Trentalancia 77174969ba wm: add watch perms
Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
--
 policy/modules/apps/wm.if                 |    4 ++++
 policy/modules/services/networkmanager.if |   18 ++++++++++++++++++
 2 files changed, 22 insertions(+)
2020-03-19 05:41:43 +01:00
Topi Miettinen bfb4e60edb
Make raw memory access tunable
Modern systems shouldn't need direct access to raw memory
devices (/dev/mem, /dev/kmem, /dev/mergemem, dev/oldmem, /dev/port)
anymore, so let's remove the access in most cases and make it tunable
in the rest.

Add dev_read_raw_memory_cond(), dev_write_raw_memory_cond() and
dev_wx_raw_memory_cond(), which are conditional to new boolean
allow_raw_memory_access.

Remove raw memory access for a few domains that should never have
needed it (colord_t, iscsid_t, mdamd_t, txtstat_t), should not need it
anymore (dmidecode_t, Debian devicekit_diskt_t, hald_t, hald_mac_t,
xserver_t) or the domains that should transition to different domain
for this (rpm_t, kudzu_t, dpkg_t).

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-03-16 14:06:16 +02:00
Chris PeBenito aafca49ae8 Merge pull request #137 from bigon/aptcacher 2020-03-08 15:44:52 -04:00
Chris PeBenito b2f72e833b Bump module versions for release.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-29 16:54:39 -05:00
Chris PeBenito 2400f6a74c various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-17 13:34:06 -05:00
Jason Zaman adaea617cd dbus: add watch perms
avc:  denied  { watch } for  pid=10630 comm="dbus-daemon" path="/usr/share/dbus-1/accessibility-services" dev="zfs" ino=244551 scontext=staff_u:staff_r:staff_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=10622 comm="dbus-daemon" path="/etc/dbus-1/session.d" dev="zfs" ino=262694 scontext=staff_u:staff_r:staff_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dbusd_etc_t:s0 tclass=dir permissive=0
Signed-off-by: Jason Zaman <jason@perfinion.com>
2020-02-17 13:25:59 -05:00
Jason Zaman dd84b117e2 policykit devicekit: Add watch perms
avc:  denied  { watch } for  pid=12488 comm="gmain" path="/etc" dev="zfs" ino=1436 scontext=system_u:system_r:devicekit_disk_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=6452 comm="gmain" path="/run/ConsoleKit" dev="tmpfs" ino=17611 scontext=system_u:system_r:policykit_t:s0-s0:c0.c1023 tcontext=system_u:object_r:consolekit_runtime_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=6452 comm="gmain" path="/usr/share/polkit-1/actions" dev="zfs" ino=235638 scontext=system_u:system_r:policykit_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=6452 comm="gmain" path="/etc/polkit-1/rules.d" dev="zfs" ino=268215 scontext=system_u:system_r:policykit_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0
Signed-off-by: Jason Zaman <jason@perfinion.com>
2020-02-17 13:25:59 -05:00
Jason Zaman 9f8194fdf4 colord: add watch perms
avc:  denied  { watch } for  pid=12656 comm="gmain" path="/var/lib/colord/icc" dev="zfs" ino=100677 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:colord_var_lib_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=12656 comm="gmain" path="/usr/share/color/icc/colord" dev="zfs" ino=67586 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=0
Signed-off-by: Jason Zaman <jason@perfinion.com>
2020-02-17 13:25:59 -05:00
Jason Zaman 575f9494e7 cron: watch cron spool
avc:  denied  { watch } for  pid=7402 comm="crond" path="/var/spool/cron/crontabs" dev="zfs" ino=7627 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_spool_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=7402 comm="crond" path="/etc/cron.d" dev="zfs" ino=60131 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=7402 comm="crond" path="/etc/crontab" dev="zfs" ino=1749860 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=file permissive=0
Signed-off-by: Jason Zaman <jason@perfinion.com>
2020-02-17 13:25:59 -05:00
Jason Zaman deafc9df7a accountsd: Add watch perms
avc:  denied  { watch } for  pid=7134 comm="gmain" path="/var/log" dev="zfs" ino=7092 scontext=system_u:system_r:accounts _t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=0
avc:  denied  { watch } for  pid=7134 comm="gmain" path="/etc" dev="zfs" ino=1436 scontext=system_u:system_r:accountsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0
Signed-off-by: Jason Zaman <jason@perfinion.com>
2020-02-17 13:25:59 -05:00
Chris PeBenito e272f7cba9 entropyd, networkmanager, ntp: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-16 11:26:49 -05:00
Chris PeBenito 87987636c1 Merge pull request #184 from bauen1/fix-systemd-ntp 2020-02-16 11:12:19 -05:00
Chris PeBenito 3bef33fe20 Merge pull request #182 from topimiettinen/add-iwd-as-networkmanager 2020-02-16 11:11:59 -05:00
Chris PeBenito 26be8f09a6 Merge pull request #181 from topimiettinen/add-jitterentropy-as-entropyd 2020-02-16 11:06:05 -05:00
Topi Miettinen cdd292a26d
Consider iwd equivalent to NetworkManager etc.
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-02-15 16:39:38 +02:00
bauen1 b4ef3f335f
ntp: watch systemd networkd runtime dirs
This is required for correct function after linux 5.4
2020-02-12 16:24:25 +01:00
Topi Miettinen 1d6982b0ea
Consider jitterentropy to belong to entropyd family
Also allow jitterentropy (or rather some libs) to read
/proc/crypto/fips_enabled.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-02-12 00:00:21 +02:00
Laurent Bigonville 1911cd11f4 Add policy for acngtool
Signed-off-by: Laurent Bigonville <bigon@bigon.be>
2020-02-09 15:57:50 +01:00
Laurent Bigonville 0136b586ef Add policy for apt-cacher-ng
Signed-off-by: Laurent Bigonville <bigon@bigon.be>
2020-02-09 15:57:50 +01:00
bauen1 9ecc4103af
consolesetup: add policy for console-setup 2020-02-04 19:34:53 +01:00
Daniel Burgener 03d39a69a1 Remove unneeded semicolons after interface and macro calls
Signed-off-by: Daniel Burgener <dburgener@tresys.com>
2020-01-31 14:41:28 -05:00
Daniel Burgener 36c3a7903c Fix situations where require blocks in interfaces listed types not actually referenced by that interface
Signed-off-by: Daniel Burgener <dburgener@tresys.com>
2020-01-24 08:18:55 -05:00
Chris PeBenito 3e91c2264f various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-17 10:50:13 -05:00
Chris PeBenito 6547682580 Merge pull request #155 from pebenito/initial-5-4-fixes 2020-01-17 10:49:41 -05:00
Chris PeBenito adeb4b271d Merge pull request #162 from dburgener/fix-if-require-issues 2020-01-17 09:05:38 -05:00
Chris PeBenito e2ac94d08d dbus: Add directory watches.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-01-16 15:53:36 -05:00
Chris PeBenito f064342f41 systemd: Add filesystem watches.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-01-16 15:53:36 -05:00
Daniel Burgener c57198a000 Remove uneeded types from interfaces where types were added 2020-01-16 15:32:09 -05:00
Daniel Burgener 70a1c1ede2 Add requires to interfaces that reference types or attributes without requiring them
Signed-off-by: Daniel Burgener <dburgener@tresys.com>
2020-01-16 09:59:56 -05:00
Chris PeBenito f4dfd9e245 domain, snort: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-16 09:55:00 -05:00
Stephen Smalley 5fd175fa45 Rename obsolete netlink_firewall_socket and netlink_ip6fw_socket classes
The implementation for NETLINK_FIREWALL and NETLINK_IP6_FW protocols
was removed from the kernel in commit
d16cf20e2f2f13411eece7f7fb72c17d141c4a84 ("netfilter: remove ip_queue
support") circa Linux 3.5.  Consequently, kernels >= 3.5 should never
perform permission checks on these classes although they remained
defined in the SELinux kernel classmap until the netlink classes
were updated by
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6c6d2e9bde1c1c87a7ead806f8f5e2181d41a652
circa Linux v4.2.

Removing these class definitions would break legacy userspace that relies
upon stable values for the userspace security class definitions since it
will perturb those values by removing classes that preceded them.  dbus-daemon
in particular is known to break if its dbus class changes at runtime,
which could occur upon a policy reload that removes these classes.
Fixing this requires ensuring that dbus-daemon looks up the appropriate
class value on each use or upon policy reload, via userspace interfaces
such as selinux_check_access(), string_to_security_class(), and/or
selinux_set_callback(SELINUX_CB_POLICYLOAD, ...) with a callback function
that remaps the class value if needed.  Other userspace policy enforcers
are believed to have been updated in recent versions but older versions
may break upon such a change.

Hence, this change renames these classes with obsolete_ prefixes and
removes all rules referencing them from refpolicy, thereby preserving
the class numbering for subsequent classes while making it clear that
these classses are no longer meaningful for modern kernels.

This change does however create a potential compatibility break for
kernels < 3.5, since the policy will cease to define the kernel class
names and therefore the kernel will handle permission checks on the
class based on the handle_unknown setting in policy.  For most
Linux distributions, this will default to allow and therefore avoid
breaking userspace but will fail open.  For kernels < 2.6.33 (i.e.
the dynamic class/perm discovery support), the presence of a class
in policy with the same number but a different name than the kernel
class will cause the policy load to fail entirely.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2020-01-16 09:17:56 -05:00
Chris PeBenito 7af9eb3e91 various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-15 10:42:45 -05:00
Stephen Smalley 161bda392e access_vectors: Remove unused permissions
Remove unused permission definitions from SELinux.
Many of these were only ever used in pre-mainline
versions of SELinux, prior to Linux 2.6.0.  Some of them
were used in the legacy network or compat_net=1 checks
that were disabled by default in Linux 2.6.18 and
fully removed in Linux 2.6.30.

The corresponding classmap declarations were removed from the
mainline kernel in:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42a9699a9fa179c0054ea3cf5ad3cc67104a6162

Permissions never used in mainline Linux:
file swapon
filesystem transition
tcp_socket { connectto newconn acceptfrom }
node enforce_dest
unix_stream_socket { newconn acceptfrom }

Legacy network checks, removed in 2.6.30:
socket { recv_msg send_msg }
node { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
netif { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2020-01-14 13:41:50 -05:00
Chris PeBenito 79b987eea8 systemd, virt, netutils: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-08 14:06:37 -05:00