arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.05474cs.CRcs.SE
收藏

ShadowProbe:语言可扩展的隐藏算法复杂性漏洞检测

ShadowProbe: Language-Extensible Detection of Hidden Algorithmic Complexity Vulnerabilities

Tsinghua University(清华大学);Ocean University of China(中国海洋大学);QI-ANXIN Technology Research Institute(奇安信技术研究院);Southeast University(东南大学);University of Waterloo(滑铁卢大学)

Yuanmin Xie, Xiangfan Wu, Wenhao Wu, Lingyun Ying, Puzhuo Liu, Haipeng Qu, Zhongyuan Chen, Min Zhou, Chengnian Sun

AI总结:

研究针对算法复杂性漏洞,提出ShadowProbe框架,通过轻量级静态分析、自动重建执行上下文及大语言模型辅助测试生成来检测。经实验验证,该框架能有效识别不同代码库中的隐藏算法风险,提升分析效率,发现诸多未知漏洞。

摘要:

算法复杂性漏洞(ACV)在对抗性输入触发最坏情况执行行为时出现,导致严重性能下降或拒绝服务情况。一个关键但未充分探索的来源是影子复杂性,即隐藏在看似良性的标准库API中的非平凡计算成本。现有ACV检测器通常依赖模糊测试、符号执行或混合分析,存在语言特定性、需大量人工构建测试框架以及依赖繁重运行时检测等问题。我们提出了ShadowProbe,一个通过轻量级静态分析、执行上下文自动重建和大语言模型辅助测试生成来发现ACV的可扩展且语言可扩展的框架。它使用结构化多阶段管道,通过影子复杂性信号静态筛选候选函数,从项目级符号重建最小可执行上下文,合成大小可控的输入来探测最坏情况行为,然后使用运行时测量和稳健统计增长推断验证候选者,将真正的算法爆炸与运行时噪声分离。我们在WISE基准上评估了ShadowProbe,它在分析效率上持续优于现有方法。我们还将其应用于包括CPython、JDK、Zig、Rustc和vLLM在内的大规模系统,发现了许多以前未知的ACV,其中许多已得到维护者确认并部分修复。这些结果表明ShadowProbe可以识别不同实际代码库中的隐藏算法风险。

英文摘要:

Algorithmic Complexity Vulnerabilities (ACVs) arise when adversarial inputs trigger worst-case execution behavior, causing severe performance degradation or Denial-of-Service conditions. A key but underexplored source is shadow complexity: non-trivial computational costs hidden inside seemingly benign standard library APIs. Because these costs are invisible at call sites, attackers can exploit them to induce unexpected superlinear runtime behavior. Existing ACV detectors often rely on fuzzing, symbolic execution, or hybrid analysis, but they are usually language-specific, require substantial manual effort to construct harnesses, and depend on heavy runtime instrumentation. We present ShadowProbe, a scalable and language-extensible framework for discovering ACVs through lightweight static analysis, automated reconstruction of execution contexts, and Large Language Model (LLM) assisted test generation. ShadowProbe uses a structured multi-stage pipeline: it statically screens for candidate functions guided by shadow-complexity signals, reconstructs minimal executable contexts from project-level symbols, and synthesizes size-controlled inputs to probe worst-case behavior. It then validates candidates using execution-time measurements and robust statistical growth inference, separating true algorithmic blowups from runtime noise such as garbage collection and JIT compilation effects. We evaluate ShadowProbe on the WISE benchmark, where it consistently improves analysis efficiency over existing approaches. We further apply it to large-scale systems including CPython, the JDK, Zig, Rustc, and vLLM, uncovering many previously unknown ACVs, many of which have been confirmed and partially remediated by maintainers. These results show that ShadowProbe can identify hidden algorithmic risks across diverse real-world codebases.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