Memory-safety issues and information leakage are known to be depressingly common. We consider the compositional static detection of these kinds of vulnerabilities in first-order C-like programs. Existing methods often treat one type of vulnerability (e.g. memory-safety) but not the other (e.g. information leakage). Indeed the latter are hyper-safety violations, making them more challenging to detect than the former. Existing leakage detection methods like Relational Symbolic Execution treat only non-interactive programs, avoiding the challenges raised by nondeterminism for reasoning about information leakage. Their implementations also do not treat non-trivial leakage policies like value-dependent classification, which are becoming increasingly common. Finally, being whole-program analyses they cannot be applied compositionally -- to deduce the presence of vulnerabilities in a program by analysing each of its parts -- thereby ruling out the possibility of incremental analysis. In this paper we remedy these shortcomings by presenting Insecurity Separation Logic (InsecSL), an under-approximate relational program logic for soundly detecting information leakage and memory-safety issues in interactive programs. We show how InsecSL can be soundly automated by bi-abduction based symbolic execution. Based on this, we design and implement a top-down, contextual, compositional, inter-procedural analysis for vulnerability detection. We implement our approach in a proof-of-concept tool, Underflow, for analysing C programs, which we demonstrate by applying it to various case studies.
翻译:众所周知,记忆安全问题和信息泄漏是常见的;我们认为,在一阶C类类似方案中,这类脆弱性的构成静态检测是一阶C式的,现有方法往往处理一种类型的脆弱性(如记忆安全),而没有处理另一种类型的脆弱性(如信息泄漏)。事实上,后者是高度安全违规,因此比前者更难检测。目前存在的渗漏检测方法,如 " 关系符号执行 " 等,只处理非互动程序,避免信息泄漏推理不彻底引起的挑战。它们的实施也并不处理非三阶渗漏政策,如越来越常见的依赖价值的分类。最后,由于整体方案分析不能从结构上进行,因此无法通过分析每个部分来推断方案存在的脆弱性,从而排除了进行递增分析的可能性。在本文件中,我们通过介绍 " 不安全隔离逻辑 " (InsecSL),这是在互动方案中正确检测信息渗漏和记忆安全问题的不完全不确切的关系方案逻辑。我们表明, " 系统 " 系统 " 系统 " 能够以结构化 " 系统化 " 自动地分析 ",通过双向下执行 " 系统分析 " 系统分析 ",我们 " 的 " 系统 " 系统 " 系统分析 " 系统 ", " 结构分析 " 系统 " 系统 " 进行 " 的 ", " 系统分析 " 系统 ", " 系统分析 " 系统分析 " 系统 " 系统 " 进行 ", " 进行 " 系统 " 进行 ", " 的 " 结构分析 " 系统 " 系统 " 进行 " 系统 ",通过 " 系统 " 进行 " 进行 " 系统 " 系统 " 系统 " 进行 " 系统分析, " 系统分析 " 系统 ", ", ", " 系统 " 进行 ", ", " 系统 " 进行 " 进行 " 进行 " 进行 " 分析, " 系统分析, ", " 系统分析, " 系统 " 系统 " 系统分析, " 进行 " 系统分析, " 以 " 系统 " 系统 " 以 " 系统 " 系统 " 以 " 系统 " 系统 " 系统 " 系统 " 系统 " 系统 " 系统 " 系统 " 系统 " 系统 "