第六板块:Android 安全与权限体系 | 第十九篇:SELinux 强制访问控制与沙箱机制
所属板块:第六板块 --- Android 安全与权限体系
前置知识:第十八篇中的电源管理、Linux 内核基础、Binder IPC、进程隔离
本篇定位 :这是 Android 系统安全的最后一道防线 。如果说 Linux 的 DAC(自主访问控制)是小区门禁,那么 SELinux(Security-Enhanced Linux) 就是每家每户的防盗门 。本篇将彻底拆解 LSM(Linux Security Modules)框架 、SELinux 的策略语言(Policy Language) 、安全上下文(Security Context) 、访问向量缓存(AVC) 、Android 的 enforcing 模式与 neverallow 规则 。我们将深入 Kernel Security Module 与 Userspace SEAndroid ,揭示 Android 如何从内核层到应用层构建纵深防御体系。全程无权限申请技巧、无安全开发指南,仅保留 Android 安全架构的底层定义与强制访问控制规范。
1. 核心结论先行(Thesis Statement)
Android 的安全模型是一个双栈防御体系。
- DAC(Discretionary Access Control)的本质 :基于用户的隔离 。它是 Linux 的传统权限(rwx),通过 UID/GID 控制文件访问。它是第一道防线 ,但存在权限提升漏洞(如 root)。
- MAC(Mandatory Access Control)的本质 :基于规则的强制隔离 。它是 SELinux 的核心,通过 安全上下文 定义"主体(Subject)"对"客体(Object)"的访问权限。即使你是 root,违反规则也会被拒绝。
- SELinux 的本质 :一个内核级的状态机 。它在 Linux 内核中注册一个 LSM Hook ,拦截所有系统调用(如
open,read,write),并根据策略库(Policy Database)决定是否放行。 - Android 沙箱的本质 :DAC + MAC 的双重囚笼。每个应用运行在独立的 UID 下(DAC),并被 SELinux 策略严格限制(MAC),使其无法越狱到其他应用或系统区域。
2. SELinux 架构全景图
2.1 内核层与用户层的交互
#mermaid-svg-UqFeIuszc08iaxYH{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-UqFeIuszc08iaxYH .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-UqFeIuszc08iaxYH .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-UqFeIuszc08iaxYH .error-icon{fill:#552222;}#mermaid-svg-UqFeIuszc08iaxYH .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-UqFeIuszc08iaxYH .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-UqFeIuszc08iaxYH .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-UqFeIuszc08iaxYH .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-UqFeIuszc08iaxYH .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-UqFeIuszc08iaxYH .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-UqFeIuszc08iaxYH .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-UqFeIuszc08iaxYH .marker{fill:#333333;stroke:#333333;}#mermaid-svg-UqFeIuszc08iaxYH .marker.cross{stroke:#333333;}#mermaid-svg-UqFeIuszc08iaxYH svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-UqFeIuszc08iaxYH p{margin:0;}#mermaid-svg-UqFeIuszc08iaxYH .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-UqFeIuszc08iaxYH .cluster-label text{fill:#333;}#mermaid-svg-UqFeIuszc08iaxYH .cluster-label span{color:#333;}#mermaid-svg-UqFeIuszc08iaxYH .cluster-label span p{background-color:transparent;}#mermaid-svg-UqFeIuszc08iaxYH .label text,#mermaid-svg-UqFeIuszc08iaxYH span{fill:#333;color:#333;}#mermaid-svg-UqFeIuszc08iaxYH .node rect,#mermaid-svg-UqFeIuszc08iaxYH .node circle,#mermaid-svg-UqFeIuszc08iaxYH .node ellipse,#mermaid-svg-UqFeIuszc08iaxYH .node polygon,#mermaid-svg-UqFeIuszc08iaxYH .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-UqFeIuszc08iaxYH .rough-node .label text,#mermaid-svg-UqFeIuszc08iaxYH .node .label text,#mermaid-svg-UqFeIuszc08iaxYH .image-shape .label,#mermaid-svg-UqFeIuszc08iaxYH .icon-shape .label{text-anchor:middle;}#mermaid-svg-UqFeIuszc08iaxYH .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-UqFeIuszc08iaxYH .rough-node .label,#mermaid-svg-UqFeIuszc08iaxYH .node .label,#mermaid-svg-UqFeIuszc08iaxYH .image-shape .label,#mermaid-svg-UqFeIuszc08iaxYH .icon-shape .label{text-align:center;}#mermaid-svg-UqFeIuszc08iaxYH .node.clickable{cursor:pointer;}#mermaid-svg-UqFeIuszc08iaxYH .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-UqFeIuszc08iaxYH .arrowheadPath{fill:#333333;}#mermaid-svg-UqFeIuszc08iaxYH .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-UqFeIuszc08iaxYH .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-UqFeIuszc08iaxYH .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-UqFeIuszc08iaxYH .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-UqFeIuszc08iaxYH .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-UqFeIuszc08iaxYH .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-UqFeIuszc08iaxYH .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-UqFeIuszc08iaxYH .cluster text{fill:#333;}#mermaid-svg-UqFeIuszc08iaxYH .cluster span{color:#333;}#mermaid-svg-UqFeIuszc08iaxYH div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-UqFeIuszc08iaxYH .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-UqFeIuszc08iaxYH rect.text{fill:none;stroke-width:0;}#mermaid-svg-UqFeIuszc08iaxYH .icon-shape,#mermaid-svg-UqFeIuszc08iaxYH .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-UqFeIuszc08iaxYH .icon-shape p,#mermaid-svg-UqFeIuszc08iaxYH .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-UqFeIuszc08iaxYH .icon-shape .label rect,#mermaid-svg-UqFeIuszc08iaxYH .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-UqFeIuszc08iaxYH .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-UqFeIuszc08iaxYH .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-UqFeIuszc08iaxYH :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 用户空间
Linux 内核
应用进程
- 系统调用 (open('/data/app/file'))
- 安全检查
- 查询缓存
- 命中?
- 返回 Allow/Deny
- 决策
- 允许/拒绝
编译策略
加载
App (UID 10001)
LSM Hook (Security Module)
SELinux Module
Access Vector Cache
Policy Database (Binary)
sepolicy-analyze / audit2allow
file_contexts / sepolicy
2.2 核心组件定义
| 组件 | 层级 | 职责 | 学术定义 |
|---|---|---|---|
| LSM Hook | 内核 | 拦截点 | 在内核关键路径(如 inode_permission)插入的回调函数。 |
| SELinux Module | 内核 | 裁决者 | 实现 LSM 接口的模块,执行策略检查。 |
| AVC (Access Vector Cache) | 内核 | 缓存 | 缓存最近的访问决策,避免每次查询策略库。 |
| Policy Database | 内核 | 规则库 | 编译后的二进制策略,定义所有主体客体的访问规则。 |
| Security Context | 内核/用户 | 标签 | 分配给每个进程、文件、端口的字符串标签(如 u:r:untrusted_app:s0)。 |
3. 安全上下文(Security Context)
3.1 上下文的格式
安全上下文是 SELinux 的 DNA,格式为:user:role:type:level。
| 字段 | 含义 | Android 示例 | 学术定义 |
|---|---|---|---|
| User | 用户 | u (unconfined_u) |
SELinux 用户,不同于 Linux UID。 |
| Role | 角色 | r (object_r) |
定义用户可以进入的角色。 |
| Type | 类型 | untrusted_app |
核心字段。定义主体的域(Domain)或客体的类型(Type)。 |
| Level | 安全级别 | s0 |
MLS/MCS 级别,用于多级安全(如军事机密)。 |
3.2 进程与文件的上下文
bash
# 查看进程上下文
ps -Z
# 输出: u:r:untrusted_app:s0:c512,c768 com.example.app
# 查看文件上下文
ls -Z /data/data/com.example.app/
# 输出: u:object_r:app_data_file:s0 cache
学术定义:
- 域(Domain) :进程的 Type(如
untrusted_app)。它定义了进程能做什么。 - 类型(Type) :文件的 Type(如
app_data_file)。它定义了文件能被谁访问。 - TE(Type Enforcement):SELinux 的核心规则,基于 Type 进行访问控制。
4. TE 策略语言(Type Enforcement)
4.1 规则语法
SELinux 策略由一系列规则组成,基本语法为:
rule_type source_type target_type : class permissions;
| 规则类型 | 含义 | 示例 |
|---|---|---|
| allow | 允许访问 | allow untrusted_app app_data_file:file { read write }; |
| neverallow | 禁止访问 | neverallow untrusted_app system_file:file write; |
| dontaudit | 不记录审计 | dontaudit domain self:capability sys_admin; |
4.2 Android 中的关键策略
Android 定义了数百条策略,以下是核心策略:
| 策略文件 | 作用 | 学术定义 |
|---|---|---|
| domain.te | 通用域规则 | 定义所有域的基础权限(如访问 property_service)。 |
| untrusted_app.te | 第三方应用 | 严格限制第三方应用,禁止访问系统文件。 |
| system_app.te | 系统应用 | 允许系统应用访问更多系统资源。 |
| file_contexts | 文件标签 | 定义 /system, /data, /dev 等目录下文件的 Type。 |
| seapp_contexts | 应用上下文 | 根据 UID 和包名,为应用分配安全上下文。 |
4.3 neverallow 规则的重要性
neverallow 是 Android 安全的基石。它确保即使策略编写错误,也不会出现危险的权限。
源码示例:
te
# system/sepolicy/public/domain.te
neverallow {
domain
-init
-ueventd
} self:capability sys_module;
学术定义 :禁止除 init 和 ueventd 外的所有域(domain)使用 CAP_SYS_MODULE 权限(加载内核模块)。这是防止 root 攻击的关键。
5. 访问向量缓存(AVC)与审计
5.1 AVC 的工作流程
当进程访问资源时:
- LSM Hook 触发,调用 SELinux。
- SELinux 检查 AVC。
- 如果 AVC 中有缓存结果,直接返回。
- 如果没有,查询 Policy Database。
- Policy Database 根据规则返回 Allow 或 Deny。
- AVC 缓存结果。
- Audit Log :如果决策是 Deny,记录到
dmesg或logcat。
5.2 审计日志解析
bash
# logcat 中的 SELinux 拒绝日志
avc: denied { write } for pid=1234 comm="app" name="system_file" dev="dm-0" ino=456 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
| 字段 | 含义 |
|---|---|
denied { write } |
拒绝了写操作。 |
scontext=u:r:untrusted_app:s0 |
源上下文(应用进程)。 |
tcontext=u:object_r:system_file:s0 |
目标上下文(系统文件)。 |
tclass=file |
目标类别(文件)。 |
permissive=0 |
强制模式(Enforcing),如果是 1 则是宽容模式(Permissive)。 |
6. Android 的 SELinux 模式
6.1 Enforcing 与 Permissive
| 模式 | 行为 | 适用场景 |
|---|---|---|
| Enforcing | 强制执行,拒绝并记录 | 正式版系统。 |
| Permissive | 只记录,不拒绝 | 调试和策略开发。 |
学术定义:
- Permissive 模式:用于开发阶段。当策略不完善时,系统不会崩溃,但会记录所有违规行为,方便开发者修复策略。
- Enforcing 模式:生产环境。任何违反策略的行为都会被拒绝,确保系统安全。
6.2 如何切换模式
bash
# 查看当前模式
getenforce
# 临时切换到 Permissive
setenforce 0
# 临时切换到 Enforcing
setenforce 1
7. Android 沙箱机制(DAC + MAC)
7.1 应用沙箱的双重囚笼
| 层级 | 机制 | 作用 |
|---|---|---|
| 第一层 (DAC) | UID/GID | 应用运行在独立 UID(如 10001),文件权限 rwx------。 |
| 第二层 (MAC) | SELinux | 应用进程被限制在 untrusted_app 域,只能访问 app_data_file。 |
7.2 沙箱逃逸的防御
| 攻击方式 | 防御机制 |
|---|---|
| 提权到 root | SELinux 的 neverallow 规则禁止 root 访问系统文件。 |
| 访问其他应用数据 | DAC 隔离 + SELinux 禁止跨域访问。 |
| 访问系统文件 | SELinux 禁止 untrusted_app 写入 system_file。 |
| 内核漏洞利用 | LSM Hook 在内核层拦截,即使漏洞利用成功,SELinux 仍可阻止恶意行为。 |
8. 关键源码深度解析
8.1 LSM Hook 的实现(内核)
c
// kernel/security/selinux/hooks.c
static int selinux_file_open(struct file *file) {
struct task_security_struct *tsec = current_security();
struct inode_security_struct *isec = file_inode(file)->i_security;
u32 sid = tsec->sid;
u32 isid = isec->sid;
// 检查是否允许打开
return avc_has_perm(sid, isid, SECCLASS_FILE, FILE__OPEN, NULL);
}
8.2 sepolicy 的编译流程
#mermaid-svg-ZjVOiRlwZTsbeBYZ{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .error-icon{fill:#552222;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .marker.cross{stroke:#333333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ p{margin:0;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .cluster-label text{fill:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .cluster-label span{color:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .cluster-label span p{background-color:transparent;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .label text,#mermaid-svg-ZjVOiRlwZTsbeBYZ span{fill:#333;color:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .node rect,#mermaid-svg-ZjVOiRlwZTsbeBYZ .node circle,#mermaid-svg-ZjVOiRlwZTsbeBYZ .node ellipse,#mermaid-svg-ZjVOiRlwZTsbeBYZ .node polygon,#mermaid-svg-ZjVOiRlwZTsbeBYZ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .rough-node .label text,#mermaid-svg-ZjVOiRlwZTsbeBYZ .node .label text,#mermaid-svg-ZjVOiRlwZTsbeBYZ .image-shape .label,#mermaid-svg-ZjVOiRlwZTsbeBYZ .icon-shape .label{text-anchor:middle;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .rough-node .label,#mermaid-svg-ZjVOiRlwZTsbeBYZ .node .label,#mermaid-svg-ZjVOiRlwZTsbeBYZ .image-shape .label,#mermaid-svg-ZjVOiRlwZTsbeBYZ .icon-shape .label{text-align:center;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .node.clickable{cursor:pointer;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .arrowheadPath{fill:#333333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ZjVOiRlwZTsbeBYZ .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZjVOiRlwZTsbeBYZ .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ZjVOiRlwZTsbeBYZ .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .cluster text{fill:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .cluster span{color:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ZjVOiRlwZTsbeBYZ rect.text{fill:none;stroke-width:0;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .icon-shape,#mermaid-svg-ZjVOiRlwZTsbeBYZ .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .icon-shape p,#mermaid-svg-ZjVOiRlwZTsbeBYZ .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .icon-shape .label rect,#mermaid-svg-ZjVOiRlwZTsbeBYZ .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ZjVOiRlwZTsbeBYZ .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ZjVOiRlwZTsbeBYZ .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ZjVOiRlwZTsbeBYZ :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} checkpolicy
fc_sort
sepolicy
sepolicy
加载到内核
.te 策略文件
.conf 中间文件
file_contexts
sorted_contexts
binary policy
/sys/fs/selinux/load
9. 常见安全漏洞与 SELinux 的防御
9.1 脏牛漏洞(Dirty COW)
| 漏洞 | SELinux 防御 |
|---|---|
| 写时复制竞态条件 | SELinux 限制了对 su 二进制文件和 system 分区的写权限,即使利用漏洞,也无法替换系统文件。 |
9.2 权限提升
| 攻击 | SELinux 防御 |
|---|---|
| ptrace 附加调试 | SELinux 策略 neverallow untrusted_app self:process ptrace; 禁止应用调试其他进程。 |
| 加载内核模块 | neverallow domain self:capability sys_module; 禁止加载模块。 |
10. 本篇总结(Knowledge Closure)
| 关键点 | 纯学术定义 |
|---|---|
| SELinux 的本质 | 内核级强制访问控制,基于安全上下文的规则引擎。 |
| DAC vs MAC | DAC 基于用户,MAC 基于规则;MAC 是 DAC 的补充和增强。 |
| TE 策略 | 基于类型的强制访问控制,通过 allow/neverallow 规则定义访问。 |
| AVC 缓存 | 内核中的决策缓存,提升性能。 |
| Android 沙箱 | UID 隔离(DAC) + SELinux 域限制(MAC)的双重防御。 |
下一篇预告 :第六板块:Android 安全与权限体系 | 第二十篇:应用签名、权限机制与 PackageManagerService 的安全校验