secure-software-engineering / FlowDroid

FlowDroid Static Data Flow Tracker
GNU Lesser General Public License v2.1
1.03k stars 293 forks source link

Bug: undoInstrumentation should be invoked before loading the ICC model #519

Open RichardHoOoOo opened 1 year ago

RichardHoOoOo commented 1 year ago

In my opinion, L62-L65 should be invoked after L68-L71 https://github.com/secure-software-engineering/FlowDroid/blob/663dc5bb34d5f5ebaa6cf60ee3ee8278740a82fc/soot-infoflow-android/src/soot/jimple/infoflow/android/iccta/IccInstrumenter.java#L62-L65

https://github.com/secure-software-engineering/FlowDroid/blob/663dc5bb34d5f5ebaa6cf60ee3ee8278740a82fc/soot-infoflow-android/src/soot/jimple/infoflow/android/iccta/IccInstrumenter.java#L68-L71

It is because ICC links are usually extracted in multiple rounds. If undoInstrumentation is invoked after loading the ICC model, the instrumented units in the previous round will mess up the original unit sequence. As a result, FlowDroid cannot correctly locate the statements that launch ICCs according to units ids.

So undoInstrumentation should be done before loading the ICC mode. Could you correct me if I am wrong?