Class ConditionalFlowSourceSinkManagerWrapper

java.lang.Object
soot.jimple.infoflow.river.ConditionalFlowSourceSinkManagerWrapper
All Implemented Interfaces:
IConditionalFlowManager, IReversibleSourceSinkManager, ISourceSinkManager

public class ConditionalFlowSourceSinkManagerWrapper extends Object implements IReversibleSourceSinkManager, IConditionalFlowManager
Wraps a SourceSinkManager and only redirects calls to methods of IConditionalFlowManager to the wrapped SourceSinkManager. Provide this to the Additional Flow such that it knows the conditions but doesn't accept sources.
Author:
Tim Lange
  • Constructor Details

    • ConditionalFlowSourceSinkManagerWrapper

      public ConditionalFlowSourceSinkManagerWrapper(IConditionalFlowManager inner)
  • Method Details

    • isSecondarySink

      public boolean isSecondarySink(soot.jimple.Stmt stmt)
      Description copied from interface: IConditionalFlowManager
      Checks if a sink is reached in the secondary flow
      Specified by:
      isSecondarySink in interface IConditionalFlowManager
      Parameters:
      stmt - Sink Statement
      Returns:
      true if stmt is a secondary sink
    • registerSecondarySink

      public void registerSecondarySink(soot.jimple.Stmt stmt)
      Description copied from interface: IConditionalFlowManager
      Register a secondary sink at runtime.
      Specified by:
      registerSecondarySink in interface IConditionalFlowManager
      Parameters:
      stmt - Secondary sink statement
    • registerSecondarySink

      public void registerSecondarySink(soot.SootMethod sm)
      Description copied from interface: IConditionalFlowManager
      Register a secondary sink at runtime.
      Specified by:
      registerSecondarySink in interface IConditionalFlowManager
      Parameters:
      sm - Secondary sink method
    • isConditionalSink

      public boolean isConditionalSink(soot.jimple.Stmt stmt, soot.SootClass baseClass)
      Description copied from interface: IConditionalFlowManager
      Checks whether stmt is a conditional sink and needs a secondary flow. Ensures that the statement contains a InstanceInvokeExpr.
      Specified by:
      isConditionalSink in interface IConditionalFlowManager
      Parameters:
      stmt - Sink Statement
      baseClass - Class of the tainted base
      Returns:
      true if stmt is a conditional sink
    • initialize

      public void initialize()
      Description copied from interface: ISourceSinkManager
      Initialization method that is called after the Soot instance has been created and before the actual data flow tracking is started.
      Specified by:
      initialize in interface ISourceSinkManager
    • getSourceInfo

      public SourceInfo getSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager)
      Description copied from interface: ISourceSinkManager
      Determines if a method called by the Stmt is a source method or not. If so, additional information is returned
      Specified by:
      getSourceInfo in interface ISourceSinkManager
      Parameters:
      sCallSite - a Stmt which should include an invokeExrp calling a method
      manager - The manager object for interacting with the solver
      Returns:
      A SourceInfo object containing additional information if this call is a source, otherwise null
    • getSinkInfo

      public SinkInfo getSinkInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap)
      Description copied from interface: ISourceSinkManager
      Checks if the given access path at this statement will leak.
      Specified by:
      getSinkInfo in interface ISourceSinkManager
      Parameters:
      sCallSite - The call site to check
      manager - The manager object for interacting with the solver
      ap - The access path to check. Pass null to check whether the given statement can be a sink for any given access path.
      Returns:
      A SinkInfo object containing additional information if this call is a sink, otherwise null
    • getInverseSourceInfo

      public SinkInfo getInverseSourceInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager, AccessPath ap)
      Description copied from interface: IReversibleSourceSinkManager
      Determines whether this is a source resulting in a leak for backwards search. Creating a SinkInfo using source signatures.
      Specified by:
      getInverseSourceInfo in interface IReversibleSourceSinkManager
      Parameters:
      sCallSite - a Stmt which should include an invokeExrp calling a method
      manager - The manager object for interacting with the solver
      ap - The access path to check. Pass null to check whether the given statement can be a sink for any given access path.
      Returns:
      A SourceInfo object containing additional information if this call is a source, otherwise null
    • getInverseSinkInfo

      public SourceInfo getInverseSinkInfo(soot.jimple.Stmt sCallSite, InfoflowManager manager)
      Description copied from interface: IReversibleSourceSinkManager
      Determines if a method called by the Stmt is a sink method or not. If so, additional information is returned to introduce a taint. Creating a SourceInfo using sink signatures
      Specified by:
      getInverseSinkInfo in interface IReversibleSourceSinkManager
      Parameters:
      sCallSite - The call site to check
      manager - The manager object for interacting with the solver
      Returns:
      A SinkInfo object containing additional information if this call is a sink, otherwise null