Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v9 00/15] SELinux Buildroot Additions
@ 2015-07-14 20:20 Clayton Shotwell
  2015-07-14 20:20 ` [Buildroot] [PATCH v9 01/15] python-pyparsing: Add host build option Clayton Shotwell
                   ` (14 more replies)
  0 siblings, 15 replies; 28+ messages in thread
From: Clayton Shotwell @ 2015-07-14 20:20 UTC (permalink / raw)
  To: buildroot

### Highlevel updates in v9 of these patches
 * Dropped 2 patches because they have been committed already
 * Continued working on the policycoreutils patch
 * Corrected various minor issues in many other patches

### What's SELinux?

Security-Enhanced Linux (SELinux) is a Linux feature that provides
a variety of security policies, including U.S. Department of Defense
style mandatory access controls (MAC), through the use of Linux
Security Modules (LSM) in the Linux kernel. It is not a Linux
distribution, but rather a set of modifications that can be applied
to Unix-like operating systems, such as Linux and BSD.

Running SELinux under a Linux distribution requires three things:
An SELinux enabled kernel, SELinux Userspace tools and libraries,
and SELinux Policies (mostly based on the Reference Policy). Some
common Linux programs will also need to be patched/compiled with
SELinux features. (Credit Archlinux wiki)

### What's in this patchset?

This patchset adds the required userspace tools, libraries, example
QEMU target, existing package modifications, and initial policy
to Buildroot.
The design approach took a minimalist view to the selinux capability.
The necessary packages have been added but all the ways in which they
could be used (target vs host) are not exposed. One example is
the audit2allow framework that requires python. This is currently
setup for "host only use" to post analyze audit service output. It
could also be setup for target use but it would require the target
to have python and other supporting libs present.
Another aspect that utilized known SELinux capable applications
was for init and logging. We choose to use sysvinit and rsyslog
instead of the busybox applet version. This simplified getting
this initial configuration pulled together.
Lastly, the building of libselinux was limited to a set of
architectures and libraries that have been tested. An area for
future work will be to enable broader use.

Some references to help with the review of this patchset.
Arch and Gentoo implementation and design details:
  https://wiki.archlinux.org/index.php/SELinux
  http://wiki.gentoo.org/wiki/SELinux
  http://wiki.gentoo.org/wiki/SELinux/Installation

### Details of changes from previous patchsets

This is a new round of patches based on the v5 patchset from
last year. The changes since v4 consist of:
 * The removal of on target policy debugging using audit2allow.
   The host tools have been setup to provide offline capability
   for analyzing audit output.
 * The example qemu configuration defaults to using full versions
   of applications instead of the busybox applets. This simplified
   the configuration but as a side effect grew the filesystem size.
   There is definitely opportunity to slim down the approach to
   just using busybox applets (I've still included the patches
   that enable the capability to create individual applets).
 * Added documentation of the qemu target to that targets readme
 * Updated for structural changes (OPTS vs OPT, patch naming,
   improvements to existing packages)
 * Autobuilder was modified to run against our upstreaming
   branch and has has logged a couple weeks of builds and almost
   all of the issues are resolved against the current upstream.

Since Refpolicy is heavily tailored for a projects use, the
package exposed options of using the provided version with
patches or a custom GIT repo. Here's a bit more detail on
those assumptions.
  * Refpolicy as the package defines with default patches
    plus possibly some global patches applied. Using a default
    modules config file provided in the package folder or
    provided by the user.
  * Refpolicy looking at specific git repo revisions. Using a
    modules config file from within that git repo.
  * Repolicy using src override which assumes the same as the
    git repo case for where the modules config file originates.

### What's next:

* Testing out support for using busybox applets instead of
  sysvinit/util-linux/etc.
* qemu targets for ARM and PPC

Clayton Shotwell (8):
  python-pyparsing: Add host build option
  policycoreutils: new package
  refpolicy: new package
  busybox: applets as individual binaries
  busybox: selinux support
  qemu x86 selinux: base br defconfig
  cpio: new package
  audit: Add startup script

