Documentation/translations/zh_CN/security/ipe.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/security/ipe.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/security/ipe.rst- Extension
.rst- Size
- 18227 bytes
- Lines
- 399
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/security/sak.rst
:翻译:
赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
完整性策略执行(IPE)-内核文档
==============================
.. NOTE::
这是针对开发人员而不是管理员的文档。如果您正在
寻找有关IPE使用的文档,请参阅 :doc:`IPE admin
guide </admin-guide/LSM/ipe>`。
历史背景
--------
最初促使IPE实施的原因,是需要创建一个锁定式系统。该系统将
从一开始就具备安全性,并且在可执行代码和系统功能关键的特定
数据文件上,提供强有力的完整性保障。只有当这些特定数据文件
符合完整性策略时,它们才可以被读取。系统中还将存在强制访问
控制机制,因此扩展属性(xattrs)也必须受到保护。这就引出了
需要选择能够提供完整性保证的机制。当时,有两种主要机制被考
虑,用以在满足这些要求的前提下保证系统完整性:
1. IMA + EVM Signatures
2. DM-Verity
这两个选项都经过了仔细考虑,然而在原始的IPE使用场景
中,最终选择DM-Verity而非IMA+EVM作为完整性机制,主
要有三个原因:
1. 防护额外的攻击途径
* 使用IMA+EVM时,如果没有加密解决方案,系统很容易受到
离线攻击,特别是针对上述特定数据文件的攻击。
与可执行文件不同,读取操作(如对受保护数据文件的读
取操作)无法强制性进行全局完整性验证。这意味着必须
有一种选择机制来决定是否应对某个读取操作实施完整性
策略。
在当时,这是通过强制访问控制标签来实现的,IMA策略会
指定哪些标签需要进行完整性验证,这带来了一个问题:
EVM虽然可以保护标签,但如果攻击者离线修改文件系统,
那么攻击者就可以清除所有的扩展属性(xattrs)——包括
用于确定文件是否应受完整性策略约束的SELinux标签。
使用DM-Verity,由于xattrs被保存为Merkel树的一部分,
如果对由dm-verity保护的文件系统进行了离线挂载,校验
和将不在匹配,文件将无法读取。
* 由于用户空间的二进制文件在Linux中是分页加载的,dm-
verity同样提供了对抗恶意块设备的额外保护。在这样的
攻击中,块设备最初报告适当的内容以供IMA哈希计算,通
过所需的完整性检查。然后,在访问真实数据时发生的页面
错误将报告攻击者的有效载荷。由于dm-verity会在页面错
误发生时检查数据(以及磁盘访问),因此这种攻击得到了
缓解。
2. 性能:
* dm-verity在块被读取时按需提供完整性验证,而不需要将整
个文件读入内存进行验证。
3. 签名的简化性:
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.