Package soot.jimple.infoflow.river
Class SecondaryFlowGenerator
java.lang.Object
soot.jimple.infoflow.river.SecondaryFlowGenerator
- All Implemented Interfaces:
TaintPropagationHandler
TaintPropagationHandler querying the backward analysis when reaching an
additional sink. Attach to the forward analysis.
- Author:
- Tim Lange
-
Nested Class Summary
Nested classes/interfaces inherited from interface soot.jimple.infoflow.handlers.TaintPropagationHandler
TaintPropagationHandler.FlowFunctionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractioncreateAdditionalFlowAbstraction(Abstraction baseTaint, soot.jimple.Stmt stmt) Creates a new abstraction that is injected into the backward direction.protected AbstractioncreateAdditionalFlowAbstraction(AdditionalFlowInfoSpecification spec, soot.jimple.Stmt stmt, InfoflowManager manager) Creates a new abstraction that is injected into the backward direction.protected AbstractiongetTaintFromLocal(Set<Abstraction> outgoing, soot.Value baseLocal) Check whether baseLocal is tainted in the outgoing set.protected booleanisReadAt(soot.Unit unit, AccessPath ap) Check whether the access path is read at unit.voidnotifyFlowIn(soot.Unit stmt, Abstraction taint, InfoflowManager manager, TaintPropagationHandler.FlowFunctionType type) Handler function that is invoked when a taint is proagated in the data flow enginenotifyFlowOut(soot.Unit unit, Abstraction d1, Abstraction incoming, Set<Abstraction> outgoing, InfoflowManager manager, TaintPropagationHandler.FlowFunctionType type) Handler function that is invoked when a new taint is generated in the data flow engine
-
Constructor Details
-
SecondaryFlowGenerator
public SecondaryFlowGenerator()
-
-
Method Details
-
notifyFlowIn
public void notifyFlowIn(soot.Unit stmt, Abstraction taint, InfoflowManager manager, TaintPropagationHandler.FlowFunctionType type) Description copied from interface:TaintPropagationHandlerHandler function that is invoked when a taint is proagated in the data flow engine- Specified by:
notifyFlowInin interfaceTaintPropagationHandler- Parameters:
stmt- The statement over which the taint is propagatedtaint- The taint being propagatedmanager- The manager object that gives access to the data flow enginetype- The type of data flow edge being processed
-
notifyFlowOut
public Set<Abstraction> notifyFlowOut(soot.Unit unit, Abstraction d1, Abstraction incoming, Set<Abstraction> outgoing, InfoflowManager manager, TaintPropagationHandler.FlowFunctionType type) Description copied from interface:TaintPropagationHandlerHandler function that is invoked when a new taint is generated in the data flow engine- Specified by:
notifyFlowOutin interfaceTaintPropagationHandler- Parameters:
unit- The statement over which the taint is propagatedd1- The abstraction at the beginning of the current methodincoming- The original abstraction from which the outgoing ones were computedoutgoing- The set of taints being propagatedmanager- The manager object that gives access to the data flow enginetype- The type of data flow edge being processed- Returns:
- The new abstractions to be propagated on. If you do not want to change the normal propagation behavior, just return the value of the "taints" parameter as-is.
-
createAdditionalFlowAbstraction
Creates a new abstraction that is injected into the backward direction.- Parameters:
baseTaint- Taint of the base localstmt- Current statement- Returns:
- New abstraction
-
createAdditionalFlowAbstraction
protected Abstraction createAdditionalFlowAbstraction(AdditionalFlowInfoSpecification spec, soot.jimple.Stmt stmt, InfoflowManager manager) Creates a new abstraction that is injected into the backward direction.- Parameters:
spec- Flow Specificationstmt- Current statementmanager- Infoflow Manager- Returns:
- New abstraction
-
getTaintFromLocal
Check whether baseLocal is tainted in the outgoing set. Assumes baseLocal is an object and the check happens at a call site.- Parameters:
outgoing- outgoing taint setbaseLocal- base local- Returns:
- corresponding abstraction if baseLocal is tainted else null
-
isReadAt
Check whether the access path is read at unit.- Parameters:
unit- unitap- access path- Returns:
- true if ap is read at unit
-