A Dependent Nominal Physical Type System for Static Analysis of Memory in Low Level Code
Julien Simonnet, Matthieu Lemerre, Mihaela Sighireanu
摘要
We tackle the problem of checking non-proof-carrying code , i.e. automatically proving type-safety (implying in our type system spatial memory safety) of low-level C code or of machine code resulting from its compilation without modification. This requires a precise static analysis that we obtain by having a type system which (i) is expressive enough to encode common low-level idioms, like pointer arithmetic, discriminating variants by bit-stealing on aligned pointers, storing the size and the base address of a buffer in distinct parts of the memory, or records with flexible array members, among others; and (ii) can be embedded in an abstract interpreter. We propose a new type system that meets these criteria. The distinguishing feature of this type system is a nominal organization of contiguous memory regions, which (i) allows nesting, concatenation, union, and sharing parameters between regions; (ii) induces a lattice over sets of addresses from the type definitions; and (iii) permits updates to memory cells that change their type without requiring one to control aliasing. We provide a semantic model for our type system, which enables us to derive sound type checking rules by abstract interpretation, then to integrate these rules as an abstract domain in a standard flow-sensitive static analysis. Our experiments on various challenging benchmarks show that semantic type-checking using this expressive type system generally succeeds in proving type safety and spatial memory safety of C and machine code programs without modification, using only user-provided function prototypes.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper1
问问它们各自怎么用它它引用的顶会 Paper3
- RefinedC: automating the foundational verification of C code with refined ownership typesMichael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian 等PLDI 2021 · 被引用 83 次
- VIP: verifying real-world C idioms with integer-pointer castsRodolphe Lepigre, Michael Sammler, Kayvan Memarian, Robbert Krebbers 等POPL 2022 · 被引用 11 次
- SSA Translation Is an Abstract InterpretationMatthieu LemerrePOPL 2023 · 被引用 7 次
相关 Paper
- A type system for extracting functional specifications from memory-safe imperative programsPaul He, Eddy Westbrook, Brent Carmer, Chris Phifer 等OOPSLA 2021 · 被引用 5 次
- When Good Components Go Bad: Formally Secure Compilation Despite Dynamic CompromiseCarmine Abate, Arthur Azevedo de Amorim, Roberto Blanco, Ana Nora Evans 等CCS 2018 · 被引用 43 次
- Arithmetizing Shape AnalysisSebastian Wolff, Ekanshdeep Gupta, Zafer Esen, Hossein Hojjat 等CAV 2025
- C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline 等OOPSLA 2022 · 被引用 20 次
- Deciding memory safety for single-pass heap-manipulating programsUmang Mathur, Adithya Murali, Paul Krogmeier, P. Madhusudan 等POPL 2020 · 被引用 11 次
