Information flow security ensures that the secret data manipulated by a program does not influence its observable output. Proving information flow security is especially challenging for concurrent programs, where operations on secret data may influence the execution time of a thread and, thereby, the interleaving between different threads. Such internal timing channels may affect the observable outcome of a program even if an attacker does not observe execution times. Existing verification techniques for information flow security in concurrent programs attempt to prove that secret data does not influence the relative timing of threads. However, these techniques are often restrictive (for instance because they disallow branching on secret data) and make strong assumptions about the execution platform (ignoring caching, processor instructions with data-dependent runtime, and other common features that affect execution time). In this paper, we present a novel verification technique for secure information flow in concurrent programs that lifts these restrictions and does not make any assumptions about timing behavior. The key idea is to prove that all mutating operations performed on shared data commute, such that different thread interleavings do not influence its final value. Crucially, commutativity is required only for an abstraction of the shared data that contains the information that will be leaked to a public output. Abstract commutativity is satisfied by many more operations than standard commutativity, which makes our technique widely applicable. We formalize our technique in CommCSL, a relational concurrent separation logic with support for commutativity-based reasoning, and prove its soundness in Isabelle/HOL. We implemented CommCSL in HyperViper, an automated verifier based on the Viper verification infrastructure, and demonstrate its ability to verify challenging examples.
翻译:信息流安全确保程序操作的机密数据不会影响可观察的输出。对于并发程序来说,证明信息流安全尤其具有挑战性,因为对机密数据的操作可能会影响线程的执行时间和不同线程之间的交织。即使攻击者不观察执行时间,这样的内部时间通道也可能影响程序的可观察结果。现有的信息流安全验证技术针对并发程序尝试证明机密数据不会影响线程的相对时间。然而,这些技术通常是限制性的(例如,因为它们不允许有机密数据的分支),并对执行平台进行了强烈的假设(忽略了缓存、具有数据依赖的运行时处理器指令和其他常见的影响执行时间的特性)。在本文中,我们提出了一种针对并发程序的信息流安全验证技术,可以解除这些限制并且不对时序行为做任何假设。其关键思想是证明对共享数据执行的所有变异操作都是交换的,以使不同的线程交织不会影响其最终值。至关重要的是,交换性只对包含将泄漏到公共输出的信息的共享数据的抽象而言。抽象交换性比标准交换性更容易满足,这使得我们的技术具有广泛的适用性。我们在 CommCSL 中形式化了我们的技术,这是一种支持基于交换性推理的关系并发分离逻辑,并在 Isabelle/HOL 中证明了其合理性。我们在基于 Viper 验证基础设施的自动化验证器 HyperViper 中实现了 CommCSL,并证明了其验证具有挑战性的示例的能力。