public class TaintExpandOperator extends DefaultExpandOperator<SetAbstractState<JvmTaintSource>>
ExpandOperator inherits all the functionalities of a
DefaultExpandOperator and in addition taints the return values if the called function is
a source.| Constructor and Description |
|---|
TaintExpandOperator(JvmCfa cfa,
java.util.Map<Signature,java.util.Set<JvmTaintSource>> signaturesToSources)
Create the operator specifying the taint sources.
|
TaintExpandOperator(JvmCfa cfa,
java.util.Map<Signature,java.util.Set<JvmTaintSource>> signaturesToSources,
boolean expandHeap)
Create the operator specifying the taint sources.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<SetAbstractState<JvmTaintSource>> |
calculateReturnValues(JvmAbstractState<SetAbstractState<JvmTaintSource>> reducedExitState,
Instruction returnInstruction,
Call call)
The calculation of return values supports tainting it in case the analyzed method is a taint
source.
|
protected JvmAbstractState<SetAbstractState<JvmTaintSource>> |
createJvmAbstractState(JvmCfaNode programLocation,
JvmFrameAbstractState<SetAbstractState<JvmTaintSource>> frame,
JvmHeapAbstractState<SetAbstractState<JvmTaintSource>> heap,
MapAbstractState<java.lang.String,SetAbstractState<JvmTaintSource>> staticFields) |
JvmAbstractState<SetAbstractState<JvmTaintSource>> |
expand(JvmAbstractState<SetAbstractState<JvmTaintSource>> expandedInitialState,
JvmAbstractState<SetAbstractState<JvmTaintSource>> reducedExitState,
JvmCfaNode blockEntryNode,
Call call)
Reconstructs the state of the caller of a procedure using the information of the expanded
initial state, the reduced exit state, the block entry node (that can be used to retrieve the
CFA subgraph of the function), and the call to the procedure.
|
java.util.Map<Signature,java.util.Set<JvmTaintSource>> |
getSignaturesToSources()
Returns the mapping from fqns to taint sources.
|
expandHeappublic TaintExpandOperator(JvmCfa cfa, java.util.Map<Signature,java.util.Set<JvmTaintSource>> signaturesToSources, boolean expandHeap)
cfa - the control flow automaton of the analyzed program.signaturesToSources - a mapping from method signatures to their JvmTaintSourceexpandHeap - whether expansion of the heap is performedpublic TaintExpandOperator(JvmCfa cfa, java.util.Map<Signature,java.util.Set<JvmTaintSource>> signaturesToSources)
cfa - the control flow automaton of the analyzed program.signaturesToSources - a mapping from method signatures to their JvmTaintSourcepublic JvmAbstractState<SetAbstractState<JvmTaintSource>> expand(JvmAbstractState<SetAbstractState<JvmTaintSource>> expandedInitialState, JvmAbstractState<SetAbstractState<JvmTaintSource>> reducedExitState, JvmCfaNode blockEntryNode, Call call)
ExpandOperatorexpand in interface ExpandOperator<SetAbstractState<JvmTaintSource>>expand in class DefaultExpandOperator<SetAbstractState<JvmTaintSource>>expandedInitialState - the entry state of the called procedure before any reductionreducedExitState - the state of the called procedure in its exit nodeblockEntryNode - the entry node of the called procedurecall - the information of the call to the procedureRebuildOperator to be solvedprotected java.util.List<SetAbstractState<JvmTaintSource>> calculateReturnValues(JvmAbstractState<SetAbstractState<JvmTaintSource>> reducedExitState, Instruction returnInstruction, Call call)
calculateReturnValues in class DefaultExpandOperator<SetAbstractState<JvmTaintSource>>protected JvmAbstractState<SetAbstractState<JvmTaintSource>> createJvmAbstractState(JvmCfaNode programLocation, JvmFrameAbstractState<SetAbstractState<JvmTaintSource>> frame, JvmHeapAbstractState<SetAbstractState<JvmTaintSource>> heap, MapAbstractState<java.lang.String,SetAbstractState<JvmTaintSource>> staticFields)
createJvmAbstractState in class DefaultExpandOperator<SetAbstractState<JvmTaintSource>>public java.util.Map<Signature,java.util.Set<JvmTaintSource>> getSignaturesToSources()