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 条
  • [21] Algebraic-Datatype Taint Tracking, with Applications to Understanding Android Identifier Leaks
    Rahaman, Sydur
    Neamtiu, Iulian
    Yin, Xin
    PROCEEDINGS OF THE 29TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE '21), 2021, : 70 - 82
  • [22] FlowCog: Context-Aware Semantic Extraction and Analysis of Information Flow Leaks in Android Apps
    Du, Xuechao
    Pan, Xiang
    Cao, Yinzhi
    He, Boyuan
    Fan, Gan
    Chen, Yan
    Xu, Daigang
    IEEE TRANSACTIONS ON MOBILE COMPUTING, 2023, 22 (11) : 6460 - 6476
  • [23] Androlic: An Extensible Flow, Context, Object, Field, and Path-Sensitive Static Analysis Framework for Android
    Pan, Linjie
    Cui, Baoquan
    Yan, Jiwei
    Ma, Xutong
    Yan, Jun
    Zhang, Jian
    PROCEEDINGS OF THE 28TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS (ISSTA '19), 2019, : 394 - 397
  • [24] Kunai: A static analysis framework for Android apps
    Blazquez, Eduardo
    Tapiador, Juan
    SOFTWAREX, 2023, 22
  • [25] SANT: Static Analysis of Native Threads for Security Vetting of Android Applications
    Andarzian, Seyed Behnam
    Ladani, Behrouz Tork
    ISECURE-ISC INTERNATIONAL JOURNAL OF INFORMATION SECURITY, 2022, 14 (01): : 13 - 25
  • [26] B-droid: A Static Taint Analysis Framework for Android Applications
    ALmotairy, Rehab
    Daadaa, Yassine
    INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2021, 12 (01) : 421 - 430
  • [27] Call Graph Soundness in Android Static Analysis
    Samhi, Jordan
    Just, Rene
    Bissyande, Tegawende F.
    Ernst, Michael D.
    Klein, Jacques
    PROCEEDINGS OF THE 33RD ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2024, 2024, : 945 - 957
  • [28] Practical Static Analysis of Detecting Intent-based Permission Leakage in Android Application
    Wu, Songyang
    Zhang, Yong
    Jin, Bo
    Cao, Wei
    2017 17TH IEEE INTERNATIONAL CONFERENCE ON COMMUNICATION TECHNOLOGY (ICCT 2017), 2017, : 1953 - 1957
  • [29] Static Dalvik Bytecode Optimization for Android Applications
    Kim, Jeehong
    Kim, Inhyeok
    Min, Changwoo
    Jun, Hyung Kook
    Lee, Soo Hyung
    Kim, Won-Tae
    Eom, Young Ik
    ETRI JOURNAL, 2015, 37 (05) : 1001 - 1011
  • [30] A scalable, flow-and-context-sensitive taint analysis of android applications
    Choi, Wontae
    Kannan, Jayanthkumar
    Babic, Domagoj
    JOURNAL OF COMPUTER LANGUAGES, 2019, 51 : 1 - 14