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 条
  • [21] 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
  • [22] Practical Precise Taint-flow Static Analysis for Android App Sets
    Klieber, William
    Flynn, Lori
    Snavely, Will
    Zheng, Michael
    13TH INTERNATIONAL CONFERENCE ON AVAILABILITY, RELIABILITY AND SECURITY (ARES 2018), 2019,
  • [23] 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
  • [24] 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
  • [25] Static/Dynamic Analysis of Android Applications to Improve Energy-Efficiency
    Jalili, Mohammad
    Faghih, Fathiyeh
    2022 CPSSI 4TH INTERNATIONAL SYMPOSIUM ON REAL-TIME AND EMBEDDED SYSTEMS AND TECHNOLOGIES (RTEST 2022), 2022,
  • [26] Comprehensive Detection of Vulnerable Personal Information Leaks in Android Applications
    Wongwiwatchai, Nattanon
    Pongkham, Phannawhat
    Sripanidkulchai, Kunwadee
    IEEE INFOCOM 2020 - IEEE CONFERENCE ON COMPUTER COMMUNICATIONS WORKSHOPS (INFOCOM WKSHPS), 2020, : 121 - 126
  • [27] LESDroid - A Tool for Detecting Exported Service Leaks of Android Applications
    Ma, Jun
    Liu, Shaocong
    Jiang, Yanyan
    Tao, Xianping
    Xu, Chang
    Lu, Jian
    2018 IEEE/ACM 26TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2018), 2018, : 244 - 254
  • [28] Exploring the Malicious Android Applications and Reducing Risk using Static Analysis
    Kavitha, K.
    Salini, P.
    Ilamathy, V
    2016 INTERNATIONAL CONFERENCE ON ELECTRICAL, ELECTRONICS, AND OPTIMIZATION TECHNIQUES (ICEEOT), 2016, : 1316 - 1319
  • [29] Characterization of Android Applications with Root Exploit by Using Static Feature Analysis
    Hao, Huikang
    Li, Zhoujun
    He, Yueying
    Ma, Jinxin
    ALGORITHMS AND ARCHITECTURES FOR PARALLEL PROCESSING, ICA3PP 2015, 2015, 9532 : 153 - 165
  • [30] Static analysis of Android programs
    Payet, Etienne
    Spoto, Fausto
    INFORMATION AND SOFTWARE TECHNOLOGY, 2012, 54 (11) : 1192 - 1201