AegisAsync:针对Python异步程序风险的符号化异步事件模拟工具
AegisAsync: Symbolic Async-Event Simulation for Risks in Python Asynchronous Programs
AI总结:
AegisAsync是针对Python异步程序风险的字节码分析工具,通过异步事件转换图与有界路径局部模拟检测风险,在AsyncBench等基准中表现优异,已发现并报告大量漏洞。
摘要:
Python异步程序的安全性与健壮性风险依赖于事件顺序、对象身份以及异常或取消后的执行情况。检测这些风险需要关联跨函数调用的相关操作,并沿执行路径追踪其影响。我们提出AegisAsync,这是针对CPython 3.10-3.14版本的基于字节码的Python异步风险分析工具。其异步事件转换图结合了字节码控制流、已解析调用、异步事件和符号对象关系。有界路径局部模拟追踪事件顺序和对象状态,并在await挂起点探索取消情况。六个检测器插件评估生成的轨迹和状态,以产生带有支持性见证的候选结果。在包含180个标注风险的基准AsyncBench上,AegisAsync在五个版本中均检测到所有标注风险且零误报。在对2500个PyPI包版本的五个路径预算测试中,源代码审查确认了910条AegisAsync候选记录中的457条(占比50.2%),对应457个独特漏洞;在三个flake8-async样本中,2187条审查判断中的70条得到确认(占比3.2%)。截至提交时,166个概念验证(PoC)可复现AegisAsync的发现,我们已向开发者报告157个漏洞,其中16个已被确认并修复。
英文摘要:
Security and robustness risks in Python async programs depend on event order, object identity, and execution after exceptions or cancellation. Detecting these risks requires connecting related operations across function calls and tracking their effects along execution paths. We present AegisAsync, a bytecode-based analysis of Python async risks for CPython 3.10-3.14. Its Async Event Transition Graph combines bytecode control flow, resolved calls, async events, and symbolic object relations. Bounded path-local simulation tracks event order and object states and explores cancellation at await suspensions. Six detector plugins evaluate the resulting traces and states to produce candidates with supporting witnesses. On AsyncBench, our benchmark of 180 labeled risks, AegisAsync detects all labeled risks with zero false positives on each of the five versions. Across five path budgets on 2,500 PyPI package versions, source review confirms 457 of 910 AegisAsync candidate records (50.2%), representing 457 unique bugs; across three flake8-async samples, 70 of 2,187 review judgments are confirmed (3.2%). By submission, 166 PoCs reproduce AegisAsync findings, and we have reported 157 bugs to developers, of which 16 have been confirmed and fixed.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。