paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An Empirical Analysis of Rust Integration in Android Open Source Project

Android 开源项目(AOSP)中 Rust 集成的实证分析
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 2/10 · 该论文是 Rust 在 AOSP 的纵向实证研究,关注内存安全迁移、平台集成与 unsafe 治理,属于软件工程/安全方向;与用户核心关注的静态分析、LLM/Agent 与程序分析交叉、浮点程序分析或贝叶斯程序分析没有直接关联。引用 0 inbox
Yinte Fan, Chao Wang, Zikan Dong, Tianming Liu, Haoyu Wang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:首次纵向实证刻画 Rust 在 AOSP 的采用轨迹、集成机制与 unsafe 治理,并评估其内存安全成效。

AOSP 支撑着全球最大的移动生态,但其原生组件长期受 C/C++ 手工内存管理导致的内存安全漏洞困扰。自 2021 年起 AOSP 引入具备编译期内存安全保障的 Rust。本文首次对该迁移进行纵向、系统的实证研究:分析 2021 年 1 月至 2024 年 10 月的 16 个季度快照,追踪采用趋势并刻画 Rust 代码在 67 个组件上的分布;将 Android 安全公告(ASB)漏洞与这些组件对齐,比较引入 Rust 前后的内存安全表现,并识别仍待迁移的非 Rust 热点;进而总结平台级集成机制,并通过大量 SAFETY 注释考察 unsafe 代码的治理实践,提炼可操作的最佳实践与反模式。结果厘清了 Rust 在这一安全攸关的移动平台中的采用、集成与治理角色,也为大规模生产系统中的内存安全迁移提供了实证基础与实践指导。

问题
AOSP 原生组件因 C/C++ 的内存管理缺陷而持续存在内存安全漏洞,Rust 迁移的实际轨迹、集成机制与安全成效此前缺乏系统性的实证证据。
方法
对 2021 年 1 月至 2024 年 10 月的 16 个季度快照做纵向分析,统计 Rust 在 67 个组件中的分布与采用趋势,将 ASB 漏洞与组件对齐,并对大规模 SAFETY 注释进行 unsafe 治理的质性分析。
评估
通过对比 Rust 引入前后相关组件的内存安全漏洞表现、识别剩余非 Rust 热点,并从 SAFETY 注释中归纳最佳实践与反模式来评估迁移成效。
原文摘要(Abstract)

The Android Open Source Project (AOSP) powers the world's largest mobile ecosystem, yet memory-safety vulnerabilities remain prevalent in native components due to the inherent risks of languages like C and C++, which allow manual memory management and unsafe operations. To mitigate these risks, AOSP began adopting Rust, a language with compile-time memory-safety guarantees, in 2021. However, the trajectory, mechanisms, and effectiveness of this transition remain empirically uncharted. We present the first longitudinal and systematic empirical study of Rust in AOSP. By analyzing 16 quarterly snapshots from January 2021 to October 2024, we track adoption trends and map the distribution of Rust code across 67 components. We further align Android Security Bulletin vulnerabilities with these components to assess memory-safety outcomes before and after Rust adoption, while also identifying the remaining non-Rust hotspots that may warrant future migration. In addition, we characterize platform-level integration mechanisms and examine unsafe governance through a large corpus of SAFETY comments, from which we distill actionable best practices and anti-patterns. Taken together, these results clarify Rust's role in AOSP by shedding light on its adoption, integration, and governance in a safety-critical mobile platform. They also provide industry practitioners with an empirical foundation and practical guidance for similar memory-safe migrations in large-scale production systems.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{FanWDLW26,
  title = {An Empirical Analysis of Rust Integration in Android Open Source Project},
  author = {Yinte Fan and Chao Wang and Zikan Dong and Tianming Liu and Haoyu Wang},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3805227}
}