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
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2019年 / 49卷 / 02期
关键词
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 条
  • [41] A Sound Flow-Sensitive Heap Abstraction for the Static Analysis of Android Applications
    Calzavara, Stefano
    Grishchenko, Ilya
    Koutsos, Adrien
    Maffei, Matteo
    2017 IEEE 30TH COMPUTER SECURITY FOUNDATIONS SYMPOSIUM (CSF), 2017, : 22 - 36
  • [42] A Multidimensional Detection Model of Android Malicious Applications Based on Dynamic and Static Analysis
    Zhang, Hao
    Liu, Donglan
    Liu, Xin
    Ma, Lei
    Wang, Rui
    Zhang, Fangzhe
    Sun, Lili
    Zhao, Fuhui
    PROCEEDINGS OF THE 13TH INTERNATIONAL CONFERENCE ON COMPUTER ENGINEERING AND NETWORKS, VOL III, CENET 2023, 2024, 1127 : 11 - 21
  • [43] 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
  • [44] S3ntinel: An Extensible Static Analysis Framework for Android Applications
    Doshi, Shreyans
    Siddavatam, Irfan
    2018 FOURTH INTERNATIONAL CONFERENCE ON COMPUTING COMMUNICATION CONTROL AND AUTOMATION (ICCUBEA), 2018,
  • [45] Analyzing Energy Leaks of Android Applications Using Event-B
    Le, Hong Anh
    MOBILE NETWORKS & APPLICATIONS, 2021, 26 (03): : 1329 - 1338
  • [46] Automatic detection of inter-application permission leaks in Android applications
    Sbielea, D.
    Burke, M. G.
    Guarnieri, S.
    Pistoia, M.
    Sarkar, V.
    IBM JOURNAL OF RESEARCH AND DEVELOPMENT, 2013, 57 (06)
  • [47] Analyzing Energy Leaks of Android Applications Using Event-B
    Hong Anh Le
    Mobile Networks and Applications, 2021, 26 : 1329 - 1338
  • [48] AdCapsule: Practical Confinement of Advertisements in Android Applications
    Zhu, Xiaonan
    Li, Jinku
    Zhou, Yajin
    Ma, Jianfeng
    IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING, 2020, 17 (03) : 479 - 492
  • [49] Combinatorial Testing of Context Aware Android Applications
    Piparia, Shraddha
    Adamo, David
    Bryce, Renee
    Do, Hyunsook
    Bryant, Barrett
    PROCEEDINGS OF THE 2021 16TH CONFERENCE ON COMPUTER SCIENCE AND INTELLIGENCE SYSTEMS (FEDCSIS), 2021, : 17 - 26
  • [50] Context-Aware Android Applications Testing
    de Almeida, Diego Rodrigues
    Machado, Patricia D. L.
    Andrade, Wilkerson L.
    34TH BRAZILIAN SYMPOSIUM ON SOFTWARE ENGINEERING, SBES 2020, 2020, : 283 - 292