Commit Graph

2319 Commits

Author SHA1 Message Date
Dominick Grift
3c9fa86f15 systemd: Add support for --log-target
https://www.freedesktop.org/software/systemd/man/systemd.html#--log-target=

see for discussion: https://github.com/TresysTechnology/refpolicy/pull/22

v2: Add comment about dontaudit rule

Signed-off-by: Dominick Grift <dac.override@gmail.com>
2016-03-31 08:22:50 -04:00
Chris PeBenito
f72f1a48d9 Module version bump for Debian fc entries from Laurent Bigonville. 2016-03-28 09:59:02 -04:00
Chris PeBenito
f839472baa Merge branch 'selinux-1' of https://github.com/bigon/refpolicy 2016-03-28 09:58:09 -04:00
Laurent Bigonville
af61f22e24 Add some labels for SELinux tools path in Debian 2016-03-25 22:35:17 +01:00
Chris PeBenito
1cfba86fc0 Update su for libselinux-2.5 changes.
su is linked against libselinux via pam_unix.so.  Use the selinuxutil
interface so future libselinux changes are pulled in.
2016-03-25 10:24:59 -04:00
Chris PeBenito
464c5df247 Reduce broad entrypoints for unconfined domains.
Entrypoints into unconfined domains, like with confined domains, should be
tightly controlled to make arbitrary code execution more difficult.
2016-03-22 15:43:30 -04:00
Chris PeBenito
ef25ff32b6 Update contrib. 2016-03-22 15:35:03 -04:00
Chris PeBenito
5db5b62c42 Module version bump for several Arch fixes from Nicolas Iooss. 2016-03-22 15:34:53 -04:00
Chris PeBenito
84a8181a8d Merge branch 'kdevtmpfs-unlink' of https://github.com/fishilico/selinux-refpolicy-patched 2016-03-22 15:27:21 -04:00
Chris PeBenito
df8488bf69 Merge branch 'dev_setattr_dlm_control-typo' of https://github.com/fishilico/selinux-refpolicy-patched 2016-03-22 15:26:42 -04:00
Nicolas Iooss
4bf3dfaeb2 Allow kdevtmpfs to unlink fixed disk devices
When a device gets removed, for example with "cryptsetup close",
kdevtmpfs (a kernel thread) removes its entry from devtmpfs filesystem:

    avc:  denied  { unlink } for  pid=48 comm="kdevtmpfs"
    name="dm-4" dev="devtmpfs" ino=144111
    scontext=system_u:system_r:kernel_t
    tcontext=system_u:object_r:fixed_disk_device_t tclass=blk_file

Allow this access on systems using systemd.
2016-03-19 11:12:28 +01:00
Nicolas Iooss
242fa9347a Fix typo in dev_setattr_dlm_control interface requirements 2016-03-19 10:54:40 +01:00
Nicolas Iooss
e43b1e2ffc Do not label /usr/lib/gvfs/libgvfscommon.so as bin_t
On Arch Linux, /usr/lib/gvfs directory contains both executable files
(gvfsd, gvfs-udisks2-volume-monitor...) and libraries (libgvfscommon.so
and libgvfsdaemon.so).  As all executable files are prefixed with
"gfvs", so use this to distinguish them with the libraries.

This fixes the following AVC denials, reported from geoclue service
using a library wrongly labelled bin_t:

    avc:  denied  { read } for  pid=14872 comm="geoclue"
    name="libgvfscommon.so" dev="dm-0" ino=3152594
    scontext=system_u:system_r:geoclue_t
    tcontext=system_u:object_r:bin_t tclass=file permissive=1

    avc:  denied  { open } for  pid=14872 comm="geoclue"
    path="/usr/lib/gvfs/libgvfscommon.so" dev="dm-0" ino=3152594
    scontext=system_u:system_r:geoclue_t
    tcontext=system_u:object_r:bin_t tclass=file permissive=1

     avc:  denied  { execute } for  pid=14872 comm="geoclue"
     path="/usr/lib/gvfs/libgvfscommon.so" dev="dm-0" ino=3152594
     scontext=system_u:system_r:geoclue_t
     tcontext=system_u:object_r:bin_t tclass=file permissive=1
