-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to correctly taint "%this"? #109
Comments
Hello, Thank you for providing such a detailed description and information about the issue. This helps reduce the number of interactions needed, which is greatly appreciated by open source maintainers. Before addressing your question, I have a side note. What prompted you to modify the placeholder for
My Intuition: In this points-to set, a %this variable of type
You mentioned "Any", so it is temporarily not achievable directly in the current Tai-e. Because Writing taint configuration programmatically is our future plan. It's being incubated. But if you are in urgent need, I provide a simple idea below for your customized implementation: monitor all changes in the points-to set of all InstanceFields. If a |
I found my
Thanks for your help. I wrote another transfer to do this:
and invoke in the plugin
From the log I can ensure the callee %this is tainted with correct type, however, the call site is
There is still no tainted object here. How can I notify or add the taint object to this? I think this should be handled by Tai-e automatically but something must be wrong. |
Is the whole thing empty? If so, there may be some potential errors.
So this is not the latest code, it will not print runtime information (introduced by e87bce9). It makes sense.
What you do is
A simple idea might be more like the one I suggested. I'm not sure if your implementation will fully meet this requirement; it could potentially introduce additional issues. |
Solved, similar to what you suggested. I manually add taint obj to all invoke sites when SuperTaintHandler.java
ThisTransfer.java
For the example code above, it should generate
Yes, I have also updated to the latest version. The log file is completely empty.
Console output
Anyway, appreciate for your immediate help and develop such a useful tool! Cheers. |
Fixed in cfd0fb7. |
Overall Description
Hi, I want to write a plugin that can taint any class when any field of the class is tainted (e.g, when a tainted variable is passed to
obj.setName(String)
, I want theobj
is tainted as well after that). However, the caller variable is not affected even through the "%this" variable in the callee function is tainted. So how to correctly handle this?You can refer to the minimum reproduce code below that the "%this" in callee function is tainted
However the caller "%this" is untouched
I may misunderstand some parts of the pta analysis, do I need to manually propagate this (why not be handled automatically)?
Expected Behavior
The caller object is also tainted.
Current Behavior
The caller object is not tainted.
Tai-e Arguments
Click here to see Tai-e Options
Tai-e Log
Click here to see IR log
Click here to see points-to results
Additional Information
Click here to see key code of my plugin
Click here to see minimum reproduce code
The text was updated successfully, but these errors were encountered: