Documentation/translations/zh_CN/filesystems/ubifs-authentication.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/filesystems/ubifs-authentication.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/filesystems/ubifs-authentication.rst- Extension
.rst- Size
- 17776 bytes
- Lines
- 355
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
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/filesystems/ubifs-authentication.rst
:翻译:
邵明寅 Shao Mingyin <shao.mingyin@zte.com.cn>
:校译:
杨涛 yang tao <yang.tao172@zte.com.cn>
=============
UBIFS认证支持
=============
引言
====
UBIFS 利用 fscrypt 框架为文件内容及文件名提供保密性。这能防止攻击者在单一
时间点读取文件系统内容的攻击行为。典型案例是智能手机丢失时,攻击者若没有文件
系统解密密钥则无法读取设备上的个人数据。
在现阶段,UBIFS 加密尚不能防止攻击者篡改文件系统内容后用户继续使用设备的攻
击场景。这种情况下,攻击者可任意修改文件系统内容而不被用户察觉。例如修改二
进制文件使其执行时触发恶意行为 [DMC-CBC-ATTACK]。由于 UBIFS 大部分文件
系统元数据以明文存储,使得文件替换和内容篡改变得相当容易。
其他全盘加密系统(如 dm-crypt)可以覆盖所有文件系统元数据,这类系统虽然能
增加这种攻击的难度,但特别是当攻击者能多次访问设备时,也有可能实现攻击。对于
基于 Linux 块 IO 层的 dm-crypt 等文件系统,可通过 dm-integrity 或
dm-verity 子系统[DM-INTEGRITY, DM-VERITY]在块层实现完整数据认证,这些
功能也可与 dm-crypt 结合使用[CRYPTSETUP2]。
本文描述一种为 UBIFS 实现文件内容认证和完整元数据认证的方法。由于 UBIFS
使用 fscrypt 进行文件内容和文件名加密,认证系统可与 fscrypt 集成以利用密
钥派生等现有功能。但系统同时也应支持在不启用加密的情况下使用 UBIFS 认证。
MTD, UBI & UBIFS
----------------
在 Linux 中,MTD(内存技术设备)子系统提供访问裸闪存设备的统一接口。运行于
MTD 之上的重要子系统是 UBI(无序块映像),它为闪存设备提供卷管理功能,类似
于块设备的 LVM。此外,UBI 还处理闪存特有的磨损均衡和透明 I/O 错误处理。
UBI 向上层提供逻辑擦除块(LEB),并透明地映射到闪存的物理擦除块(PEB)。
UBIFS 是运行于 UBI 之上的裸闪存文件系统。因此 UBI 处理磨损均衡和部分闪存
特性,而 UBIFS专注于可扩展性、性能和可恢复性。
::
+------------+ +*******+ +-----------+ +-----+
| | * UBIFS * | UBI-BLOCK | | ... |
| JFFS/JFFS2 | +*******+ +-----------+ +-----+
| | +-----------------------------+ +-----------+ +-----+
| | | UBI | | MTD-BLOCK | | ... |
+------------+ +-----------------------------+ +-----------+ +-----+
+------------------------------------------------------------------+
| MEMORY TECHNOLOGY DEVICES (MTD) |
+------------------------------------------------------------------+
+-----------------------------+ +--------------------------+ +-----+
| NAND DRIVERS | | NOR DRIVERS | | ... |
+-----------------------------+ +--------------------------+ +-----+
图1:处理裸闪存的 Linux 内核子系统
UBIFS 内部维护多个持久化在闪存上的数据结构:
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.