We introduce a scalable, modular, and sound approach for automatically constructing formal security specifications for Java bytecode programs in the form of method summaries. A summary provides an abstract representation of a method's security behavior, consisting of the conditions under which the method can be securely invoked, together with specifications of information flows and aliasing updates. Such summaries can be consumed by static code analysis tools and also help developers understand the behavior of code segments, such as libraries, in order to evaluate their security implications when reused in applications. Our approach is implemented in a tool called Symmaries, which automates the generation of security summaries. We applied Symmaries to Java API libraries to extract their security specifications and to large real-world applications to evaluate its scalability. Our results show that the tool successfully scales to analyze applications with hundreds of thousands of lines of code, and that Symmaries achieves a promising precision depending on the heap model used. We prove the soundness of our approach in terms of guaranteeing termination-insensitive non-interference.
翻译:本文提出一种可扩展、模块化且可靠的方法,用于以方法摘要的形式为Java字节码程序自动构建形式化安全规约。摘要提供了方法安全行为的抽象表示,包含方法可被安全调用的条件,以及信息流和别名更新的规约。此类摘要可被静态代码分析工具直接使用,同时帮助开发者理解代码段(如库函数)的行为,从而评估其在应用程序中复用时的安全影响。我们的方法通过名为Symmaries的工具实现,该工具实现了安全摘要的自动生成。我们将Symmaries应用于Java API库以提取其安全规约,并在大型实际应用程序中评估其可扩展性。实验结果表明,该工具能成功扩展到分析数十万行代码的应用程序,且根据所使用的堆模型,Symmaries达到了具有前景的精确度。我们在保证终止不敏感非干涉性的前提下证明了该方法的可靠性。