Commit Graph

4543 Commits

Author SHA1 Message Date
Anthony PERARD 86479f7118 Update for Xen 4.7
Since Xen 4.7, /dev/xen/privcmd is used instead of /proc/xen/privcmd.
Add the device into the policy so `xenstored` can work.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2017-08-06 11:19:29 -04:00
Guido Trentalancia ff8675f1c8 userdomain: allow netlink_kobject_uvent_socket creation
Not auditing this turns out to be the wrong choice for
several reasons.

For normal application functioning the user domain
should be able to create netlink_kobject_uvent_socket
sockets.

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
2017-08-06 11:14:37 -04:00
Chris PeBenito 794ed7efd0 Update Changelog and VERSION for release. 2017-08-05 12:59:42 -04:00
Chris PeBenito aa0eecf3e3 Bump module versions for release. 2017-08-05 12:59:42 -04:00
Chris PeBenito acac1fcf4e init: Add NoNewPerms support for systemd. 2017-08-05 12:22:05 -04:00
Chris PeBenito c51b772d2f Add cgroup_seclabel policycap. 2017-08-05 12:15:02 -04:00
Chris PeBenito 1637a8b407 Add nnp_nosuid_transition policycap and related class/perm definitions. 2017-08-05 12:13:21 -04:00
Chris PeBenito 933280d8f7 Enable extended_socket_class policy capability; 2017-08-05 12:01:00 -04:00
Chris PeBenito fc24afc454 travis-ci: Update to 2.7 userspace release. 2017-08-05 11:56:27 -04:00
Chris PeBenito 95ab6e9524 README: Update build requirements.
Closes #124
2017-07-19 21:19:43 -04:00
Chris PeBenito 4680d9c659 netutils: Module version bump for patch from Luis Ressel. 2017-06-18 19:26:29 -04:00
Luis Ressel b6fe74c67c netutils: Allow tcpdump to reduce its capability bounding set 2017-06-18 19:23:21 -04:00
Luis Ressel 261e2772d1 netutils: Add some permissions required by nmap to traceroute_t
nmap currently also needs "self:socket create", but I've submitted a
kernel patch to ameliorate this.
2017-06-18 19:23:13 -04:00
Luis Ressel afe26f2e2f netutils: Mix nmap perms in with the other traceroute_t perms 2017-06-18 19:23:02 -04:00
Chris PeBenito 6293813020 Module version bump for patches from cgzones. 2017-06-12 18:48:58 -04:00
cgzones ce7aa47ff5 iptables: update
v2:
 - do not remove interfaces superseded by auth_use_nsswitch()
2017-06-12 18:42:53 -04:00
cgzones ea74a35ba7 netutils: update
v2:
 - keep files_read_etc_files interfaces
2017-06-12 18:41:56 -04:00
cgzones c6f76058dc chkrootkit: add interfaces and sysadm permit
v2:
 - add bin_t fc to corecommands
2017-06-12 18:41:56 -04:00
Chris PeBenito 5ab11a8454 Module version bump for patches from cgzones. 2017-06-08 18:53:51 -04:00
cgzones 4d22001265 iptables: align file contexts 2017-06-08 18:43:48 -04:00
cgzones 9ab63a1bdf rkhunter: add interfaces for rkhunter module and sysadm permit 2017-06-08 18:22:53 -04:00
Chris PeBenito cf8dbdc5e4 miscfiles: Module version bump for patch from Luis Ressel. 2017-06-07 19:26:06 -04:00
Luis Ressel 2da36b7d71 system/miscfiles: Generalize the man_t fc's
This won't match subdirectories of /usr/lib, but that shouldn't be a
problem, since we have "allow domain lib_t ..." anyway.

We can't match on "/usr/(.*/)?man(/.*)?", since that'd result in a few
false positives; in particular, the files
  /usr/share/xmlto/format/docbook/man
  /usr/share/bash-completion/completions/man
2017-06-07 19:19:22 -04:00
Guido Trentalancia 89b53fafa9 fc_sort: avoid compiler warning/error
Fix a "-Werror=implicit-fallthrough" compiler warning/error on
the switch statement.

This third version (v3) fixes a bug introduced in the first
version and improves the style over the second version.

