arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2510.00532cs.SEcs.CR
收藏

LSPFuzz:在语言服务器中寻找漏洞

LSPFuzz: Hunting Bugs in Language Servers

The Hong Kong University of Science and Technology(香港科技大学);University of Auckland(奥克兰大学);McGill University(麦吉尔大学);Southern University of Science and Technology(南方科技大学)

Hengcheng Zhu, Songqiang Chen, Valerio Terragni, Lili Wei, Yepang Liu, Jiarong Wu, Shing-Chi Cheung

AI总结:

LSPFuzz通过系统性测试方法发现LSP服务器中的漏洞,提升代码智能工具的可靠性。

摘要:

语言服务器协议(LSP)已经彻底改变了现代软件开发中代码智能的整合。目前大约有300个各种语言的LSP服务器实现和50个提供LSP整合的编辑器。然而,LSP服务器的可靠性成为一个日益关注的问题,因为崩溃会禁用所有代码智能功能,并显著影响生产力,而漏洞可能会使开发人员在编辑不可信的源代码时处于风险之中。尽管LSP被广泛采用,但现有的技术并没有专门针对LSP服务器的测试。为了填补这一空白,我们提出了LSPFuzz,一种用于系统性测试LSP服务器的灰盒混合模糊测试工具。我们的关键见解是,有效的LSP服务器测试需要对源代码和编辑器操作进行整体突变,因为bug往往从它们的组合中显现出来。为了满足LSP复杂的约束并有效地探索输入空间,我们采用了两阶段突变流程:语法感知的源代码突变,随后是上下文感知的编辑器操作调度。我们对四个广泛使用的LSP服务器进行了评估。LSPFuzz在基准模糊测试工具上表现更优,并在现实中的LSP服务器中发现了之前未知的bug。我们报告的51个bug中,42个已被确认,26个已被开发人员修复,还有两个已被分配CVE编号。我们的工作提高了LSP服务器的质量保障,提供了实用的工具和未来该领域研究的基础见解。

英文摘要:

The Language Server Protocol (LSP) has revolutionized the integration of code intelligence in modern software development. There are approximately 300 LSP server implementations for various languages and 50 editors offering LSP integration. However, the reliability of LSP servers is a growing concern, as crashes can disable all code intelligence features and significantly impact productivity, while vulnerabilities can put developers at risk even when editing untrusted source code. Despite the widespread adoption of LSP, no existing techniques specifically target LSP server testing. To bridge this gap, we present LSPFuzz, a grey-box hybrid fuzzer for systematic LSP server testing. Our key insight is that effective LSP server testing requires holistic mutation of source code and editor operations, as bugs often manifest from their combinations. To satisfy the sophisticated constraints of LSP and effectively explore the input space, we employ a two-stage mutation pipeline: syntax-aware mutations to source code, followed by context-aware dispatching of editor operations. We evaluated LSPFuzz on four widely used LSP servers. LSPFuzz demonstrated superior performance compared to baseline fuzzers, and uncovered previously unknown bugs in real-world LSP servers. Of the 51 bugs we reported, 42 have been confirmed, 26 have been fixed by developers, and two have been assigned CVE numbers. Our work advances the quality assurance of LSP servers, providing both a practical tool and foundational insights for future research in this domain.

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

↑