Java: model taint for java.util.Arrays#3894
Java: model taint for java.util.Arrays#3894aschackmull merged 5 commits intogithub:masterfrom aibaars:util-arrays
Conversation
| or | ||
| method.getDeclaringType().hasQualifiedName("java.util", "Arrays") and | ||
| ( | ||
| method.hasName(["copyOf", "copyOfRange", "deepToString", "spliterator", "stream", "toString"]) and |
There was a problem hiding this comment.
What is the general convention regarding Object.toString() of this project? It could be a taint step if it is overridden and includes the values of the fields of the object, but if it is not overridden or does not ouput the value of all fields or their values do not override toString() this would cause false positives.
So if this considers deepToString and toString as taint steps, Object.toString() should probably be considered as well.
There was a problem hiding this comment.
Let's exclude "deepToString" and "toString" for now.
| or | ||
| method.getDeclaringType().hasQualifiedName("java.util", "Arrays") and | ||
| ( | ||
| method.hasName(["fill", "parallelPrefix", "parallelSetAll", "setAll"]) and |
There was a problem hiding this comment.
"parallelPrefix", "parallelSetAll", and "setAll" won't work like this. We have yet to set up a framework for data and taint flow in library methods designed to accept lambdas.
There was a problem hiding this comment.
I'll remove them for now.
|
@aibaars I think we're missing |
Has this sort of step come up? Including this suggests that we also include |
|
@lcartey I got a little push back on |
|
@aschackmull I've seen this only in synthetic benchmarks so far. I do actually think |
|
Actually, on reflection, you're right - the cases are inextricably linked for arrays of |
This pull request model taint propagation for the methods of the
java.util.Arraysclass.