Questions tagged [selinux]

SELinux (Security-Enhanced Linux) is an implementation of a flexible mandatory, role-based access control architecture on Linux. It is primarily used to confine system processes.

SELinux (Security-Enhanced Linux) is an optional component of Linux that provides mandatory access control based on the FLASK architecture. It originated as an NSA project, but has been part of the mainline Linux kernel since version 2.6.0.

Questions about SELinux often straddle the border between security and functionality. If your point of view is that of a security professional (choosing a security policy, encoding a security policy in SELinux, …), ask here. If your point of view is that of a system administrator (setting up SELinux, getting a program to work with SELinux, …), ask on our sister site Unix & Linux.

SELinux provides mandatory access control, integrity controls, role-based access control with multilevel security. SELinux is primarily used to confine system processes (daemons), as writing a usable yet usefully restrictive policy for programs used by users is difficult.

SELinux assigns to each process and to each file a context consisting of a role, user (not related to Linux users) and a domain. Utilities such as ls and ps display SELinux contexts if the -Z flag is specified.

SELinux has been officially supported in RHEL since version 4.0 and Fedora since version 2. Other major distributions allow the use of SELinux but may not provide standard policies.

Other projects with a similar goal include:

80 questions
10
votes
2 answers

What are the security implications of disabling SELinux?

Is there any attack that would be possible just by disabling SELinux? Particularly on a server running http and ssh services?
Azad
  • 201
  • 2
  • 4
4
votes
1 answer

How to know if setroubleshoot is running in Centos 7.2

I have tried systemctl status setroubleshootd.service, but I get ● setroubleshootd.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) Neither does setroubleshootd appear in the output of ps ax. However, yum info…
ARX
  • 221
  • 2
  • 6
2
votes
0 answers

Ways to transition SELinux domain / process context (securing SELinux boundaries)

(Apologies for multi-question. Theme is the same, but there are quite a few edge cases.) Browsing the web, I come across resources (see below), but they don't make this quite clear what the situation really is, so this is my attempt to clarify and…
domen
  • 1,040
  • 10
  • 23
2
votes
1 answer

SELinux: command line tool to look security context (like selabel_lookup(3))

The selabel_lookup(3) library function gives a way to obtain the SELinux security context information for a file - or rather what security label a file is expected to have [1]. Is there a command line utility which looks up security context…
Juan
  • 151
  • 3
2
votes
1 answer

Why doesn't SELinux prevent access to this file?

I have a vanilla CentOS 7 box with SELinux enforcing with the targeted policy: $ ls -lZ /etc/resolv.conf -rw-r--r--. root root system_u:object_r:net_conf_t:s0 /etc/resolv.conf $ sudo id -Z unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 $…
Anthony Kraft
  • 1,179
  • 1
  • 9
  • 18
1
vote
1 answer

Selinux: How to log/monitor all accesses to a file?

Does SELinux support monitoring accesses to an object type? I would like to log all instances where sensitive files are accessed.
user7014
  • 141
  • 1
  • 3
1
vote
0 answers

How to interpret sesearch result

Question Please suggest how to understand sesearch says. $ sesearch -s svirt_lxc_net_t -t container_var_run_t -SA Found 8 semantic av rules: allow svirt_sandbox_domain file_type : dir { getattr search open } ; allow svirt_sandbox_domain…
mon
  • 295
  • 3
  • 9