一句话:提出 MergeDroid,通过合并等价值流并用合并-重放策略,加速基于 IFDS 的污点分析。
基于 IFDS 的污点分析用前向与后向两趟迭代识别污点和别名,兼具流敏感与上下文敏感。其激活语句机制虽保持流敏感,却会在同一数据抽象关联不同激活语句时引入等价冗余值流,增加计算与内存开销。本文提出 MergeDroid:在后向趟中合并同一程序点可达事实里指向同一数据抽象的激活语句,生成代表所有等价事实的符号激活语句并归约为单个符号事实;前向趟中该符号事实回到创建点时再还原。该 merge-and-replay 策略消除冗余传播,并利用激活语句的上下文信息提升效率与精度。在 40 个 Android 应用上平均加速 9.0 倍,可多扩展处理 6 个应用,泄漏警告平均减少 19.2%。
The IFDS-based taint analysis employs two mutually iterative passes: a forward pass that identifies taints and a backward pass that detects aliases. This approach ensures both flow and context sensitivity, leading to remarkable precision. To preserve flow sensitivity, the IFDS-based taint analysis enhances data abstractions with activation statements that pinpoint the moment they acquire taint. Nonetheless, this mechanism can inadvertently introduce equivalent, yet redundant, value flows. This occurs when distinct activation statements are linked with the same data abstraction, resulting in unnecessary computational and memory-intensive demands on the analysis process. We introduce MergeDroid, a novel approach to improve the efficiency of IFDS-based taint analysis by consolidating equivalent value flows. This involves merging activation statements linked to the same data abstraction from various reachable data facts that are reachable at a given program point during the backward pass. This process generates a representative symbolic activation statement applicable to all equivalent data facts, reducing them to a single symbolic data fact. During the forward pass, when this symbolic data fact returns to its point of creation, the analysis reverts to the original data facts alongside their initial activation statements. This merge-and-replay strategy eliminates redundant value flow propagation, resulting in performance gains. Furthermore, we also improve analysis efficiency and precision by leveraging context-sensitive insights from activation statements. Our evaluation on 40 Android apps demonstrates that MergeDroid significantly enhances IFDS-based taint analysis performance. On average, MergeDroid accelerates analysis by 9.0× while effectively handling 6 more apps scalably. Additionally, it reduces false positives by significantly decreasing reported leak warnings, achieving an average reduction of 19.2%.