Linux Server Security: SELinux or Systemd?

June 1, 2016 / General Discussion

The security of a Linux server is always a sensitive issue. Here is what Greg Kroah-Hartman thinks about SELinux (he is one of the project developers of systemd).

The recent convention of CoreOS Fest Berlin (9 and 10 May 2016) was particularly rich in action and followed by several specialized portals. During the event, Greg Kroah-Hartman had given some interesting statements on ‘the Linux kernel development process and the security of the operating system’.

The important issue was also touched on by Lennart Poettering (currently employed by Red Hat and known for Avahi, PulseAudio, and systems). He is one of the developers of the project systemd init (the process during startup is called into question by the kernel to initialize the user space), which he explained with essential parameters that act on the safety of a Linux server.

Among the other main features of systemd. The programmer stressed the ability of systemd to run in a sandbox so much in the OS services along with the other elements such as containers.

The “systemd-nspawn” and “private-network” options can help the system administrators with the safety respectively namespace for the user and to run a private service in a network.

Systemd is preferable to SELinux?

To attract the attention of those present, Poettering’s remarks on SELinux (Security Enhanced Linux) were a bit amusing, “SELinux is definitely an incredible technology, though I do not understand”. He said arousing the audience’s laughter.

For your information, SELinux is a well-known form of the Linux kernel related to the monitoring of processes/applications and the policy of security of the system.

Although some options offered by SELinux to make all unnecessary effects downscaled some settings present in the latter version of systemd do the same. While SELinux-specific distribution offered by Red Hat. However, in Fedora and CentOS, SELinux is a core element of safety.

The Systemd settings are (simple Boolean expressions) understandable by most people. That is why I made it and I think it is much more useful than SELinux policy.

Probably there are only 50 people in the world able to understand the SELinux policy correctl. But I sincerely hope that there are more than 50 people can understand systemd”, said Lennart Poettering.

So what is SELinux exactly?

SELinux is an LSM (Linux Security Module), which defines a MAC access policy (mandatory access control) to the elements of a system based on Linux. The project was initiated by the NSA on the basis of work with CSC and the University of Utah in the USA (DTMach prototypes DTOS project FLASK). It is an architecture that separates the application of access policy and its definition.

It allows classifying the applications of a system, into different groups with finer levels of access. According to a multi-level security model (MLS), it also allows assigning a level of privacy for access to system objects such as file descriptors.

SELinux uses the Bell LaPadula model (BLP) type CSC enforcement for integrity. This is free software with portions under the GNU GPL or BSD license.

In practice, the basis for innovation is to define extended attributes in the UNIX file system. In addition, to the concept of “read, write, execute” for a given user, SELinux defines each file or process:

  1. Virtual user or collection of roles
  2. Role
  3. Security context

Stay tuned… In the next post, we will see enabling and disabling SELinux…