Class IdentityTaintWrapper

java.lang.Object
soot.jimple.infoflow.taintWrappers.AbstractTaintWrapper
soot.jimple.infoflow.taintWrappers.IdentityTaintWrapper
All Implemented Interfaces:
ITaintPropagationWrapper

public class IdentityTaintWrapper extends AbstractTaintWrapper
Taints the return value of a method call if one of the parameter values or the base object is tainted.
Author:
Steven Arzt
  • Constructor Details

    • IdentityTaintWrapper

      public IdentityTaintWrapper()
  • Method Details

    • getTaintsForMethodInternal

      public Set<AccessPath> getTaintsForMethodInternal(soot.jimple.Stmt stmt, AccessPath taintedPath)
      Description copied from class: AbstractTaintWrapper
      Checks an invocation statement for black-box taint propagation. This allows the wrapper to artificially propagate taints over method invocations without requiring the analysis to look inside the method.
      Specified by:
      getTaintsForMethodInternal in class AbstractTaintWrapper
      Parameters:
      stmt - The invocation statement which to check for black-box taint propagation
      taintedPath - The tainted field or value to propagate
      Returns:
      The list of tainted values after the invocation statement referenced in Stmt has been executed
    • isExclusiveInternal

      public boolean isExclusiveInternal(soot.jimple.Stmt stmt, AccessPath taintedPath)
      Description copied from class: AbstractTaintWrapper
      Gets whether the taints produced by this taint wrapper are exclusive, i.e. there are no other taints than those produced by the wrapper. In effect, this tells the analysis not to propagate inside the callee.
      Specified by:
      isExclusiveInternal in class AbstractTaintWrapper
      Parameters:
      stmt - The call statement to check
      taintedPath - The tainted field or value to propagate
      Returns:
      True if this taint wrapper is exclusive, otherwise false.
    • supportsCallee

      public boolean supportsCallee(soot.SootMethod method)
      Description copied from interface: ITaintPropagationWrapper
      Checks whether this taint wrapper can in general produce artificial taints for the given callee. If an implementation returns "false" for a callee, all call sites for this callee might be removed if not needed elsewhere.
      Parameters:
      method - The method to check
      Returns:
      True if this taint wrapper can in general produce taints for the given method.
    • supportsCallee

      public boolean supportsCallee(soot.jimple.Stmt callSite)
      Description copied from interface: ITaintPropagationWrapper
      Checks whether this taint wrapper can in general produce artificial taints for the given call site. If an implementation returns "false" for a call site, this call sites might be removed if not needed elsewhere.
      Parameters:
      callSite - The call site to check
      Returns:
      True if this taint wrapper can in general produce taints for the given call site.
    • getAliasesForMethod

      public Set<Abstraction> getAliasesForMethod(soot.jimple.Stmt stmt, Abstraction d1, Abstraction taintedPath)
      Description copied from interface: ITaintPropagationWrapper
      Gets the aliases that a summarized method generates for the given abstraction. Note that this is a may-alias problem.
      Parameters:
      stmt - The statement that calls the summarized method
      d1 - The abstraction at the entry point of the method that calls the wrapped method
      taintedPath - The abstraction for which the aliases shall be computed
      Returns:
      The set of aliases for the given abstraction or null if no such aliases exist