How can I find all of the access of a pointer? #8585
-
Given a global linked list
Then, there are some pointers that point to one of the nodes of
I have some trouble with finding out any access to the nodes of
But I can not find the access of node with
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @Just1ceP4rtn3r, Your code looks incomplete (neither the source nor the sink in |
Beta Was this translation helpful? Give feedback.
-
Hi, This is a bit tricky for subtle reasons. For an expression such as Additionally, the taint library doesn't (yet) fully support taint flows from global variable initializers, so we will get better results if we start from accesses to those variables instead. This is the best I've come up with:
I've tried to write |
Beta Was this translation helpful? Give feedback.
-
Thanks very much! It works for me. |
Beta Was this translation helpful? Give feedback.
Hi,
This is a bit tricky for subtle reasons. For an expression such as
a->b
, the taint library tracks taint of the pointera
separately from its content accessed bya->b
. In your case,List
may be tainted whileList->next->next
is not. We can work around this by adding a custom taint step (isAdditionalTaintStep
).Additionally, the taint library doesn't (yet) fully support taint flows from global variable initializers, so we will get better results if we start from accesses to those variables instead.
This is the best I've come up with: