abstract class JavaBackwardTaintProblem extends JavaBackwardIFDSProblem[TaintFact] with TaintProblem[Method, JavaStatement, TaintFact]
Implementation of a backward taint analysis for Java code.
- Alphabetic
- By Inheritance
- JavaBackwardTaintProblem
- TaintProblem
- JavaBackwardIFDSProblem
- JavaIFDSProblem
- IFDSProblem
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new JavaBackwardTaintProblem(project: SomeProject)
Type Members
- type OutsideAnalysisContextCallHandler = (JavaStatement, Option[JavaStatement], TaintFact, Seq[Method], Getter) => Set[TaintFact] { def apply(call: org.opalj.tac.fpcf.analyses.ide.solver.JavaStatement, successor: Option[org.opalj.tac.fpcf.analyses.ide.solver.JavaStatement], in: org.opalj.tac.fpcf.analyses.ifds.taint.TaintFact, unbCallChain: Seq[org.opalj.br.Method], dependeesGetter: org.opalj.ifds.Dependees.Getter): Set[org.opalj.tac.fpcf.analyses.ifds.taint.TaintFact] }
- Definition Classes
- IFDSProblem
- type OutsideAnalysisContextUnbReturnHandler = (Method, TaintFact, Seq[Method], Getter) => Unit { def apply(callee: org.opalj.br.Method, in: org.opalj.tac.fpcf.analyses.ifds.taint.TaintFact, callChain: Seq[org.opalj.br.Method], dependeesGetter: org.opalj.ifds.Dependees.Getter): Unit }
- Definition Classes
- IFDSProblem
Abstract Value Members
- abstract def applyFlowFactFromCallee(calleeFact: FlowFact, caller: Method, in: TaintFact, callChain: Seq[Method]): Option[FlowFact]
Called, when a FlowFact holds at the index 0 node of a callee.
Called, when a FlowFact holds at the index 0 node of a callee. Creates a FlowFact in the caller context if necessary.
- calleeFact
The FlowFact, which holds at the start node of the callee.
- caller
The caller.
- in
the fact
- callChain
the current call chain
- returns
Some FlowFact, if necessary. Otherwise None.
- Attributes
- protected
- abstract def createFlowFactAtExit(callee: Method, in: TaintFact, unbalancedCallChain: Seq[Method]): Option[TaintFact]
Called, when new FlowFacts are found at the analysis exit of a method.
Called, when new FlowFacts are found at the analysis exit of a method. Creates a FlowFact in the callee context if necessary.
- callee
The callee.
- in
The newly found facts.
- unbalancedCallChain
the current call chain.
- returns
Some FlowFact, if necessary. Otherwise None.
- Definition Classes
- IFDSProblem
- abstract def entryPoints: Seq[(Method, IFDSFact[TaintFact, Method, JavaStatement])]
The entry points of this analysis.
The entry points of this analysis.
- Definition Classes
- IFDSProblem
- abstract def sanitizesParameter(call: JavaStatement, in: TaintFact): Boolean
Called in callToReturnFlow.
Called in callToReturnFlow. This method can return whether the input fact will be removed after
calleewas called. I.e. the method could sanitize parameters.- call
The call statement.
- in
The fact which holds before the call.
- returns
Whether in will be removed after the call.
- Attributes
- protected
- Definition Classes
- TaintProblem
- abstract def sanitizesReturnValue(callee: Method): Boolean
Checks, if some
calleeis a sanitizer, which sanitizes its return value.Checks, if some
calleeis a sanitizer, which sanitizes its return value. In this case, no return flow facts will be created.- callee
The method, which was called.
- returns
True, if the method is a sanitizer.
- Attributes
- protected
- Definition Classes
- TaintProblem
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def automaticallyPropagateNullFactInFlowFunctions: Boolean
- returns
Whether the null Fact is automatically added to the result of every flow function where it is passed into
- Definition Classes
- IFDSProblem
- def callFlow(start: JavaStatement, in: TaintFact, call: JavaStatement, callee: Method): Set[TaintFact]
If the returned value in the caller context is tainted, the returned values in the callee context will be tainted.
If the returned value in the caller context is tainted, the returned values in the callee context will be tainted. If an actual pass-by-reference-parameter in the caller context is tainted, the formal parameter in the callee context will be tainted.
- start
The statement, which starts the analysis of the 'callee'.
- in
The fact which holds before the execution of the
call.- call
The statement, which called the
callee.- callee
The called method, for which the data flow shall be computed.
- returns
The facts, which hold after the execution of
callunder the assumption that the factinheld beforecallandcallcallscallee.
- Definition Classes
- JavaBackwardTaintProblem → IFDSProblem
- def callToReturnFlow(call: JavaStatement, in: TaintFact, successor: Option[JavaStatement], unbCallChain: Seq[Method]): Set[TaintFact]
Adds a FlowFact, if
createFlowFactAtCallcreates one.Adds a FlowFact, if
createFlowFactAtCallcreates one. Removes taints according tosanitizeParamters.- call
The statement, which invoked the call.
- in
The facts, which hold before the
call.- unbCallChain
The current call chain of unbalanced returns.
- returns
The facts, which hold after the call independently of what happens in the callee under the assumption that
inheld beforecall.
- Definition Classes
- JavaBackwardTaintProblem → IFDSProblem
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def createFlowFactAtCall(call: JavaStatement, in: TaintFact, callChain: Seq[Method]): Option[TaintFact]
Called in callToReturnFlow.
Called in callToReturnFlow. Creates a fact if necessary.
- call
The call.
- in
The fact, which holds before the call.
- returns
Some fact, if necessary. Otherwise None.
- Attributes
- protected
- def enableUnbalancedReturns: Boolean
- returns
Whether the analysis should follow unbalanced return flows (return of a method for which no matching previous call was processed).
- Definition Classes
- JavaBackwardTaintProblem → IFDSProblem
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- val icfg: JavaICFG
- Definition Classes
- IFDSProblem
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def needsPredecessor(statement: JavaStatement): Boolean
- Definition Classes
- JavaIFDSProblem → IFDSProblem
- def normalFlow(jstmt: JavaStatement, in: TaintFact, predecessor: Option[JavaStatement]): Set[TaintFact]
If a tainted variable gets assigned a value, this value will be tainted.
If a tainted variable gets assigned a value, this value will be tainted.
- in
The fact which holds before the execution of the
statement.- predecessor
The predecessor of the analyzed
statement, for which the data flow shall be computed. Used for phi statements to distinguish the flow.- returns
The facts, which hold after the execution of
statementunder the assumption that the facts ininheld beforestatementandsuccessorwill be executed next.
- Definition Classes
- JavaBackwardTaintProblem → IFDSProblem
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def nullFact: TaintFact
The null fact of this analysis.
The null fact of this analysis.
- Definition Classes
- JavaBackwardTaintProblem → IFDSProblem
- def outsideAnalysisContextCall(callee: Method): Option[OutsideAnalysisContextCallHandler]
If the returned value is tainted, all actual parameters will be tainted.
If the returned value is tainted, all actual parameters will be tainted.
- callee
The method called by
call.- returns
The handler function. It receives the statement which invoked the call, the successor statement, which will be executed after the call and the set of input facts which hold before the
call. It returns facts, which hold after the call, excluding the call to return flow.
- Definition Classes
- JavaBackwardTaintProblem → JavaIFDSProblem → IFDSProblem
- def outsideAnalysisContextUnbReturn(callee: Method): Option[OutsideAnalysisContextUnbReturnHandler]
Checks if there are unbalanced returns outside this analysis' context.
Checks if there are unbalanced returns outside this analysis' context. For unbalanced returns outside this analysis' context the returned handler is called to compute the return edge and trigger the callers' analyses.
- callee
the method from which an unbalanced return is performed.
- returns
the handler function. It receives the callee, the input fact, the existing call chain before this unbalanced return.
- Definition Classes
- JavaIFDSProblem → IFDSProblem
- def returnFlow(exit: JavaStatement, in: TaintFact, call: JavaStatement, successor: Option[JavaStatement], unbCallChain: Seq[Method]): Set[TaintFact]
Taints the actual parameters in the caller context if the formal parameters in the callee context were tainted.
Taints the actual parameters in the caller context if the formal parameters in the callee context were tainted. Does not taint anything, if the sanitize method was called.
- exit
The statement, which terminated the analysis of the
callee.- in
The fact which holds before the execution of the
exit.- call
The statement, which called the
callee.- successor
The successor statement of the call, might be None if unbalanced return.
- unbCallChain
The current call chain of unbalanced returns.
- returns
The facts, which hold after the execution of
exitin the caller's context under the assumption thatinheld before the execution ofexitand thatsuccessorwill be executed next.
- Definition Classes
- JavaBackwardTaintProblem → IFDSProblem
- def shouldPerformUnbalancedReturn(source: (Method, IFDSFact[TaintFact, Method, JavaStatement])): Boolean
Whether at this exit of a function, an unbalanced return should be performed.
Whether at this exit of a function, an unbalanced return should be performed. Only if enableUnbalancedReturns == true.
- source
the source fact of the analysis of the current function.
- returns
true if an unbalanced return should be performed.
- Definition Classes
- IFDSProblem
- def subsumeFacts: Boolean
- returns
Whether to try to subsume new facts under existing facts and save graph edges
- Definition Classes
- IFDSProblem
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated