Commit Graph

2988 Commits

Author SHA1 Message Date
David Sugar 75dd54edc7 Allow clamd to use sent file descriptor
This allows a process connecting to a local clamd server to send
an open file descriptor for A/V scanning.  This still requires
the file type to be readable by clamd.

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2018-11-09 19:09:49 -05:00
David Sugar 2fa76a4b9e Add interfaces to control clamav_unit_t systemd services
Signed-off-by: Dave Sugar <dsugar@tresys.com>
2018-11-09 19:06:01 -05:00
David Sugar 81953475a5 Interface to add domain allowed to be read by ClamAV for scanning.
Create an attribute for types that clamd_t and clamscan_t can read
(for scanning purposes) rather than require clamav.te to be modified.

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2018-11-09 19:06:01 -05:00
David Sugar 03f248c9e1 Allow clamd_t to read /proc/sys/crypt/fips_enabled
To fix the following denials:
type=AVC msg=audit(1540821927.216:215): avc:  denied  { search } for
pid=1726 comm="clamd" name="crypto" dev="proc" ino=68
scontext=system_u:system_r:clamd_t:s0
tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=dir
type=AVC msg=audit(1540821927.216:215): avc:  denied  { read } for
pid=1726 comm="clamd" name="fips_enabled" dev="proc" ino=69
scontext=system_u:system_r:clamd_t:s0
tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file
type=AVC msg=audit(1540821927.216:215): avc:  denied  { open } for
pid=1726 comm="clamd" path="/proc/sys/crypto/fips_enabled" dev="proc"
ino=69 scontext=system_u:system_r:clamd_t:s0
tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file
type=AVC msg=audit(1540821927.216:216): avc:  denied  { getattr } for
pid=1726 comm="clamd" path="/proc/sys/crypto/fips_enabled" dev="proc"
ino=69 scontext=system_u:system_r:clamd_t:s0
tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2018-11-09 19:06:01 -05:00
David Sugar f0047d0247 Add interface udev_run_domain
This interface is useful when using the 'RUN' option in UDEV rules where udev will be executing a user executable to perform some action.  This interface allows a domain transition to occur for the run action.

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2018-11-09 19:04:22 -05:00
Chris PeBenito 35463351a0 clamav, ssh, init: Module version bump. 2018-10-27 15:10:10 -04:00
Luis Ressel 9dd80c6a67 system/init: Give init_spec_daemon_domain()s the "daemon" attribute
init_daemon_domain() applies this attribute too.
2018-10-27 14:56:34 -04:00
Luis Ressel a42ff404bd services/ssh: Don't audit accesses from ssh_t to /dev/random
OpenSSL 1.1 always opens both /dev/urandom and /dev/random, which
generates spurious denial messages for ssh_t, ssh_keygen_t and probably
various other domains too.

The code only uses /dev/random as a fallback and can cope with an open()
failure just fine, so I'm dontauditing the access. However, I don't have
strong feelings about this -- if someone would prefer to allow these
accesses instead, I'd be okay with that too.
2018-10-27 14:56:34 -04:00
David Sugar 1941eefa13 Interface to allow reading of virus signature files.
Signed-off-by: Dave Sugar <dsugar@tresys.com>
2018-10-27 14:56:34 -04:00
Chris PeBenito 66a337eec6 obj_perm_sets.spt: Add xdp_socket to socket_class_set. 2018-10-23 17:18:43 -04:00
Laurent Bigonville 109ab3296b Add xdp_socket security class and access vectors
Added in 4.18 release
2018-10-21 13:01:22 +02:00
Chris PeBenito 5a3207fb45 miscfiles: Module version bump. 2018-10-14 13:55:21 -04:00
Luis Ressel 75dcc276c0 miscfiles: Label /usr/share/texmf*/fonts/ as fonts_t
fontconfig can be configure to use the TeX Live fonts in addition to
/usr/share/fonts/.
2018-10-14 13:50:27 -04:00
Chris PeBenito e3eba7b7ff logrotate: Module version bump. 2018-10-13 13:39:18 -04:00
Luis Ressel 14b4c0c8c7 Realign logrotate.fc, remove an obvious comment 2018-10-13 13:39:18 -04:00
Luis Ressel a604ae7ca2 Add fc for /var/lib/misc/logrotate.status
Some distros configure logrotate to put its status file somewhere else
than the default /var/lib/logrotate.status. Debian puts it in
/var/lib/logrotate/, and Gentoo uses /var/lib/misc/.
2018-10-13 13:39:18 -04:00
Chris PeBenito 65da822c1b Remove unused translate permission in context userspace class.
mcstransd never implemented this permission.  To keep permission indices
lined up, replace the permission with "unused_perm" to make it clear that
it has no effect.
2018-10-13 13:39:18 -04:00
Laurent Bigonville 606e486876 policy/support/obj_perm_sets.spt: modify indentation of mmap_file_perms to make sepolgen-ifgen happy
Currently, sepolgen-ifgen fails with the following error:
  /usr/share/selinux/refpolicy/include/support/obj_perm_sets.spt: Syntax error on line 157 ` [type=TICK]
  error parsing headers
  error parsing file /usr/share/selinux/refpolicy/include/support/obj_perm_sets.spt: could not parse text: "/usr/share/selinux/refpolicy/include/support/obj_perm_sets.spt: Syntax error on line 157 ` [type=TICK]"
2018-10-09 12:53:44 +02:00
Chris PeBenito bf16b6d4b9 xserver: Module version bump. 2018-10-03 22:08:23 -04:00
Luis Ressel 9be8cfac19 xserver: Allow user fonts (and caches) to be mmap()ed.
Applications can optionally map fonts and fontconfig caches into memory.
miscfiles_read_fonts() already grants those perms, but it seems
xserver_use_user_fonts() was forgotten.
2018-10-03 22:07:59 -04:00
Chris PeBenito b3a1e8a8f8 corecommands: Module version bump. 2018-09-28 15:20:46 -04:00
Luis Ressel e751959925 corecommands: Fix /usr/share/apr* fc
Both apr and apr-1 are possible
2018-09-28 15:14:43 -04:00
Chris PeBenito 3899825c1c fstools: Module version bump. 2018-08-04 08:51:00 -04:00
Nicolas Iooss 094409b735 fstools: label e2mmpstatus as fsadm_exec_t
e2fsprogs 1.44.3 installs e2mmpstatus as a hard link to dumpe2fs. This
makes "restorecon -Rv /usr/bin" relabels this file with conflicting
contexts:

Relabeled /usr/bin/e2mmpstatus from system_u:object_r:fsadm_exec_t to system_u:object_r:bin_t
Relabeled /usr/bin/dumpe2fs from system_u:object_r:bin_t to system_u:object_r:fsadm_exec_t

Fix this by labelling e2mmpstatus like dumpe2fs.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2018-08-04 08:50:06 -04:00
Chris PeBenito e1caae17a2 ipsec: Module version bump. 2018-07-28 09:02:22 -04:00
Yuli Khodorkovskiy 305bd29f65 ipsec: add missing permissions for pluto
When using libreswan, pluto needs permissions for building the
Security Association Database and for setting contexts on IPSec
policy and SAs.

Signed-off-by: Yuli Khodorkovskiy <yuli@crunchydata.com>
2018-07-28 08:58:34 -04:00
Chris PeBenito 9285d9f450 misc_patterns.spt: Remove unnecessary brackets. 2018-07-19 19:49:21 -04:00
Lukas Vrabec a7edcc9f2b Improve domain_transition_pattern to allow mmap entrypoint bin file.
In domain_transition_pattern there is rule:
allow $1 $2:file { getattr open read execute };

map permission is missing here, which is generating lot of AVC.
Replacing permissions with mmap_exec_file_perms set.
2018-07-19 19:48:08 -04:00
Chris PeBenito e9eec95de4 devices: Module version bump. 2018-07-15 16:56:51 -04:00
Jagannathan Raman ce4fe74fe3 vhost: Add /dev/vhost-scsi device of type vhost_device_t.
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
2018-07-15 16:43:45 -04:00
Chris PeBenito d301e83161 mozilla, devices, selinux, xserver, init, iptables: Module version bump. 2018-07-10 20:11:40 -04:00
Jason Zaman 6bf506ec68 iptables: fcontexts for 1.8.0
The binary changed from /sbin/xtables-multi to xtables-legacy-multi and
xtables-nft-multi
2018-07-10 17:25:11 -04:00
Jason Zaman d53047dc58 Allow map xserver_misc_device_t for nvidia driver 2018-07-10 17:25:11 -04:00
Jason Zaman 871d47888b xserver: label .cache/fontconfig as user_fonts_cache_t 2018-07-10 17:25:11 -04:00
Jason Zaman 3c4f0dfaae mozilla: xdg updates 2018-07-10 17:25:11 -04:00
Jason Zaman 181298ab8b selinux: compute_access_vector requires creating netlink_selinux_sockets 2018-07-10 17:25:11 -04:00
Chris PeBenito 65e8f758ca Bump module versions for release. 2018-07-01 11:02:33 -04:00
Chris PeBenito 87b0512036 xdg, xserver, mplayer, games: Module version bump. 2018-06-24 20:32:02 -04:00
Jason Zaman 452c100212 apps: rw mesa_shader_cache 2018-06-24 19:11:14 -04:00
Jason Zaman 6f32775885 xserver: Add mesa_shader_cache for GLSL in ~/.cache/mesa_shader_cache/ 2018-06-24 19:11:14 -04:00
Jason Zaman 5b85f31124 xdg: Introduce xdg_search_cache_dirs 2018-06-24 19:11:14 -04:00
Jason Zaman 49a5d06120 xdg: filetrans should not add filetrans from user_home_dir
SELinux 2.8 is stricter with duplicate filetrans and these rules cause
problems if a domain needs more than one xdg dir.

Domains should call xdg_generic_user_home_dir_filetrans_data directly if
needed.
2018-06-24 19:11:14 -04:00
Jason Zaman b9bbe78f9e xdg: Add map perms, also make lnk_file, dirs consistent 2018-06-24 19:11:14 -04:00
Chris PeBenito a6313231d6 sysnetwork: Module version bump. 2018-06-23 10:50:14 -04:00
Laurent Bigonville 66a0e1b8eb Label /etc/hosts.allow as net_conf_t
/etc/hosts.deny is labeled as net_conf_t so it makes sense to label
hosts.allow the same way

Signed-off-by: Laurent Bigonville <bigon@bigon.be>
2018-06-23 10:50:01 -04:00
Chris PeBenito 3ab07a0e1e Move all files out of the old contrib directory. 2018-06-23 10:38:58 -04:00
Chris PeBenito 0f3132c795 Re-add policy modules from old refpolicy-contrib submodule. 2018-06-23 09:00:56 -04:00
Chris PeBenito afb14bd300 Remove refpolicy-contrib submodule. 2018-06-23 08:55:49 -04:00
Chris PeBenito 54f0118bc7 XDG: Module version bump. 2018-06-10 13:40:20 -04:00
Jason Zaman 8bb4fdfc29 userdom: remove filetrans from userdom_user_content_access_template 2018-06-10 13:23:58 -04:00