Commit Graph

2479 Commits

Author SHA1 Message Date
Chris PeBenito db06838142 Module version bump for xserver changes from Guido Trentalancia. 2016-12-04 09:11:02 -05:00
Chris PeBenito 4aa4a3d10b xserver: Rearrange lines 2016-12-04 09:10:25 -05:00
Guido Trentalancia 58e5ce24ae xserver: remove unneeded user content permissions
Remove unneeded permissions to read user content from the
xserver module (xserver and xdm domains).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-04 08:57:24 -05:00
Chris PeBenito cccc369d57 Merge pull request #50 from cgzones/macros
update policy/support macros
2016-12-03 17:23:11 -05:00
cgzones 00df10e2cb keep 2 empty lines in front of a new section 2016-12-02 16:20:26 +01:00
cgzones e59709a8fe review
reintroduce unpriv_socket_class_set
remove introduced systemd permission sets
2016-12-02 16:16:45 +01:00
Chris PeBenito da94647e7f Update contrib. 2016-12-01 19:45:14 -05:00
Chris PeBenito 2fe9c4017e Module version bump for xserver patch from Guido Trentalancia 2016-12-01 19:45:14 -05:00
Guido Trentalancia 8e977d59f2 xserver: remove unneeded user content permissions
Remove unneeded permissions to read user content from the
xserver module.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-01 19:45:14 -05:00
cgzones 901a905cbb update policy/support macros
- add systemd service macro sets
- add some documentation
- add some recursion to some macro sets (ipv perm, object class sets)
- deprecate domain_trans and domain_auto_trans
- remove unpriv_socket_class_set
2016-12-01 19:38:14 +01:00
Chris PeBenito 59d285d23d Update contrib. 2016-11-22 22:19:20 -05:00
Chris PeBenito c667be7be5 Update contrib. 2016-10-30 14:31:56 -04:00
Chris PeBenito f9c98632f5 Module version bumps for patches from Guido Trentalancia. 2016-10-30 14:31:50 -04:00
Guido Trentalancia via refpolicy b7f5fa6ac7 Let the user list noxattr fs directories
When reading or managing noxattr fs files or symbolic links, also
let the user list noxattr fs directories.

This patch should be applied after the following one:

http://oss.tresys.com/pipermail/refpolicy/2016-October/008539.html

"Let users read/manage symlinks on fs that do not support xattr"

posted on Sat, 29 Oct 2016 15:39:46 UTC.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-10-30 14:25:22 -04:00
Guido Trentalancia via refpolicy bf5f1853f3 Let unprivileged users list mounted filesystems
Let unprivileged users list filesystems mounted on mount points such
as /mnt (cdrom, FAT, NTFS and so on).

This makes a great difference to the usability and effectiveness of
graphical filesystem browsers such as Gnome Nautilus and currently
comes at no security penalty because mounted filesystems can be
listed with programs such as the "df" program from GNU coreutils or
by simply reading /proc/mounts.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-10-30 14:25:07 -04:00
Guido Trentalancia via refpolicy c23fe5c298 Let users read/manage symlinks on fs that do not support xattr
Let unprivileged and administrative users read symbolic links on
filesystems that do not support extended attributes (xattr) such
as cdroms, FAT, NTFS and so on.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-10-30 14:24:52 -04:00
Russell Coker 44bedbfad0 single binary modutils
On Tuesday, 2 August 2016 7:59:28 PM AEDT Chris PeBenito wrote:
> On 07/31/16 08:34, Russell Coker wrote:
> > The following patch deals with a single binary for modutils, so depmod_t,
> > and insmod_t are merged.
>
> Since the main SELinux distros (including RHEL/CentOS 7) all have merged
> modutils these days, I'm open to taking a patch that fully merges these
> domains (in which case renaming to kmod_t, with proper aliasing seems
> the best idea).
>
> However, it's been some time since I used a busybox-based system; does
> busybox still have separated tools?  Yes, this is a bit of an obvious
> question since busybox is also single-binary, but IIRC, the embedded
> guys made some tiny helper scripts or executables so proper
> transitioning could occur.  Separate domains may still make sense.

