Class TaintTransferFunctions<E extends ISSABasicBlock>
java.lang.Object
org.scandroid.flow.functions.TaintTransferFunctions<E>
- All Implemented Interfaces:
IFlowFunctionMap<BasicBlockInContext<E>>
public class TaintTransferFunctions<E extends ISSABasicBlock>
extends Object
implements IFlowFunctionMap<BasicBlockInContext<E>>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTaintTransferFunctions(IFDSTaintDomain<E> domain, PointerAnalysis<InstanceKey> pa) TaintTransferFunctions(IFDSTaintDomain<E> domain, PointerAnalysis<InstanceKey> pa, boolean taintStaticFields) -
Method Summary
Modifier and TypeMethodDescriptiongetCallFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest, BasicBlockInContext<E> ret) getCallToReturnFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest) getNormalFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest) getReturnFlowFunction(BasicBlockInContext<E> call, BasicBlockInContext<E> src, BasicBlockInContext<E> dest) The usual arguments:makeStaticFieldTaints(BasicBlockInContext<E> dest, SSAInstruction inst, org.scandroid.flow.functions.PairBasedFlowFunction<E> flowFunction)
-
Field Details
-
EMPTY_SET
-
ZERO_SET
-
-
Constructor Details
-
TaintTransferFunctions
-
TaintTransferFunctions
public TaintTransferFunctions(IFDSTaintDomain<E> domain, PointerAnalysis<InstanceKey> pa, boolean taintStaticFields)
-
-
Method Details
-
getCallFlowFunction
public IUnaryFlowFunction getCallFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest, BasicBlockInContext<E> ret) - Specified by:
getCallFlowFunctionin interfaceIFlowFunctionMap<E extends ISSABasicBlock>- Parameters:
src- the call blockdest- the entry of the calleeret- the block that will be returned to, in the caller. This can be null .. signifying that facts can flow into the callee but not return- Returns:
- the flow function for a "call" edge in the supergraph from src -> dest
-
getCallNoneToReturnFlowFunction
public IUnaryFlowFunction getCallNoneToReturnFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest) - Specified by:
getCallNoneToReturnFlowFunctionin interfaceIFlowFunctionMap<E extends ISSABasicBlock>- Returns:
- the flow function for a "call-to-return" edge in the supergraph from src -> dest, when the supergraph does not contain any callees of src. This happens via, e.g., slicing.
-
getCallToReturnFlowFunction
public IUnaryFlowFunction getCallToReturnFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest) - Specified by:
getCallToReturnFlowFunctionin interfaceIFlowFunctionMap<E extends ISSABasicBlock>- Returns:
- the flow function for a "call-to-return" edge in the supergraph from src -> dest
-
getNormalFlowFunction
public IUnaryFlowFunction getNormalFlowFunction(BasicBlockInContext<E> src, BasicBlockInContext<E> dest) - Specified by:
getNormalFlowFunctionin interfaceIFlowFunctionMap<E extends ISSABasicBlock>- Returns:
- the flow function for a "normal" edge in the supergraph from src -> dest
-
makeStaticFieldTaints
public IUnaryFlowFunction makeStaticFieldTaints(BasicBlockInContext<E> dest, SSAInstruction inst, org.scandroid.flow.functions.PairBasedFlowFunction<E> flowFunction) -
getReturnFlowFunction
public IFlowFunction getReturnFlowFunction(BasicBlockInContext<E> call, BasicBlockInContext<E> src, BasicBlockInContext<E> dest) The usual arguments:call: the invoke instruction that took us into this method
src: a block that's the postdominator of this method, usually with no instructions
dest: whatever instruction followed the invoke instruction in call
What we want to accomplish:
1. Map taints from the value being returned to a LocalElement in the caller's context
2. Pass through any global information that the callee may have changed
3. Process ins/outs of dest block as well (it will never be the dest of a NormalFlowFunction)
- Specified by:
getReturnFlowFunctionin interfaceIFlowFunctionMap<E extends ISSABasicBlock>- Parameters:
call- supergraph node of the call instruction for this return edge.- Returns:
- the flow function for a "return" edge in the supergraph from src -> dest
-