Practical static analysis of context leaks in Android applications

被引:2
|
作者
Toffalini, Flavio [1 ]
Sun, Jun [1 ]
Ochoa, Martin [2 ]
机构
[1] Singapore Univ Technol & Design, Singapore 487372, Singapore
[2] Univ Rosario, Dept Appl Math & Comp Sci, Bogota, Colombia
关键词
Android; memory leak; static analysis;
D O I
10.1002/spe.2659
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Android native applications, written in Java and distributed in APK format, are widely used in mobile devices. Their specific pattern of use lets the operating system control the creation and destruction of resources, such as activities and services (contexts). Programmers are not supposed to interfere with such life cycle events. Otherwise, contexts might be leaked, ie, they will never be deallocated from memory, or be deallocated late, leading to memory exhaustion and frozen applications. In practice, it is easy to write incorrect code, which hinders garbage collection of contexts and leads to context leakages. In this work, we present a novel static analysis method that finds context leaks in Android code. We apply this analysis to APKs translated into Java bytecode. We provide a formal analysis of our algorithms and suggest further research directions for improving precision by combining different approaches. We discuss the results of a large number of experiments with our analysis, which reveal context leaks in many widely used applications from the Android marketplace. This shows the practical usefulness of our technique and its superiority w.r.t. the well-known Lint and Infer static analysis tools. We estimate the amount of memory saved by the collection of the leaks found and explain, experimentally, where programmers often go wrong and limitations of our tool. Such lessons could be used for designing of a sound or more powerful static analysis tool. This work can be considered as a practical application of software analysis techniques to solve practical problems.
引用
收藏
页码:233 / 251
页数:19
相关论文
共 50 条
  • [31] JS']JSWhiz Static Analysis for Java']JavaScript Memory Leaks
    Pienaar, Jacques A.
    Hundt, Robert
    PROCEEDINGS OF THE 2013 IEEE/ACM INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION (CGO), 2013, : 313 - 323
  • [32] Static Analysis of a Class of Memory Leaks in TrustedBSD MAC Framework
    Wu, Xinsong
    Zhou, Zhouyi
    He, Yeping
    Liang, Hongliang
    INFORMATION SECURITY PRACTICE AND EXPERIENCE, PROCEEDINGS: 5TH INTERNATIONAL CONFERENCE, ISPEC 2009, 2009, 5451 : 83 - 92
  • [33] Reflection-Aware Static Analysis of Android Apps
    Li, Li
    Bissyande, Tegawende F.
    Octeauo, Damien
    Klein, Jacques
    2016 31ST IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2016, : 756 - 761
  • [34] Static and Dynamic Integrated Analysis Scheme for Android Malware
    Chun-Hao Yung
    Wen-Shenq Juang
    Journal of Electronic Science and Technology, 2017, 15 (03) : 246 - 250
  • [35] Detecting Software Vulnerabilities in Android Using Static Analysis
    Dhaya, R.
    Poongodi, M.
    2014 INTERNATIONAL CONFERENCE ON ADVANCED COMMUNICATION CONTROL AND COMPUTING TECHNOLOGIES (ICACCCT), 2014, : 915 - 918
  • [36] Reevaluating Android Permission Gaps with Static and Dynamic Analysis
    Wang, Haoyu
    Guo, Yao
    Tang, Zihao
    Bai, Guangdong
    Chen, Xiangqun
    2015 IEEE GLOBAL COMMUNICATIONS CONFERENCE (GLOBECOM), 2015,
  • [37] Android Apps:Static Analysis Based on Permission Classification
    Zhenjiang Dong
    Hui Ye
    Yan Wu
    Shaoyin Cheng
    Fan Jiang
    ZTECommunications, 2013, 11 (01) : 62 - 66
  • [38] DroidRista: a highly precise static data flow analysis framework for android applications
    Areej Alzaidi
    Suhair Alshehri
    Seyed M. Buhari
    International Journal of Information Security, 2020, 19 : 523 - 536
  • [39] DroidRista: a highly precise static data flow analysis framework for android applications
    Alzaidi, Areej
    Alshehri, Suhair
    Buhari, Seyed M.
    INTERNATIONAL JOURNAL OF INFORMATION SECURITY, 2020, 19 (05) : 523 - 536
  • [40] Static Back-Stack Transition Analysis for Android
    Liu, Ao
    Guo, Chenkai
    Wang, Weijing
    Qiu, Yu
    Xu, Jing
    IEEE ACCESS, 2019, 7 : 110781 - 110793