2016-03-19 10:39:17 +01:00
Nicolas Iooss
4b1cd5b369 Label some user session DBus services as bin_t 2016-03-19 10:39:17 +01:00
Nicolas Iooss
2cedfc0ada Label gedit plugins properly on Arch Linux 2016-03-19 10:39:17 +01:00
Nicolas Iooss
55f64a8112 Label system-config-printer applet properly on Arch Linux
It is used by system-config-printer, as shown by these AVC denials:

    avc:  denied  { execute } for  pid=1061 comm="system-config-p"
    name="applet.py" dev="dm-0" ino=9568316
    scontext=sysadm_u:sysadm_r:sysadm_t tcontext=system_u:object_r:usr_t
    tclass=file permissive=1

    avc:  denied  { execute_no_trans } for  pid=1061
    comm="system-config-p"
    path="/usr/share/system-config-printer/applet.py" dev="dm-0"
    ino=9568316 scontext=sysadm_u:sysadm_r:sysadm_t
    tcontext=system_u:object_r:usr_t tclass=file permissive=1
2016-03-19 10:39:17 +01:00
Nicolas Iooss
90599ef760 Label TexLive scripts bin_t
These scripts can be run by users.
2016-03-19 10:39:17 +01:00
Chris PeBenito
0e133c7d74 Module version bump for tboot utils from Luis Ressel and systemd fix from Jason Zaman.
Update contrib.
2016-03-08 08:52:25 -05:00
Jason Zaman
7a1ffd80e6 system/init: move systemd_ interfaces into optional_policy
When ifdef systemd is enabled, some interfaces from systemd are called
unconditionally. This makes migrating from non-systemd to systemd
complicated since init is part of base and systemd is not so loading
fails. Moving them into optional_policy fixes this.
2016-03-08 08:36:16 -05:00
Luis Ressel
3b586829cc Allow sysadm to run txt-stat. 2016-03-08 08:36:04 -05:00
Chris PeBenito
397c248c31 Module version bump for getty patch from Luis Ressel. 2016-03-07 10:15:37 -05:00
Luis Ressel
7216d000d9 Allow getty the sys_admin capability
It's required for agetty on kernels with a recent grsecurity patchset.
(The denial itself has been showing up for quite some time, but it
hasn't had any obvious ill effects until recently.)
2016-03-07 10:15:37 -05:00
Chris PeBenito
b5e8ec6346 Module version bump for iptables/firewalld patch from Laurent Bigonville. 2016-02-16 09:48:37 -05:00
Laurent Bigonville
a54d52058d Allow {eb,ip,ip6}tables-restore to read files in /run/firewalld
Since version 0.4.0, firewalld uses *tables-restore to speedup the
load of the rules
2016-02-13 10:06:58 +01:00
Chris PeBenito
6b9f92999b Update contrib. 2016-02-10 12:58:54 -05:00
Chris PeBenito
137cca377d Module version bump for iptables fc entries from Laurent Bigonville and Lukas Vrabec. 2016-02-10 10:36:09 -05:00
Chris PeBenito
35baa47094 Whitespace fix in iptables.fc. 2016-02-10 10:34:51 -05:00
Laurent Bigonville
8f19ffbde8 Label /var/run/ebtables.lock as iptables_var_run_t.
This lock file is used on debian since version 2.0.10.4-3.2. This is
also used on Fedora.
2016-02-08 22:51:30 +01:00
Lukas Vrabec
e16f8a18fd Label /var/run/xtables.lock as iptables_var_run_t. 2016-02-08 22:43:27 +01:00
Chris PeBenito
59bf54e0a1 Update contrib. 2016-02-08 08:53:13 -05:00
Chris PeBenito
d35f6b7c58 Module version bump for ipset fc entry from Laurent Bigonville. 2016-02-08 08:33:08 -05:00
Laurent Bigonville
958cb89462 Add label for /sbin/ipset 2016-02-05 01:14:30 +01:00
Chris PeBenito
1240e0ab7b Module version bump for efivarfs patches from Dan Walsh, Vit Mojzis, and Laurent Bigonville 2016-02-03 08:49:39 -05:00
Laurent Bigonville
05709538a6 Allow logind to read efivarfs files 2016-02-03 14:14:38 +01:00
Vit Mojzis
17bd45dab9 Add interface to allow reading files in efivarfs - contains Linux Kernel configuration options for UEFI systems (UEFI Runtime Variables) 2016-02-03 13:33:43 +01:00
Dan Walsh
498df2c5b9 Add label for efivarfs 2016-02-03 13:24:43 +01:00
Chris PeBenito
ea321f9589 Update contrib. 2016-02-02 09:36:46 -05:00
Chris PeBenito
4a0e5fffc7 Module version bump for patches from Nicolas Iooss and Grant Ridder. 2016-02-02 09:35:30 -05:00
Nicolas Iooss
82cdf3b724 Label /sys/kernel/debug/tracing filesystem
tracefs filesystem is automounted in /sys/kernel/debug/tracing directory
since Linux 4.1.  Label this filesystem properly.

Linux commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f76180bc07abc399977bfbe8c43bf58c4570e893
2016-02-02 09:33:34 -05:00
Grant Ridder
976af3482a Add redis-sentinel port to redis network_port def 2016-02-02 09:33:34 -05:00
Nicolas Iooss
c82a479ed8 Fix interface descriptions when duplicate ones are found
Distinct interfaces should have different comments
2016-01-19 00:17:34 +01:00
Nicolas Iooss
29d543da4c Fix typos in comments from corenetwork module 2016-01-19 00:17:05 +01:00
Nicolas Iooss
80d74c2408 Fix typo in init_dbus_chat requirements
init_dbus_chat interface required initrc_t type but used init_t type.
2016-01-19 00:17:05 +01:00
Chris PeBenito
4e487ffe3d Module version bump for systemd audit_read capability from Laurent Bigonville 2016-01-15 09:50:01 -05:00
Laurent Bigonville
c94097864a Allow systemd the audit_read capability
At early boot, I get the following messages in dmesg:

audit: type=1400 audit(1452851002.184:3): avc:  denied  { audit_read } for  pid=1 comm="systemd" capability=37 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=capability2 permissive=1
systemd[1]: Listening on Journal Audit Socket.
2016-01-15 11:43:45 +01:00
Chris PeBenito
24e6175132 Module version bump for systemd PrivateNetwork patch from Nicolas Iooss 2016-01-11 13:26:55 -05:00
Nicolas Iooss
25bc2d5c1d Allow systemd services to use PrivateNetwork feature
systemd creates a new network namespace for services which are using
PrivateNetwork=yes.

In the implementation, systemd uses a socketpair as a storage buffer for
the namespace reference file descriptor (c.f.
https://github.com/systemd/systemd/blob/v228/src/core/namespace.c#L660).
One end of this socketpair is locked (hence the need of "lock" access to
self:unix_dgram_socket for init_t) while systemd opens
/proc/self/ns/net, which lives in nsfs.

While at it, add filesystem_type attribute to nsfs_t.
2016-01-11 13:17:16 -05:00
Chris PeBenito
619b4adf78 Add a type and genfscon for nsfs. 2016-01-11 09:02:39 -05:00
Chris PeBenito
001cd53e2a Module version bump for Debian Xorg fc fixes from Laurent Bigonville 2016-01-07 13:11:50 -05:00
Laurent Bigonville
fb4f17e4b0 Label Xorg server binary correctly on Debian
On Debian, /usr/bin/Xorg is only a shell script which executes
/usr/lib/xorg/Xorg.wrap, which is a SUID binary wrapper around
/usr/lib/xorg/Xorg.
2016-01-07 16:48:08 +01:00