julian-klode / dns66

DNS-based Host Blocker (and lightweight ad blocker) for Android

Home Page:https://jak-linux.org/projects/dns66/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TransactionTooLargeException

borden-a1 opened this issue · comments

We used a static analysis tool to analyze dns66 and found that dns66 will invoke getInstalledApplications in Configuration.Allowlist.resolve.

This function will use binder to get all apps' infos in this device, which will cause TransactionTooLargeException and crash dns66 with many apps installs.
Some similar issues could be found in AdAway, ShoppingList.
We suggest that the invocation should be surrounded by try/catch, or add more arguments to limit return data size.

public void resolve(PackageManager pm, Set<String> onVpn, Set<String> notOnVpn){
    for (ApplicationInfo applicationInfo : pm.getInstalledApplications(0)) {
        ....
    }
}