一句话:首个面向并发程序、在内存等非单调资源度量下可靠的(相对完备的)最坏情况输入生成算法,结合资源标注会话类型与符号执行。
最坏情况输入生成可自动构造使程序性能最差的输入,用于检测拒绝服务(DoS)等漏洞,但对并发程序十分困难:内存等非单调资源的峰值开销取决于进程调度。本文提出首个面向此类资源度量的可靠最坏情况输入生成算法。其核心是将资源标注会话类型与符号执行结合:会话类型刻画进程演算中通道上的通信协议,资源标注既编码开销上界,也标明进程间可复用与可转移的资源量,从而在符号执行中定位最坏情况执行路径。算法具有可靠性(返回的输入必为合法最坏情况输入),并在资源标注会话类型足够表达、SMT 背景理论可判定时相对完备。Web 服务器内存使用案例展示了其实用性。
Worst-case input generation aims to automatically generate inputs that exhibit the worst-case performance of programs. It has several applications, and can, for example, detect vulnerabilities to denial-of-service (DoS) attacks. However, it is non-trivial to generate worst-case inputs for concurrent programs, particularly for resources like memory where the peak cost depends on how processes are scheduled. This article presents the first sound worst-case input generation algorithm for concurrent programs under non-monotone resource metrics like memory. The key insight is to leverage resource-annotated session types and symbolic execution. Session types describe communication protocols on channels in process calculi. Equipped with resource annotations, resource-annotated session types not only encode cost bounds but also indicate how many resources can be reused and transferred between processes. This information is critical for identifying a worst-case execution path during symbolic execution. The algorithm is sound: if it returns any input, it is guaranteed to be a valid worst-case input. The algorithm is also relatively complete: as long as resource-annotated session types are sufficiently expressive and the background theory for SMT solving is decidable, a worst-case input is guaranteed to be returned. A simple case study of a web server's memory usage demonstrates the utility of the worst-case input generation algorithm.
@article{paperbot2695,
title = {Worst-Case Input Generation for Concurrent Programs under Non-Monotone Resource Metrics},
author = {Long Pham and Jan Hoffmann},
journal = {Logical Methods in Computer Science},
volume = {Volume 20, Issue 4},
year = {2024},
doi = {10.46298/lmcs-20(4:26)2024}
}