com.android.cts.appsecurity.AppSecurityTests#testAppFailAccessPrivateData fail

com.android.cts.appsecurity.AppSecurityTests
–testAppFailAccessPrivateData fail

java.lang.AssertionError: on-device tests failed:
com.android.cts.appaccessdata.AccessPrivateDataTest#testAccessPrivateData:
junit.framework.AssertionFailedError: Other apps detailed traffic stats leaked
at junit.framework.Assert.fail(Assert.java:50)
at com.android.cts.appaccessdata.AccessPrivateDataTest.accessPrivateTrafficStats(AccessPrivateDataTest.java:113)
at com.android.cts.appaccessdata.AccessPrivateDataTest.testAccessPrivateData(AccessPrivateDataTest.java:70)

此case在6.0r8pass,在6.0r9fail,需要合入Google Patch:
https://android.googlesource.com/kernel/msm/+/14d533d17af0ab150440d6431414680b36105783%5E%21/#F0
修改:kernel/net/netfilter/xt_qtaguid.c

@@ -2521,7 +2521,7 @@
    uid_t stat_uid = get_uid_from_tag(tag);
    struct proc_print_info *ppi = m->private;
    /* Detailed tags are not available to everybody */
-   if (get_atag_from_tag(tag) && !can_read_other_uid_stats(stat_uid)) {
+   if (!can_read_other_uid_stats(stat_uid)) {
        CT_DEBUG("qtaguid: stats line: "
             "%s 0x%llx %u: insufficient priv "
             "from pid=%u tgid=%u uid=%u stats.gid=%u\n",
@@ -1923,7 +1923,7 @@
            );
        f_count = atomic_long_read(
            &sock_tag_entry->socket->file->f_count);
-       seq_printf(m, "sock=%p tag=0x%llx (uid=%u) pid=%u "
+       seq_printf(m, "sock=%pK tag=0x%llx (uid=%u) pid=%u "
               "f_count=%lu\n",
               sock_tag_entry->sk,
               sock_tag_entry->tag, uid,

你可能感兴趣的:(Android,CTS测试)