Formalization, Implementation, and Verification of the Bluetooth L2CAP State Machine
Tan Khang Le, Mohammad Omidvar Tehrani, Yuepeng Wang, Jianliang Wu, Steven Y. Ko
摘要
The Logical Link Control and Adaptation Protocol (L2CAP) is a core Bluetooth component, and verifying its correctness is crucial for reliable and secure connectivity. However, verification can be challenging due to the complexity and ambiguities in its natural language (English) specification. In this paper, we present a formally verified implementation of the L2CAP state machine. Our approach introduces the Specification State Machine (SSM) to formalize the L2CAP state machine in the specification and the Operational State Machine (OSM) as an abstraction of the implementation. We then formally prove that (i) OSM refines SSM, and (ii) our implementation semantically conforms to OSM. By combining these two proofs, we verify that our implementation complies with our formalization of the specification. Furthermore, we define critical safety and liveness properties and formally prove that our implementation satisfies these guarantees. To ensure practicality, we implement the L2CAP state machine in Dafny and integrate it into Android's Fluoride Bluetooth stack. Our evaluation demonstrates that our formally verified implementation maintains competitive performance while ensuring formal correctness.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Formal Model-Driven Discovery of Bluetooth Protocol Design Vulnerabilities 引用了 BadBluetooth: Breaking Android Security Mechanisms via Malicious Bluetooth Peripherals
- Testing Dafny (experience paper) 引用了 Validating SMT solvers via semantic fusion
- Testing Dafny (experience paper) 引用了 Storage Systems are Distributed Systems (So Verify Them That Way!)
它引用的 Paper7
- Validating SMT solvers via semantic fusionDominik Winterer, Chengyu Zhang, Zhendong SuPLDI 2020 · 80 次引用
- Storage Systems are Distributed Systems (So Verify Them That Way!)Travis Hance, Andrea Lattuada, Chris Hawblitzel, Jon Howell 等OSDI 2020 · 52 次引用
- BadBluetooth: Breaking Android Security Mechanisms via Malicious Bluetooth PeripheralsFenghao Xu, Wenrui Diao, Zhou Li, Jiongyi Chen 等NDSS 2019 · 51 次引用
- Formal Model-Driven Discovery of Bluetooth Protocol Design VulnerabilitiesJianliang Wu, Ruoyu Wu, Dongyan Xu, Dave Jing Tian 等S&P 2022 · 36 次引用
- Testing Dafny (experience paper)Ahmed Irfan, Sorawee Porncharoenwase, Zvonimir Rakamaric, Neha Rungta 等ISSTA 2022 · 15 次引用
相关 Paper
- FormalJudge: A Neuro-Symbolic Paradigm for Agentic OversightJiayi Zhou, Yang Sheng, Hantao Lou, Yaodong Yang 等ICML 2026
- Formally Verifying the State Machine of TLS 1.3 Handshake in OpenSSLJingjing Guan, Hui Li, Xiangdong Li, Xiaolei Wang 等INFOCOM 2025 · 3 次引用
- DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent ProgramsAleksandr Fedchin, Antero Mejr, Hari Sundar, Jeffrey S. FosterPOPL 2026 · 1 次引用
- BSFuzzer: Context-Aware Semantic Fuzzing for BLE Logic Flaw DetectionTing Yang, Yue Qin, Lan Zhang, Zhiyuan Fu 等NDSS 2026 · 1 次引用
- BlueSWAT: A Lightweight State-Aware Security Framework for Bluetooth Low EnergyXijia Che, Yi He, Xuewei Feng, Kun Sun 等CCS 2024 · 10 次引用
