SELinux = Security Enhanced Linux
Wiki: Security-Enhanced Linux
Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including mandatory access controls (MAC).
SELinux is a set of kernel modifications and user-space tools that have been added to various Linux distributions.
SELinux起源于美国国安局(NSA)。它的前身是NSA的一个叫Flask的项目,后来,NSA觉得Linux更具发展和普及前景,所以就在Linux系统上重新实现了FLASK,称之为SELinux。
在网络上浏览了不少资料。有几篇写的非常好,罗列在参考文献中,方便读者参考引用。
[1]介绍了SELinux的基本概念,非常值得入门阅读。包括DAC,MAC,TEAC(简称TE),RBAC,以及policy文件的语法
[2]是[1]的姊妹篇,介绍了File Context和MLS的概念,以及编译构建SELinux的步骤。着重于动手部分
[3]本来是一个非常好的从头至尾指导动手构建SELinux的教程,可惜文章中涉及的源码版本过于老了(Linux 2.6,Gentoo 2006版)。编译构建的时候错误不断。只能意会了,可惜可惜。
[4]是一份文档,最新版本是2012年更新的版本,足有444页,完全可以当一本SELinux的入门书籍来阅读。我目前还没看完,但是从目录结构来看,感觉该有的都有值得好好看一看。
[5][6]是一些比较general的知识的帖子,也有可取之处,可以作为参考
[7]阐述了MLS的由来以及基本概念,由MLS开发者公司写的,似乎比较权威
[8]提到了一些代码入口,阅读代码的话可以从其中扩展开去
本文主要注重理清SELinux实现安全防护的思路,不涉及具体语法解释。另外还会再写一篇着重介绍在Linux用户态使能SELinux,并修改或添加SELinux策略
如果需要理解具体语法可以参考文献[1]。以及Android源码为例,可参考链接实现 SELinux。Android系统策略文件(.te)位置在system/sepolicy
,device/<manufacturer>/<device-name>/sepolicy
。
SELinux提供的防护手段
从Wiki SELinux的定义就能看出,SELinux的核心就是提供了一套MAC的权限管理。MAC全称为Mandatory Access Control(个人理解:MAC≈TEAC)。再辅以其他一系列辅助手段,来达到绝对的安全(当然世界上只有相对安全,没有绝对的安全)。本章就逐一介绍这些手段。
DAC vs. MAC
DAC = Discretionary Access Control,也就是Linux系统提供给我们的基本的权限管理,例如如下ls -l
输出:
drwx------+ 19 user staff 608 10 27 10:07 Desktop
drwx------+ 17 user staff 544 8 16 21:39 Documents
drwx------+ 31 user staff 992 11 27 19:51 Downloads
- user就是该文件的拥有者ID(即UID),staff是user的组ID(GID)
rwx------
就是我们通常说的权限组,每三个字母代表一种权限标记
- rwx分别表示可读,可写,可执行
- [1..3] 表示拥有者的权限
- [4..6] 表示与拥有者同组的用户的权限
- [7..9] 表示其他用户的权限
rwx------
换算成8进制,也就是我们常说的700权限,什么644啊,777啊都可以这样换算
Linux基于基本的UID和GID即可以有基本的权限控制。DAC的缺陷在于,他有一个超级用户root,当一旦黑客通过漏洞完成了提权操作,那么所有的这些权限控制就失效了。所以NSA才做了这么一套MAC机制。
MAC的处世哲学非常简单:即任何进程想在SELinux系统中干任何事情,都必须先在安全策略配置文件中赋予权限。凡是没有出现在安全策略配置文件中的权限,进程就没有该权限。[1]
TEAC
TEAC = Type Enforcement Accesc Control,简称TE。
Linux中有两种东西,一种死的(Inactive),一种活的(Active)。死的东西就是文件(Linux哲学,万物皆文件。注意,万不可狭义解释为File),而活的东西就是进程。此处的“死”和“活”是一种比喻,映射到软件层面的意思是:进程能发起动作,例如它能打开文件并操作它。而文件只能被进程操作。[1]
所谓的TEAC就是两个东西的Type要匹配上。Type是啥?
进程的Type
对于进程,看一下ps -Z
命令的输出:
LABEL USER PID PPID VSZ RSS WCHAN
u:r:shell:s0 shell 3097 1427 5752 3024 sigsuspe+
u:r:shell:s0 shell 3100 3097 7320 3228 0
上面的命令在Android adb shell中运行输出。这个u:r:shell:s0
就是一个进程的标签,其中:
- u:SELinux定义的一个用户,这个用户不同于Linux的系统用户,具体参看后面的用户与角色一节。
- r:SELinux定义的一个角色(role),在policy描述语言中,可以用
role
关键字来定义
- shell:就是我们要的Type了,SELinux中称为Domain,在policy描述语言中,可以用
type
或者attribute
关键字来定义
- s0:是安全级别,MLS会用到的东西
特别注意:对初学者而言,attribute和type的关系最难理解,因为“attribute”这个关键词实在是没取好名字,很容易产生误解:
实际上,type和attribute位于同一个命名空间,即不能用type命令和attribute命令定义相同名字的东西。
其实,attribute真正的意思应该是类似type(或domain) group这样的概念。比如,将type A和attribute B关联起来,就是说type A属于group B中的一员。
文件的Type
对于文件,可以参考ls -Z
的输出:
u:object_r:cgroup:s0 acct
u:object_r:rootfs:s0 bugreports
u:object_r:cache_file:s0 cache
u:object_r:rootfs:s0 charger
u:object_r:configfs:s0 config
u:object_r:rootfs:s0
就是一个文件的标签。是不是和进程的非常类似?
- u: 代表创建这个文件的SELinux user ID。注意是SELinux定义的用户,并不直接对应Linux的用户系统,两者有一个映射关系
- object_r: 是这个文件的role,所有的文件的role都是object_r
- rootfs: 就是这个文件的Type
- s0: 和进程一样,这个也是安全级别,用于MLS的
如何关联这两个Type?
当每一个进程和每一个文件有了Type之后,SELinux就可以匹配两者之间的Type来鉴权。具体的做法,也就是policy文件做的事情——定义规则。下面是一个规则的例子:
allow netd proc:file write
翻译成人类语言就是:允许netd类型的process,使用(访问)type为proc,class为file的文件的write操作。
- allow是定义规则的动词,类似的还有allowaudit、dontaudit、neverallow等。
- netd是进程的Type
- proc是文件的Type
- file是文件的class,因为不同class的文件有不同的操作类型,例如socket文件和普通文件肯定不同,设备文件和普通文件也一定不同等等。class同policy语言的其他类型一样,也可以在文件中定义,其使用的关键字就是class
- write是该规则涉及的权限集(PermSet),它可以不只一个,如果是多个权限,则用大括号包起来
总结
所以,整个TE的核心就是,定义一组进程Type和文件Type,以及一组class和class permset,然后用规则文件将它们关联起来。
另外值得注意的是,TEAC是一种白名单机制,只有策略文件描述的权限才会生效,否则默认是没有对应的权限。
那么问题来了,既然是白名单机制,那么neverallow有啥用?
neverallow的作用是为了验证allow定义的规则是否完备,当你按照allow的补集定义neverallow规则时,发生了权限错误,那么可以肯定的是allow规则定义出了问题。
RBAC
RBAC = Role Based Access Control, 是对TE的一种补充。准确的说,是在TE之上提供了一层约束,增强了策略文件定义的可操作性,同时提供了Linux系统用户的权限约束实现。
SELinux 并不直接建立用户和 domain 之间的联系,而是通过角色作为桥梁。此举好处如下:
- 降低 policy 复杂度:可能有上百个用户和上千种 domain/type,但是不同用户所扮演的不同角色只有 有限几个;role 作为 user 和 type 之间的“中间层”,便于限制 user 的能力; 2. 给不同用户赋予不同的优先级:用户通过扮演某种角色才能获得那种角色的能力。特权角色只能由特 权用户来扮演;[4]
翻译一下,我的理解是:
我们知道TE是SELinux MAC的核心,TE通过比对object type和process type来决定process是否有权限使用这个object。一条TE规则绑定了这两者。假如系统有M个Process,N个Object,那是不是系统的规则数就是M*N个?(M和N可能是很大的数哦)
答案是:规则数并不等于M*N。否则策略文件要写的累死。
解决的方法就是定义role,一个role就对应了若干个type,在策略文件中通过role关键字完成role和type的绑定,例如:
role user_r types user_t;
role user_r types passwd_t;
user_r这个role一下对应了两个type,分别是user_t和passwd_t
user joe roles { user_r };
这条语句就绑定了user joe和role user_r。那么当joe是user_r role的时候,就具备了user_t和passwd_t的标签,那么joe就能访问定义了user_t和passwd_t的TE规则,所指定的资源(object)。
角色是一套Type(进程的Type又称为域Domain)类型的集合
知道了这层关系,那么就可以理解role的操作,包括:
- 角色转换role_transition
- 角色控制role_dominance
用户与角色
SELinux有一套用户系统,Linux系统也有一套用户系统。它们之间有什么关系?首先可以确定的是,它们不是直接等价的。例如, 以root用户启动Browser,那么Browser就有root用户的权限,在Linux系统上能干任何事情。而root在SELinux中可能就是一个没权限,没地位,打打酱油的”路人甲“。当然,这一切都由SELinux安全策略的制定者来决定。
SELinux用户和Linux系统用户的映射关系可以通过semanage工具来查看:
[root@zion ~]# semanage login -l
Login Name SELinux User MLS/MCS Range Service
__default__ unconfined_u s0-s0:c0.c1023 *
root unconfined_u s0-s0:c0.c1023 *
system_u system_u s0-s0:c0.c1023 *
当一个普通用户登录时,其映射到SELinux过程可以参考文献[5]的介绍。大致流程如下:
PHN2ZyBpZD0iZDgwbjNhbDAweHkiIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdm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通过上面的流程也可以看出,SELinux的策略文件并没有专门定义有哪些SELinux用户,而是通过seusers文件中描述的映射关系来表明有哪些SELinux用户。用户再通过role映射到type,最后通过TE系统来确定权限关系。大致关系如下:
PHN2ZyBpZD0iZHE5cHNkaTVid2siIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDcxMi4wMzEyNXB4OyIgdmlld0JveD0iMCAwIDcxMi4wMzEyNSA1Mi4yODEyNSI+PHN0eWxlPgoKCiNkcTlwc2RpNWJ3ayAubGFiZWwgewogIGZvbnQtZmFtaWx5OiAndHJlYnVjaGV0IG1zJywgdmVyZGFuYSwgYXJpYWw7CiAgY29sb3I6ICMzMzM7IH0KCiNkcTlwc2RpNWJ3ayAubm9kZSByZWN0LAojZHE5cHNkaTVid2sgLm5vZGUgY2lyY2xlLAojZHE5cHNkaTVid2sgLm5vZGUgZWxsaXBzZSwKI2RxOXBzZGk1YndrIC5ub2RlIHBvbHlnb24gewogIGZpbGw6ICNFQ0VDRkY7CiAgc3Ryb2tlOiAjOTM3MERCOwogIHN0cm9rZS13aWR0aDogMXB4OyB9CgojZHE5cHNkaTVid2sgLm5vZGUuY2xpY2thYmxlIHsKICBjdXJzb3I6IHBvaW50ZXI7IH0KCiNkcTlwc2RpNWJ3ayAuYXJyb3doZWFkUGF0aCB7CiAgZmlsbDogIzMzMzMzMzsgfQoKI2RxOXBzZGk1YndrIC5lZGdlUGF0aCAucGF0aCB7CiAgc3Ryb2tlOiAjMzMzMzMzOwogIHN0cm9rZS13aWR0aDogMS41cHg7IH0KCiNkcTlwc2RpNWJ3ayAuZWRnZUxhYmVsIHsKICBiYWNrZ3JvdW5kLWNvbG9yOiAjZThlOGU4OyB9CgojZHE5cHNkaTVid2sgLmNsdXN0ZXIgcmVjdCB7CiAgZmlsbDogI2ZmZmZkZSAhaW1wb3J0YW50OwogIHN0cm9rZTogI2FhYWEzMyAhaW1w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ZSIgaWQ9IkUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY2My42NjQwNjI1LDM4LjE0MDYyNSkiIHN0eWxlPSJvcGFjaXR5OiAxOyI+PHJlY3Qgcng9IjAiIHJ5PSIwIiB4PSItNTIuMzY3MTg3NSIgeT0iLTE4LjE0MDYyNSIgd2lkdGg9IjEwNC43MzQzNzUiIGhlaWdodD0iMzYuMjgxMjUiPjwvcmVjdD48ZyBjbGFzcz0ibGFiZWwiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsMCkiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00Mi4zNjcxODc1LC04LjE0MDYyNSkiPjx0ZXh0Pjx0c3BhbiB4bWw6c3BhY2U9InByZXNlcnZlIiBkeT0iMWVtIiB4PSIxIj5vYmplY3QgdHlwZShzKTwvdHNwYW4+PC90ZXh0PjwvZz48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg==
constrain
前面讲了RBAC与TE结合提供的权限检查,RBAC还提供了一种直接的user/role权限检查方法,成为constrain。举个例子:
# 标准格式:constrain <object_class_set> <perm_set> <expression> ;
constrain file write (u1 == u2 and r1 == r2) ;
限制只有文件的创建者user/role与进程user/role相等时,才可以对文件进行写操作。注意这里是object class,控制的是一类资源,而不是具体哪一个object。
可以使用的逻辑运算符有:
- ==, !=:user/role都可用
- 仅针对role的eq, dom, domby, incomp
总结
PHN2ZyBpZD0iZHhrM2V5em95M3AiIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDM3NS45MjE4NzVweDsiIHZpZXdCb3g9IjAgMCAzNzUuOTIxODc1IDM0My42ODc1Ij48c3R5bGU+CgoKI2R4azNleXpveTNwIC5sYWJlbCB7CiAgZm9udC1mYW1pbHk6ICd0cmVidWNoZXQgbXMnLCB2ZXJkYW5hLCBhcmlhbDsKICBjb2xvcjogIzMzMzsgfQoKI2R4azNleXpveTN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kPSJHIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxOTkuOTYwOTM3NSwzMjkuNTQ2ODc1KSIgc3R5bGU9Im9wYWNpdHk6IDE7Ij48cmVjdCByeD0iMCIgcnk9IjAiIHg9Ii01Mi4zNjcxODc1IiB5PSItMTguMTQwNjI1IiB3aWR0aD0iMTA0LjczNDM3NSIgaGVpZ2h0PSIzNi4yODEyNSI+PC9yZWN0PjxnIGNsYXNzPSJsYWJlbCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwwKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQyLjM2NzE4NzUsLTguMTQwNjI1KSI+PHRleHQ+PHRzcGFuIHhtbDpzcGFjZT0icHJlc2VydmUiIGR5PSIxZW0iIHg9IjEiPm9iamVjdCB0eXBlKHMpPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L2c+PC9nPjwvZz48L2c+PC9zdmc+
MLS/MCS
MLS从Linux 2.6.12开始进入Linux内核,而SELinux大约是2.6.0开始进入内核。MLS与原始的SELinux支持的TE, RBAC鉴权手段是一种互补。具体可以阅读参考文献[7]。这篇文章来自Trusted Computer Solutions, Inc.(TCS)这家公司,是Linux内核MLS模块主要的设计者。文章写于2006年,估计是MLS合入内核不久。
A combination of MLS and TE creates a stronger, more functional system that benefits from the strengths of the two complementary models.
MLS models do not lend themselves easily to static analysis.
TE has deficiencies in handling a large number of labels or a dynamic work set of label names, especially in contrast to integrity concerns.
现在的MLS借助了RBAC定义的constrain机制,扩展了constrain语法,定义了所谓的mlsconstrain语法规则。为SELinux提供了基于Classification(Sensitivity Level)和Compartment(Category)语意的权限检查。
MLS是原始SELinux的扩展,所以在使能SELinux的时候也是可选的。你可以选择带MLS的SELinux,也可以选择不带MLS的SELinux。例如,在Fedora下的步骤如下:
- Install SELinux package
dnf install selinux-policy-mls
- Configure
/etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=mls
核心概念
MLS的核心理念由下图阐释了。
引用[2]中的一段话:
MLS在安全策略上有一个形象的描述叫no write down和no read up:
- 高级别的东西不能往低级别的东西里边写数据:这样可能导致高级别的数据泄露到低级别中。
- 高级别的东西只能从低级别的东西里边读数据
如图4中,Process的级别是Confidential,它可以往同级别的File B中读写数据,但是只能往高级别的File A(级别是Secret)里边写东西。Process可以从File C和File D中读数据,但是不能往File C和File D上写数据。
反过来说:
- 低级别的东西只能往高级别的东西里边写数据
- 低级别的东西不能从高级别的东西那边读数据
注:这里只考虑泄不泄密,不考虑溢出攻击
实现MLS的具体手段
主要就是在TE,RBAC的secure context之上,加了sensitivity和category两个字段。使能了MLS的secure context,格式如下:
user:role:type:sensitivity[:category,...]- sensitivity [:category,...]
举个实际的例子:
user_u:role_r:type_t:s0-s1:c0,c1-c255
s0 -- 最低sensitivity
s1:c0,c1-c255 -- 最高sensitivity
注:s0啥都不带代表
s0 is the lowest classification and contains no compartments, thus dominated by every label on the system.
那么怎么利用这组标签?MLS引入了扩展的constrain语法,称为mlsconstrain,格式为:
mlsconstrain class perm_set expression;
对比constrain语法:
constrain object_class_set perm_set expression;
一样啊,没有区别啊!区别在于expression。MLS的expression多了下面几个东西:
- l1, l2:小写的L。l1表示源的low senstivity level。l2表示target的low sensitivity。
- h1, h2:小写的H。h1表示源的high senstivity level。h2表示target的high sensitivity。
- l和h的关系,包括dom,domby,eq和incomp。
举个实际的例子:
# Datagram send: Sender must be dominated by receiver unless one of them is trusted.
mlsconstrain unix_dgram_socket { sendto }
(l1 domby l2 or t1 == mlstrustedsubject or t2 == mlstrustedsubject);
# mlstrustedsubject 是attribute
只有在以下3个条件之一成立的情况下,subject才能调用unix_dgram_socket class的object的sendto permission:
- l1 domby l2, l1 sensitivity小于l2 sensitivity
- t1匹配或者t2匹配标签mlstrustedsubject
总结
引用[6]中的几张图做个总结。
SELinux 顶层架构
SELinux 决策流程
Show me the code
参考[8], 下图是MLS的鉴权流程,但实际上SELinux的TE,RABC,MLS都是通过secure context的判断来鉴权的,它们的实现位置应该是在一起的。
参考文献
- 深入理解SELinux SEAndroid(第一部分)
- 深入理解SELinux SEAndroid之二
- 从头开始生成 SELinux
- SELinux学习笔记
- SELinux初始化登录用户安全上下文的方法
- Linux 基础 - 13. SELinux
- Chad Hanson, "SELinux and MLS: Putting the Pieces Together",Trusted Computer Solutions, Inc., 2006
- Linux强制访问控制机制模块详细描述(1)