Repository navigation
Understanding C/C++ taint tracking in the presence of aliasing #9863
Unanswered
thinkmoore
asked this question in
Q&A
Replies: 1 comment 1 reply
|
Greetings! Thanks for getting in touch with this question. The query as you have written it certainly makes sense, and it's a pity that our taint tracking isn't smart enough to find all the vulnerable cases in your example. A few preliminary notes:
I've passed this on the the C analysis team who can hopefully give you some deeper answers here on why you are observing this and whether there is anything we could improve. Rewrite to use semmle.code.cpp.ir.dataflow.TaintTracking |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm trying to get a better understanding of how taint tracking in CodeQL handles aliasing. I adapted the following query and example from the CWE-022 query in the repository.
I expect this query to return four results, one for each sub-example in the file. However, only the final example involving
fileBuffer4is found. That result is also confusing as it reports two paths: one with two nodesargvandfileBuffer4and one that additionally includes parameters and the return value ofgetinput, which is not called in that part of the example.Does the query as I have written it make sense? Is this kind of pointer aliasing outside of what the taint tracking module is intended to reason about?
Thanks!
All reactions