Matt Weber (7):
  linux-pam: selinux support
  busybox: added linux-pam support
  sysvinit: added libselinux dependency
  dbus: selinux file context support
  openssh: selinux and pam support
  util-linux: selinux, audit, and pam support
  qemu x86 selinux: added common selinux support files

 board/common_selinux/busybox-selinux.config        | 1058 ++++++++++++++++++++
 board/common_selinux/post_build.sh                 |   30 +
 .../common_selinux/skeleton/etc/audit/auditd.conf  |   32 +
 .../skeleton/etc/audit/rules.d/audit.rules         |    3 +
 board/common_selinux/skeleton/etc/fstab            |   15 +
 board/common_selinux/skeleton/etc/inittab          |   29 +
 board/common_selinux/skeleton_permissions.txt      |   26 +
 board/qemu/x86/linux-4.0-selinux.config            |   77 ++
 board/qemu/x86/readme.txt                          |   17 +
 configs/qemu_x86_selinux_defconfig                 |   67 ++
 package/Config.in                                  |    4 +
 package/Config.in.host                             |    1 +
 package/audit/S01auditd                            |   80 ++
 package/audit/audit.mk                             |    5 +
 ...s-Add-installation-of-individual-binaries.patch |  103 ++
 ...ags-strip-non-l-arguments-returned-by-pkg.patch |   28 +
 package/busybox/Config.in                          |   25 +
 package/busybox/busybox.mk                         |   57 ++
 package/cpio/Config.in                             |    8 +
 package/cpio/Config.in.host                        |    6 +
 package/cpio/cpio.hash                             |    9 +
 package/cpio/cpio.mk                               |   27 +
 package/dbus/S30dbus                               |    4 +
 package/dbus/dbus.mk                               |   14 +
 package/linux-pam/linux-pam.mk                     |   56 +-
 package/linux-pam/system-auth.pamd                 |   15 +
 package/openssh/openssh.mk                         |   16 +
 ...IR-to-all-paths-that-use-an-absolute-path.patch |  275 +++++
 .../0002-Allow-CFLAGS-to-be-overwritten.patch      |   57 ++
 ...licy-python-install-arguments-to-be-a-var.patch |   42 +
 package/policycoreutils/Config.in                  |   59 ++
 package/policycoreutils/policycoreutils.hash       |    2 +
 package/policycoreutils/policycoreutils.mk         |  108 ++
 package/python-pyparsing/python-pyparsing.mk       |    1 +
 package/refpolicy-contrib/Config.in                |   19 +
 package/refpolicy-contrib/refpolicy-contrib.mk     |   18 +
 .../0001-Fix-awk-references-to-use-variable.patch  |   42 +
 package/refpolicy/Config.in                        |   99 ++
 package/refpolicy/S00selinux                       |  136 +++
 package/refpolicy/config                           |    8 +
 package/refpolicy/modules.conf                     |  406 ++++++++
 package/refpolicy/refpolicy.hash                   |    2 +
 package/refpolicy/refpolicy.mk                     |  121 +++
 ...1-Fix-SELinux-compile-flags-and-libraries.patch |   44 +
 package/sysvinit/sysvinit.mk                       |    5 +
 package/util-linux/util-linux.mk                   |   27 +
 46 files changed, 3282 insertions(+), 1 deletion(-)
 create mode 100644 board/common_selinux/busybox-selinux.config
 create mode 100755 board/common_selinux/post_build.sh
 create mode 100644 board/common_selinux/skeleton/etc/audit/auditd.conf
 create mode 100644 board/common_selinux/skeleton/etc/audit/rules.d/audit.rules
 create mode 100755 board/common_selinux/skeleton/etc/fstab
 create mode 100755 board/common_selinux/skeleton/etc/inittab
 create mode 100755 board/common_selinux/skeleton_permissions.txt
 create mode 100644 board/qemu/x86/linux-4.0-selinux.config
 create mode 100644 configs/qemu_x86_selinux_defconfig
 create mode 100644 package/audit/S01auditd
 create mode 100644 package/busybox/0002-applets-Add-installation-of-individual-binaries.patch
 create mode 100644 package/busybox/0008-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch
 create mode 100644 package/cpio/Config.in
 create mode 100644 package/cpio/Config.in.host
 create mode 100644 package/cpio/cpio.hash
 create mode 100644 package/cpio/cpio.mk
 mode change 100755 => 100644 package/dbus/S30dbus
 create mode 100644 package/linux-pam/system-auth.pamd
 create mode 100644 package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch
 create mode 100644 package/policycoreutils/0002-Allow-CFLAGS-to-be-overwritten.patch
 create mode 100644 package/policycoreutils/0003-Change-sepolicy-python-install-arguments-to-be-a-var.patch
 create mode 100644 package/policycoreutils/Config.in
 create mode 100644 package/policycoreutils/policycoreutils.hash
 create mode 100644 package/policycoreutils/policycoreutils.mk
 create mode 100644 package/refpolicy-contrib/Config.in
 create mode 100644 package/refpolicy-contrib/refpolicy-contrib.mk
 create mode 100644 package/refpolicy/2.20130424/0001-Fix-awk-references-to-use-variable.patch
 create mode 100644 package/refpolicy/Config.in
 create mode 100644 package/refpolicy/S00selinux
 create mode 100644 package/refpolicy/config
 create mode 100644 package/refpolicy/modules.conf
 create mode 100644 package/refpolicy/refpolicy.hash
 create mode 100644 package/refpolicy/refpolicy.mk
 create mode 100644 package/sysvinit/0001-Fix-SELinux-compile-flags-and-libraries.patch

-- 
1.9.1

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2015-07-20 13:56 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 20:20 [Buildroot] [PATCH v9 00/15] SELinux Buildroot Additions Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 01/15] python-pyparsing: Add host build option Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 02/15] policycoreutils: new package Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 03/15] refpolicy: " Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 04/15] busybox: applets as individual binaries Clayton Shotwell
2015-07-18 12:46   ` Thomas Petazzoni
2015-07-18 14:26     ` Yann E. MORIN
2015-07-14 20:20 ` [Buildroot] [PATCH v9 05/15] busybox: selinux support Clayton Shotwell
2015-07-18 13:06   ` Thomas Petazzoni
2015-07-20 13:56     ` Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 06/15] linux-pam: " Clayton Shotwell
2015-07-18 13:22   ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 07/15] busybox: added linux-pam support Clayton Shotwell
2015-07-18 13:10   ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 08/15] sysvinit: added libselinux dependency Clayton Shotwell
2015-07-18 13:51   ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 09/15] dbus: selinux file context support Clayton Shotwell
2015-07-18 14:02   ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 10/15] openssh: selinux and pam support Clayton Shotwell
2015-07-18 15:38   ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 11/15] util-linux: selinux, audit, " Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 12/15] qemu x86 selinux: added common selinux support files Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 13/15] qemu x86 selinux: base br defconfig Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 14/15] cpio: new package Clayton Shotwell
2015-07-18 17:17   ` Thomas Petazzoni
2015-07-18 17:23     ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 15/15] audit: Add startup script Clayton Shotwell
2015-07-19 20:53   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox