Netinfo Security ›› 2026, Vol. 26 ›› Issue (7): 1087-1100.doi: 10.3969/j.issn.1671-1122.2026.07.007

Previous Articles     Next Articles

An LLM-assisted firmware memory leak analysis based on instruction translation instrumentation

Yao Wuhuang, Wang Jiapeng, Chen Kangbing, Zheng Zhihan, Tan Yu’an()   

  1. School of Cyberspace Science and Technology, Beijing Institute of Technology, Beijing 100081, China
  • Received:2026-04-29 Online:2026-07-10 Published:2026-09-03
  • Contact: Tan Yu’an E-mail:tan2008@bit.edu.cn

Abstract:

With the widespread deployment of embedded devices in various critical scenarios, memory leaks in Linux-based embedded firmware can degrade service availability and even cause service failures. Existing memory leak detection methods for open-source firmware rely on source code and symbol information, making it difficult to directly extend to closed-source firmware; while automated memory leak detection methods for closed-source firmware suffer from insufficient support for ARM architecture firmware. Therefore, we proposed a memory leak analysis method for Linux-based closed-source firmware, MemLeakFinder. Based on QEMU’s intermediate code instruction translation and instrumentation technology, it achieved dynamic tracking and analysis of the target program’s memory operations. It combined fuzzing and disassembly analysis techniques to locate potential memory leak vulnerabilities and introduced a large language model (LLM) to perform semantic understanding and automated root cause analysis of the captured memory leak vulnerability scenarios. We selected BMC firmware as the target environment and CGI as the target protocol, and conducted comprehensive experiments. Experimental results show that MemLeakFinder achieves an accuracy rate of 92.16% in the Juliet test suite. In tests on 7 real BMC firmwares, MemLeakFinder successfully discovered and verified 5 actual vulnerabilities. One critical vulnerability has been assigned a CVE number. These results, verifying the effectiveness of this method in memory security analysis of closed-source firmware programs.

Key words: memory leaks, intermediate code instruction translation, instrumentation, firmware security, large language model

CLC Number: