Many important security properties can be formulated in terms of flows of tainted data, and improved taint analysis tools to prevent such flows are of critical need. Most existing taint analyses use whole-program static analysis, leading to scalability challenges. Type-based checking is a promising alternative, as it enables modular and incremental checking for fast performance. However, type-based approaches have not been widely adopted in practice, due to challenges with false positives and annotating existing codebases. In this paper, we present a new approach to type-based checking of taint properties that addresses these challenges, based on two key techniques. First, we present a new type-based tainting checker with significantly reduced false positives, via more practical handling of third-party libraries and other language constructs. Second, we present a novel technique to automatically infer tainting type qualifiers for existing code. Our technique supports inference of generic type argument annotations, crucial for tainting properties. We implemented our techniques in a tool TaintTyper and evaluated it on real-world benchmarks. TaintTyper exceeds the recall of a state-of-the-art whole-program taint analyzer, with comparable precision, and 2.93X-22.9X faster checking time. Further, TaintTyper infers annotations comparable to those written by hand, suitable for insertion into source code. TaintTyper is a promising new approach to efficient and practical taint checking.
State Space Estimation for DPOR-based Model Checkers(Extended Version)
Max Planck Institute for Software Systems(马克斯·普朗克软件系统研究所);National University of Singapore(新加坡国立大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
Just-in-Time Static Type Checking for Dynamic Languages
Ruby、Python和JavaScript等动态语言有许多令人信服的优点,但缺乏静态类型意味着细微的错误可能会在代码中潜伏很长时间。虽然许多研究人员已经开发了各种系统,将静态类型的一些好处带到动态语言中,但以前的方法在处理元编程时遇到了麻烦,元编程在程序执行时生成代码。在本文中,我们提出了蜂鸟,一个新的系统,使用一种新的技术,即时静态类型检查,类型检查Ruby代码,即使在元编程的存在。在Hummingbird中,方法类型签名是在运行时动态收集的,因为这些方法是创建的。当一个方法被调用时,Hummingbird会根据当前的类型签名对方法体进行静态类型检查。因此,Hummingbird在每个方法的基础上提供了彻底的静态检查,同时也允许任意复杂的元编程。为了提高性能,Hummingbird会记住静态类型检查过程,仅在必要时才使缓存检查无效。我们使用一个核心的,类似Ruby的语言形式化Hummingbird,并证明它的声音。为了评估Hummingbird,我们将其应用于六个应用程序,其中三个使用Ruby on Rails,这是一个非常依赖元编程的强大框架。我们发现,所有的应用程序都成功地使用Hummingbird进行了类型检查,并且Hummingbird的性能开销是合理的。我们将Hummingbird应用到一个Rails应用的早期版本中,发现了几个引入并修复的类型错误。最后,我们演示了在…