Adding Spatial Memory Safety to EDK II through Checked C (Experience Paper)
Embedded software, predominantly written in C, is prone to memory corruption vulnerabilities due to spatial memory issues. Although various memory safety techniques exist, they are often unsuitable for embedded systems due to resource constraints and a lack of standardized OS support. Checked C, a backward-compatible, memory-safe C dialect, offers a potential solution by using pointer annotations for runtime checks to enhance spatial memory safety with minimal overhead. This paper provides the first experience report of porting EDK2 (an open-source UEFI implementation), an exemplary embedded codebase to Checked C, highlighting challenges and providing insights into applying Checked C to similar embedded systems. We also provide an enhanced automated annotation tool e3c, which improves the conversion rate by 25%, enabling easier conversion to Checked C.
Authors
- Arunkumar Bhattar
- Aravind Machiry (ORCID: https://orcid.org/0000-0001-5124-6818)
- Sourag Cherupattamoolayil (ORCID: https://orcid.org/0009-0002-7199-1879)
- Connor Everett Glosner
Institutions
- Purdue University West Lafayette (US)
Publication Details
- Journal
- Proceedings of the ACM on software engineering.
- Published
- 2025-06-22
- DOI
- https://doi.org/10.1145/3728929
- Primary Topic
- Security and Verification in Computing
- Type
- article
- Field-Weighted Citation Impact
- 0.00