Skip to content
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

Tainted data flow across components #107

Open
kyuen001 opened this issue Nov 28, 2022 · 0 comments
Open

Tainted data flow across components #107

kyuen001 opened this issue Nov 28, 2022 · 0 comments

Comments

@kyuen001
Copy link

kyuen001 commented Nov 28, 2022

Can MT track data flow from a source to a sink that is located in another component?

public class Activity1 extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Intent source = getIntent();    // getIntent() is the source

        Intent serviceIntent = new Intent(this, Service1.class);
        serviceIntent.setData(source.getData());
        startService(serviceIntent);
    }
}
public class Service1 extends Service{
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        sink(intent.getData());    // sink(Uri uri) is the sink
    }
}

Initially, I thought Shims could be used here where I could set:

  • the Intent constructor, new Intent(Context packageContext, Class<?> cls), as the shimmed-method,
  • and the lifecycle callbacks of Service as the shim-targets

However, (if I am not wrong) shim-targets are limited to the argument types of the shimmed-method, so I am unable to 'shim over' to Service1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant