[Soot-list] FlowDroid - null SourceContext when Abstraction is instantiated with the copy constructor

kaunder kap.underwood+sootlist at gmail.com
Wed Nov 4 18:33:29 EST 2015


Hello all,

I am working on using FlowDroid to track how many statements each taint
propagates across before eventually reaching a sink. To this end, I have
implemented a TaintPropagationHandler and am using the notifyFlowOut
function to capture and examine each Abstraction object generated during
FlowDroid's analysis.


In the output of the notifyFlowOut handler function, I have noticed that
whenever the incoming Abstraction is not the zero Abstraction, the outgoing
Abstraction will have a null SourceContext.

In addition, it appears that this case is consistent with the Abstraction
copy constructor being using to instantiate a new Abstraction object (I
added a couple of lines to the Abstraction constructors in order to
identify which constructor was used to instantiate a given Abstraction
object).

I'm curious about why SourceContext is null in these cases. Is there a way
to recover SourceContext for these Abstractions?

An example of my handler function output:

Case where outgoing source context is not null - Incoming Abstraction is
the zero Abstraction

***Incoming Abstraction Data***
Soot statement: $r1 := @parameter1: android.view.KeyEvent
Incoming Source Context: null
Incoming Abstraction Hash: 1217330535

***Outgoing Abstraction Set Data***
Outgoing set 0:
Outgoing Abstraction Source Context: $r1(android.view.KeyEvent) * <+length>
in $r1 := @parameter1: android.view.KeyEvent
Outgoing Abstraction Hash: -285378327
Constructor: public



Case where outgoing source context is null - Incoming Abstraction is not
the zero Abstraction

***Incoming Abstraction Data***
Soot statement: $r1 = virtualinvoke $r1.<android.os.Bundle:
android.os.Bundle getBundle(java.lang.String)>($r5)
Incoming Source Context: $r1(android.os.Bundle) * <+length> in $r1 :=
@parameter0: android.os.Bundle
Incoming Abstraction Hash: -437298944

***Outgoing Abstraction Set Data***
Outgoing set 0:
Outgoing Abstraction Source Context: null
Outgoing Abstraction Hash: 2043788688
Constructor: copy



Thank you for your time! Please let me know if I can provide any additional
clarification about my implementation.

Best Regards,

Katie Underwood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20151104/e3fac59c/attachment.html 


More information about the Soot-list mailing list