问题描述
CTS8.1R13,R14测试CtsAppSecurityHostTestCases---android.appsecurity.cts.AppSecurityTests#testPermissionDiffCert失败
对应的fail log为:
03-22 13:55:15.836 7733 7886 I TestRunner: failed: testRestrictingProviderMatchingShadyPaths(com.android.cts.usespermissiondiffcertapp.AccessPermissionWithDiffSigTest)
03-22 13:55:15.836 7733 7886 I TestRunner: ----- begin exception -----
03-22 13:55:15.837 7733 7886 I TestRunner: junit.framework.AssertionFailedError: expected SecurityException reading content://ctspermissionwithsignaturepathrestricting//foo: null
03-22 13:55:15.837 7733 7886 I TestRunner: at junit.framework.Assert.fail(Assert.java:50)
03-22 13:55:15.837 7733 7886 I TestRunner: at com.android.cts.usespermissiondiffcertapp.AccessPermissionWithDiffSigTest.assertReadingContentUriNotAllowed(AccessPermissionWithDiffSigTest.java:72)
03-22 13:55:15.837 7733 7886 I TestRunner: at com.android.cts.usespermissiondiffcertapp.AccessPermissionWithDiffSigTest.assertContentUriNotAllowed(AccessPermissionWithDiffSigTest.java:123)
03-22 13:55:15.837 7733 7886 I TestRunner: at com.android.cts.usespermissiondiffcertapp.AccessPermissionWithDiffSigTest.testRestrictingProviderMatchingShadyPaths(AccessPermissionWithDiffSigTest.java:1221)
解决方案
merge security patch (CVE-2018-9548)
https://android.googlesource.com/platform/frameworks/base/+/c97efaa05124e020d7cc8c6e08be9c3b55ac4ea7