C++: Stop taint from flowing to arithmetic types

These are not likely to give the user much control over what can be accessed.
This commit is contained in:
Jeroen Ketema
2022-11-28 09:33:02 +01:00
parent 718663415b
commit 378206ae7d
3 changed files with 14 additions and 0 deletions

View File

@@ -75,6 +75,10 @@ class TaintedPathConfiguration extends TaintTracking::Configuration {
}
override predicate isSanitizerIn(DataFlow::Node node) { this.isSource(node) }
override predicate isSanitizer(DataFlow::Node node) {
node.asExpr().(Call).getTarget().getUnspecifiedType() instanceof ArithmeticType
}
}
from