Signed-off-by: Guido Trentalancia <guido at trentalancia.com>
2017-06-07 19:13:28 -04:00
Chris PeBenito 01311965dd gpg: Module version bump for patch from Guido Trentalancia. 2017-06-06 20:10:47 -04:00
Chris PeBenito 89d1b3a71e Module version bumps for patches from Jason Zaman. 2017-06-04 20:45:23 -04:00
Chris PeBenito ff041dd6fc filesystem: Fix error in fs_cgroup_filetrans(). 2017-06-04 20:45:13 -04:00
Jason Zaman b93c403dd7 filesystem: introduce fs_cgroup_filetrans interface 2017-06-04 20:24:51 -04:00
Chris PeBenito 2749bddae8 Module version bumps for patches from Jason Zaman. 2017-05-31 21:09:50 -04:00
Jason Zaman d49027dc40 dirmngr: add to roles 2017-05-31 20:40:47 -04:00
Chris PeBenito 1a7a723891 Update contrib. 2017-05-25 21:05:38 -04:00
Chris PeBenito 602b77236d Module version bump for mmap fixes from Stephen Smalley. 2017-05-24 19:58:32 -04:00
Stephen Smalley 7a4e93a385 refpolicy: Define and allow map permission
Kernel commit 6941857e82ae ("selinux: add a map permission check
for mmap") added a map permission check on mmap so that we can
distinguish memory mapped access (since it has different implications
for revocation).  The purpose of a separate map permission check on
mmap(2) is to permit policy to prohibit memory mapping of specific files
for which we need to ensure that every access is revalidated, particularly
useful for scenarios where we expect the file to be relabeled at runtime
in order to reflect state changes (e.g. cross-domain solution, assured
pipeline without data copying).  The kernel commit is anticipated to
be included in Linux 4.13.

This refpolicy change defines map permission for refpolicy.  It mirrors
the definition in the kernel classmap by adding it to the common
definitions for files and sockets.  This will break compatibility for
kernels that predate the dynamic class/perm mapping support (< 2.6.33,
< RHEL 6); on such kernels, one would instead need to add map permission
to the end of each file and socket access vector.

This change only allows map permission as needed, e.g. only in the
mmap_file_perms and exec_file_perms object permission sets
(since map is always required there) and only in specific interfaces
or modules where denials were observed in limited testing.

It is important to note that effective use of this permission requires
complete removal of unconfined, as otherwise unconfined domains will be
able to map all file types and therefore bypass the intended protection.
If we wanted to exclude map permission to all file types by default from
unconfined, we would need to add it to the list of permissions excluded from
files_unconfined_type in kernel/files.te.

Policies that depend on this permission not being allowed to specific file
types should also make use of neverallow rules to ensure that this is not
undermined by any allow rule, and ensure that they are performing neverallow
checking at policy build time (e.g. make validate) or runtime (e.g.
semanage.conf expand-check=1).

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2017-05-24 19:53:14 -04:00
Chris PeBenito 6c2272c613 Module version bump for infiniband policy from Daniel Jurgens. 2017-05-24 19:36:49 -04:00
Chris PeBenito 412fc7e7fd corenet/sysadm: Move lines. 2017-05-24 19:36:04 -04:00
Daniel Jurgens 25a5b24274 refpolicy: Infiniband pkeys and endports
Every Infiniband network will have a default pkey, so that is labeled.
The rest of the pkey configuration is network specific. The policy allows
access to the default and unlabeled pkeys for sysadm and staff users.
kernel_t is allowed access to all pkeys, which it needs to process and
route management datagrams.

Endports are all unlabeled by default, sysadm users are allowed to
manage the subnet on unlabeled endports. kernel_t is allowed to manage
the subnet on all ibendports, which is required for configuring the HCA.

This patch requires selinux series: "SELinux user space support for
Infiniband RDMA", due to the new ipkeycon labeling mechanism.

Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
2017-05-24 19:23:18 -04:00
Chris PeBenito 36c79fd3ee Module version bump for libmtp from Guido Trentalancia. 2017-05-22 20:20:47 -04:00
Guido Trentalancia 4f8b753f24 base: role changes for the new libmtp module
This is the base part of the policy needed to support libmtp (an
Initiator implementation of the Media Transfer Protocol).

Signed-off-by: Guido Trentalancia <guido at trentalancia.net>
2017-05-22 20:05:52 -04:00
Stephen Smalley cfe0a94feb refpolicy: Define smc_socket security class
Linux kernel commit da69a5306ab9 ("selinux: support distinctions among all
network address families") triggers a build error if a new address family
is added without defining a corresponding SELinux security class.  As a
result, the smc_socket class was added to the kernel to resolve a build
failure as part of merge commit 3051bf36c25d that introduced AF_SMC circa
Linux 4.11.  Define this security class and its access vector, note that it
is enabled as part of the extended_socket_class policy capability, and add
it to the socket_class_set macro.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2017-05-17 18:00:57 -04:00
Stephen Smalley c5cdfec50b refpolicy: Define getrlimit permission for class process
This permission was added to the kernel in commit 791ec491c372
("prlimit,security,selinux: add a security hook for prlimit")
circa Linux 4.12 in order to control the ability to get the resource
limits of another process.  It is only checked when acting on another
process, so getrlimit permission is not required for use of getrlimit(2).

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2017-05-17 18:00:50 -04:00
Chris PeBenito 57c84075e3 Update contrib 2017-05-15 18:48:58 -04:00
Chris PeBenito 8902f93b9a Module version bump for systemd fix from Krzysztof Nowicki. 2017-05-15 18:48:51 -04:00
Chris PeBenito 895eefc207 init: add comment for ProtectSystem. 2017-05-15 18:42:18 -04:00
Krzysztof Nowicki 3b5e622339 Enable /etc directory protection using ProtectSystem
Setting this service option to 'full' or 'strict' will also remount the
/etc directory. Allow this in the policy.

This fixes the systemd-networkd service, but will also positively affect
any other service using the above hardening option.
2017-05-15 18:41:00 -04:00
Chris PeBenito 3cdaad6e29 Module version bump for changes from Jason Zaman and Luis Ressel. 2017-05-11 19:54:25 -04:00
Luis Ressel a114d07fd3 system/selinuxutil: Allow semanage to execute its tmp files
Since app-admin/setools-4.1.0, some python internals try to create and
execute a file in /tmp during semanage initalization, causing semanage
to crash. Here's the backtrace (with the path
"/usr/lib64/python3.4/site-packages" replaced by "py" for brevity):

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/semanage", line 28, in <module>
    import seobject
  File "py/seobject.py", line 34, in <module>
    import sepolicy
  File "py/sepolicy/__init__.py", line 8, in <module>
    import setools
  File "py/setools/__init__.py", line 77, in <module>
    from .infoflow import InfoFlowAnalysis
  File "py/setools/infoflow.py", line 22, in <module>
    import networkx as nx
  File "py/networkx/__init__.py", line 93, in <module>
    import networkx.linalg
  File "py/networkx/linalg/__init__.py", line 9, in <module>
    from networkx.linalg.algebraicconnectivity import *
  File "py/networkx/linalg/algebraicconnectivity.py", line 18, in <module>
    from numpy import (array, asmatrix, asarray, dot, matrix, ndarray, ones,
  File "py/numpy/__init__.py", line 180, in <module>
    from . import add_newdocs
  File "py/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "py/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "py/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "py/numpy/core/__init__.py", line 22, in <module>
    from . import _internal  # for freeze programs
  File "py/numpy/core/_internal.py", line 14, in <module>
    import ctypes
  File "/usr/lib64/python3.4/ctypes/__init__.py", line 541, in <module>
    _reset_cache()
  File "/usr/lib64/python3.4/ctypes/__init__.py", line 280, in _reset_cache
    CFUNCTYPE(c_int)(lambda: None)
MemoryError
2017-05-11 19:43:38 -04:00
Jason Zaman aa1afa41aa corecommands: add consolekit fcontexts 2017-05-11 19:35:53 -04:00
Jason Zaman 299e1ce6be appconfig: Add openrc_contexts file 2017-05-11 19:35:53 -04:00
Jason Zaman a5697b56a2 libraries: update wildcard /usr/lib fcontext
subs_dist takes care of it, the wildcard is no longer needed
2017-05-11 19:35:53 -04:00
Chris PeBenito a599f28196 Module version bump for /usr/bin fc fixes from Nicolas Iooss. 2017-05-04 08:27:46 -04:00