File tree Expand file tree Collapse file tree
cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 * here). So this step is about identifying which of those out-of-bounds pointers identified from step 1 that are
2121 * actually being dereferenced. We do this using a regular dataflow configuration (see `InvalidPointerToDerefConfig`).
2222 *
23- * This dataflow traversal defines the set of sources as any dataflow node that is non-strictly upper-bounded by the
24- * pointer-arithmetic instruction identified by `AllocationToInvalidPointer.qll`. (TODO: I'm pretty sure this is incorrect,
25- * and we should define the set of sources as anything that is non-strictly _lower_ bounded by the pointer-arithmetic
26- * instruction). That is, the set of sources is any dataflow node `source` such that `source.asInstruction <= pai + delta1`
27- * for some `delta1 >= 0`.
23+ * This dataflow traversal defines the set of sources as any dataflow node that is non-strictly lower-bounded by the
24+ * pointer-arithmetic instruction identified by `AllocationToInvalidPointer.qll`. That is, the set of sources is any
25+ * dataflow node `source` such that `source.asInstruction() >= pai + delta1` for some `delta1 >= 0`.
2826 *
2927 * The set of sinks is defined to be any address operand `addr` that is non-strictly upper-bounded by the sink. That is,
3028 * any dataflow node `n` such that `addr <= sink.asInstruction() + delta2` for some `delta2`. We call the instruction that
You can’t perform that action at this time.
0 commit comments