As we have had no response from Busybox users in the last 3 months and also no
response to the thread Luis started in 2013 I think it's safe to assume that
they don't need this.

I've attached a new patch which renames to kmod_t as you suggested.  Please
consider it for inclusion.

--
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

Description: Change modutils policy to match the use of a single binary
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2014-06-25
2016-10-23 19:12:07 -04:00
Chris PeBenito 633ab9fea3 Update Changelog and VERSION for release. 2016-10-23 16:58:59 -04:00
Chris PeBenito 34055cae87 Bump module versions for release. 2016-10-23 16:58:59 -04:00
Chris PeBenito d9d0ff0074 Update contrib. 2016-10-19 19:02:55 -04:00
Chris PeBenito 07451cd39a Module version bumps for syncthing from Naftuli Tzvi Kay. 2016-10-09 07:51:51 -04:00
Chris PeBenito 383badcee5 Merge branch 'feature/syncthing' of https://github.com/rfkrocktk/refpolicy into rfkrocktk-feature/syncthing 2016-10-09 07:48:10 -04:00
Chris PeBenito b96f32a1f3 Update contrib. 2016-09-27 18:31:35 -04:00
Chris PeBenito 55968a5449 Update contrib. 2016-09-18 16:41:54 -04:00
Chris PeBenito c3523f3c85 Module version bump for selinuxutil fix from Jason Zaman. 2016-09-18 16:41:47 -04:00
Jason Zaman via refpolicy 4869c224bd selinuxutil: allow setfiles to read semanage store
commit a7334eb0de98af11ec38b6263536fa01bc2a606c
libsemanage: validate and compile file contexts before installing

validates the fcontexts when they are still in /var/lib/selinux. Without
setfiles_t having access to read the files, validation fails and the
policy cannot be updated.
2016-09-18 16:40:45 -04:00
Chris PeBenito 048f67d525 Additional change from Guido Trentalancia related to evolution. 2016-09-08 19:17:31 -04:00
Guido Trentalancia f9c83f65d7 userdomain: introduce the user certificate file context (was miscfiles: introduce the user certificate file context)
Introduce a new file context for user certificates (user_cert_t)
located in home directories.

Introduce new auxiliary interfaces to read and manage such files
files and directories.

Thanks to Christopher PeBenito for the useful suggestions that
led to this improved version of the patch.

Compared to the previous version, this patch adds the ability to
search the user home directories in the new interfaces.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-09-08 19:06:57 -04:00
Chris PeBenito c406ebfb3e Update contrib. 2016-09-07 18:02:57 -04:00
Chris PeBenito 76f05a2c15 Module version bumps for LVM and useromain patches from Guido Trentalancia. 2016-09-07 18:02:18 -04:00
Chris PeBenito 0b978fe777 userdomain: Move enable_mls block in userdom_common_user_template(). 2016-09-07 17:51:42 -04:00
Guido Trentalancia 39e550f9ee Improve tunable support for rw operations on noxattr fs / removable media
Improve the existing user domain template policy:

- better support for the "user_rw_noexattrfile" boolean (enable
  write operations on filesystems that do not support extended
  attributes, such as FAT or cdrom filesystem);
- add support for a new "user_exec_noexattrfile" boolean to
  control the execution of files from filesystems that do not
  support extended attributes (potentially dangerous);
- add support for a new "user_write_removable" boolean which
  enables write operations on removable devices (such as
  external removable USB memory, USB mobile phones, etc).

Note that devices might be removable but support extended
attributes (Linux xattr filesystems on external USB mass storage
devices), so two separate booleans are needed for optimal
configuration flexibility.

Writing to removable mass storage devices is a major cause of
leakage of confidential information, so the new boolean defaults
to false.

Disable raw access for MLS policies (thanks to Christoper
PeBenito for suggesting this).

This new version of the patch correctly includes the definitions
of the new booleans (by including the .te file differences).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-09-07 17:43:16 -04:00
Guido Trentalancia cbccb5aedf Update the lvm module
Update the lvm module to add a permission needed by cryptsetup.

At the moment the SELinux kernel code is not able yet to distinguish
the sockets in the AF_ALG namespace that are used for interfacing to
the kernel Crypto API.

In the future the SELinux kernel code will be updated to distinguish
the new socket class and so this permission will change its class
from the generic "socket" to the new socket (e.g. "alg_socket").

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-09-07 17:43:16 -04:00
Chris PeBenito 22ea0986bc Update contrib. 2016-08-29 20:29:46 -04:00
Chris PeBenito c720d99e30 Module version bump for module_load perm use from Guido Trentalancia. 2016-08-29 20:29:46 -04:00
Guido Trentalancia 5c5d2d8d49 Add module_load permission to can_load_kernmodule
The "module_load" permission has been recently added to the "system"
class (kernel 4.7).

The following patch updates the Reference Policy so that the new
permission is allowed when a kernel module should be loaded.

To preserve the module encapsulation, a new interface is defined
in the kernel files module and that interface is then used in the
kernel module.

A short note is added about unneeded permissions that set the
kernel scheduling parameters (might lead to service disruption).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-29 20:29:46 -04:00
Naftuli Tzvi Kay ba903b4840
Add Syncthing Support to Policy
For now, optionally add the Syncthing role to user_r, staff_r,
and unconfined_r, and define the Syncthing ports in core network.
2016-08-21 11:57:01 -07:00
Chris PeBenito bc7c71be42 Update contrib. 2016-08-14 16:08:20 -04:00
Chris PeBenito c213c71cce userdomain: Fix compile errors. 2016-08-14 16:08:12 -04:00
Chris PeBenito 6829da4054 Update for the xserver module:
- updated the file contexts for the Xsession script;
- created an interface for chatting over dbus with
  xdm (currently used by the userdomain module in
  the common user template);
- added permission to chat over dbus with colord.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-14 15:13:24 -04:00
Chris PeBenito 87b8627839 Update contrib. 2016-08-14 14:59:08 -04:00
Chris PeBenito 187019a615 Module version bump for various patches from Guido Trentalancia. 2016-08-14 14:58:57 -04:00
Chris PeBenito 19b84c95b1 Remove redundant libs_read_lib_files() for ifconfig_t. 2016-08-14 14:52:32 -04:00
Chris PeBenito 6caa443d18 Ifconfig should be able to read firmware files in /lib (i.e. some network
cards need to load their firmware) and it should not audit attempts
to load kernel modules directly.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-14 14:52:07 -04:00
Chris PeBenito 5481c1cc84 Update the sysnetwork module to add some permissions needed by
the dhcp client (another separate patch makes changes to the
ifconfig part).

Create auxiliary interfaces in the ntp module.

The permission to execute restorecon/setfiles (required by the
dhclient-script script and granted in a previous version of this
patch) is not granted, as it does not break the script functioning.

Include revisions from Chris PeBenito.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-14 14:51:42 -04:00
Chris PeBenito 9e0566104a Update alsa module use from Guido Trentalancia. 2016-08-14 14:34:19 -04:00
Chris PeBenito 2bfcba6624 Allow the system user domains to chat over dbus with a few other
domains (e.g. gnome session).

Thanks to Jason Zaman for pointing out the correct interface to
achieve this.

This new version fixes a typographic error in the previous version.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-14 14:12:50 -04:00
Chris PeBenito bfa6cc8bf5 Update contrib. 2016-08-13 10:51:41 -04:00
Guido Trentalancia d932d7349d Add module_load permission to class system
The "module_load" permission has been recently added to the "system"
class (kernel 4.7).

The following patch updates the Reference Policy so that the new
permission can be used to create SELinux policies.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-13 08:26:30 -04:00
Chris PeBenito 1f4b280519 corenetwork: Missed version bump for previous commit. 2016-08-07 16:07:35 -04:00