arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.11282cs.PL
收藏

内存安全的降级语义(扩展版)

The downgrading semantics of memory safety (Extended version)

Aalborg University(奥尔堡大学);Aarhus University(奥胡斯大学)

René Rydhof Hansen, Andreas Stenbæk Larsen, Aslan Askarov

AI总结:

本文提出渐进分配器独立性概念,通过降级机制处理内存安全问题,如空指针解引用和堆溢出,结合信息流技术实现安全分析。

摘要:

内存安全传统上通过无法发生的坏事来定义,但缺乏一般语义原则。本文聚焦分配器特定的内存安全问题,提出渐进分配器独立性,将非干扰与降级结合,利用信息流技术处理分配器内存不足和指针到整数转换等扩展。

英文摘要:

Memory safety is traditionally characterized in terms of bad things that cannot happen. This approach is currently embraced in the literature on formal methods for memory safety. However, a general semantic principle for memory safety, that implies the negative items, remains elusive. This paper focuses on the allocator-specific aspects of memory safety, such as null-pointer dereference, use after free, double free, and heap overflow. To that extent, we propose a notion of gradual allocator independence that accurately captures the allocator-dependent aspects of memory safety. Our approach is inspired by the previously suggested connection between memory safety and noninterference, but extends that connection in a fundamentally important direction towards downgrading. We consider a low-level language with access to an allocator that provides malloc and free primitives in a flat memory model. Pointers are just integers, and as such it is trivial to write memory-unsafe programs. The basic intuition of gradual allocator independence is that of noninterference, namely that allocators must not influence program execution. This intuition is refined in two important ways that account for the allocators running out-of-memory and for programs to have pointer-to-integer casts. The key insight of the definition is to treat these extensions as forms of downgrading and give them satisfactory technical treatment using the state-of-the-art information flow machinery.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