Java/ArithmeticTainted

java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql
This commit is contained in:
Nora Dimitrijević
2025-10-08 14:56:11 +02:00
parent 913550f408
commit a228936c63

View File

@@ -19,6 +19,8 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
}
Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
}
}
@@ -43,6 +45,8 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
}
Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
}
}