mate.poi.analysis.VariableLengthStackObject module¶
- class mate.poi.analysis.VariableLengthStackObject.VariableLengthStackObject¶
Bases:
mate.poi.poi_types.Analysis
- run(session: mate_query.db.Session, graph: mate_query.db.Graph, _inputs: Dict[str, Any]) Iterator[Tuple[mate_common.models.analyses.POI, List[Union[mate_common.models.graphs.NodeRequest, mate_common.models.graphs.GraphRequest, mate_common.models.graphs.SliceRequest]]]] ¶
- Parameters
session (mate_query.db.Session) –
graph (mate_query.db.Graph) –
_inputs (Dict[str, Any]) –
- Return type
Iterator[Tuple[mate_common.models.analyses.POI, List[Union[mate_common.models.graphs.NodeRequest, mate_common.models.graphs.GraphRequest, mate_common.models.graphs.SliceRequest]]]]
- class mate.poi.analysis.VariableLengthStackObject.VariableLengthStackObjectPOI(*, insight: str, source: str = None, sink: str = None, salient_functions: List[mate_common.models.analyses.SalientFunction] = [])¶
Bases:
mate_common.models.analyses.POI
This POI represents a variable length stack object whose size is potentially controllable from user input.
It consists of an input signature and an LLVM alloca value that may be controlled by the input signature (and hence the user).
- Parameters
insight (str) –
source (Optional[str]) –
sink (Optional[str]) –
salient_functions (List[mate_common.models.analyses.SalientFunction]) –
- Return type
None
- insight: str¶
A human-readable piece of “insight” for the POI, in Markdown format.
- salient_functions: List[SalientFunction]¶
A list of
SalientFunction
models.Each POI analysis determines which, if any, functions to include in this list.
- sink: Optional[str]¶
A human readable location string for the “sink” of the POI.
- source: Optional[str]¶
A human readable location string for the “source” of the POI.
- mate.poi.analysis.VariableLengthStackObject.compute_cfl_variable_length_stack_object(session: mate_query.db.Session, cpg: mate_query.db.Graph) Iterator[Tuple[mate_query.cpg.models.node.ast.llvm.Instruction, mate_query.cpg.models.node.ast.llvm.Alloca, List[str]]] ¶
- Parameters
session (mate_query.db.Session) –
cpg (mate_query.db.Graph) –
- Return type
Iterator[Tuple[mate_query.cpg.models.node.ast.llvm.Instruction, mate_query.cpg.models.node.ast.llvm.Alloca, List[str]]]