Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM

With the rapid growth of the Internet-of-Things (IoT), security issues for the IoT are becoming increasingly serious. Memory leaks are a common and harmful software defect for IoT programs running on resource-limited devices. Static analysis is an effective method for memory leak detection, however,...

Full description

Bibliographic Details
Main Authors: Yukun Dong, Wenjing Yin, Shudong Wang, Li Zhang, Lin Sun
Format: Article
Language:English
Published: IEEE 2019-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/8890730/
_version_ 1818622024067579904
author Yukun Dong
Wenjing Yin
Shudong Wang
Li Zhang
Lin Sun
author_facet Yukun Dong
Wenjing Yin
Shudong Wang
Li Zhang
Lin Sun
author_sort Yukun Dong
collection DOAJ
description With the rapid growth of the Internet-of-Things (IoT), security issues for the IoT are becoming increasingly serious. Memory leaks are a common and harmful software defect for IoT programs running on resource-limited devices. Static analysis is an effective method for memory leak detection, however, because the existing methods cannot fully describe the memory state of IoT programs at run time, false positives and false negatives frequently occur. To improve the precision of memory leak detection, we propose an abstract memory model SeqMM to describe sequential storage structures. SeqMM differs from other abstract memory models in its ability to handle both points-to analysis and numerical analysis of pointers, which contributes to eliminating false positives in defect detection. In addition, based on the analysis of the sequential storage structure, we introduce the analysis of its operations in C programs, including transfer operations and predicate operations. Moreover, we present a memory leak detection algorithm by determining the state of the program points related to allocated memory blocks. The experimental results of five real projects indicate that the false positive rates of DTSC_SeqMM, Klocwork12 and DTSC_RSTVL are 29.0%, 15.0% and 40.6% respectively, and the corresponding false negative rates are 0%, 22.7% and 13.6%.
first_indexed 2024-12-16T18:18:35Z
format Article
id doaj.art-4a2a185465c2459897a25db0dc99d111
institution Directory Open Access Journal
issn 2169-3536
language English
last_indexed 2024-12-16T18:18:35Z
publishDate 2019-01-01
publisher IEEE
record_format Article
series IEEE Access
spelling doaj.art-4a2a185465c2459897a25db0dc99d1112022-12-21T22:21:37ZengIEEEIEEE Access2169-35362019-01-01715890415891610.1109/ACCESS.2019.29511688890730Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMMYukun Dong0https://orcid.org/0000-0003-0787-5806Wenjing Yin1https://orcid.org/0000-0003-1932-5561Shudong Wang2https://orcid.org/0000-0003-4360-6718Li Zhang3https://orcid.org/0000-0003-4837-0900Lin Sun4https://orcid.org/0000-0002-3894-1928College of Computer Science and Technology, China University of Petroleum, Qingdao, ChinaCollege of Computer Science and Technology, China University of Petroleum, Qingdao, ChinaCollege of Computer Science and Technology, China University of Petroleum, Qingdao, ChinaCollege of Computer Science and Technology, China University of Petroleum, Qingdao, ChinaDepartment of Information Engineering, Shandong University of Science and Technology, Taian, ChinaWith the rapid growth of the Internet-of-Things (IoT), security issues for the IoT are becoming increasingly serious. Memory leaks are a common and harmful software defect for IoT programs running on resource-limited devices. Static analysis is an effective method for memory leak detection, however, because the existing methods cannot fully describe the memory state of IoT programs at run time, false positives and false negatives frequently occur. To improve the precision of memory leak detection, we propose an abstract memory model SeqMM to describe sequential storage structures. SeqMM differs from other abstract memory models in its ability to handle both points-to analysis and numerical analysis of pointers, which contributes to eliminating false positives in defect detection. In addition, based on the analysis of the sequential storage structure, we introduce the analysis of its operations in C programs, including transfer operations and predicate operations. Moreover, we present a memory leak detection algorithm by determining the state of the program points related to allocated memory blocks. The experimental results of five real projects indicate that the false positive rates of DTSC_SeqMM, Klocwork12 and DTSC_RSTVL are 29.0%, 15.0% and 40.6% respectively, and the corresponding false negative rates are 0%, 22.7% and 13.6%.https://ieeexplore.ieee.org/document/8890730/Memory leaksequential storage structureabstract memory modeldata flow analysis
spellingShingle Yukun Dong
Wenjing Yin
Shudong Wang
Li Zhang
Lin Sun
Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM
IEEE Access
Memory leak
sequential storage structure
abstract memory model
data flow analysis
title Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM
title_full Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM
title_fullStr Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM
title_full_unstemmed Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM
title_short Memory Leak Detection in IoT Program Based on an Abstract Memory Model SeqMM
title_sort memory leak detection in iot program based on an abstract memory model seqmm
topic Memory leak
sequential storage structure
abstract memory model
data flow analysis
url https://ieeexplore.ieee.org/document/8890730/
work_keys_str_mv AT yukundong memoryleakdetectioniniotprogrambasedonanabstractmemorymodelseqmm
AT wenjingyin memoryleakdetectioniniotprogrambasedonanabstractmemorymodelseqmm
AT shudongwang memoryleakdetectioniniotprogrambasedonanabstractmemorymodelseqmm
AT lizhang memoryleakdetectioniniotprogrambasedonanabstractmemorymodelseqmm
AT linsun memoryleakdetectioniniotprogrambasedonanabstractmemorymodelseqmm