Enforce per-app data protections for targetSdk 28+
Adds per-app categories to untrusted app domains and their app data types. Per-app categories are in addition to the existing per-user categories. Apps targeting sdk version 28+ will now have the following characteristics: Domain: u:r:untrusted_app:s0:c[0-9]+,c[0-9]+,c[0-9],c[0-9] Data context: u:object_r:app_data_file:s0:c[0-9]+,c[0-9]+,c[0-9],c[0-9] Whereas apps targeting 27- will look like: Domain: u:r:untrusted_app_27:s0:c[0-9]+,c[0-9]+ Data context: u:object_r:app_data_file:s0:c[0-9]+,c[0-9]+ To ensure backwards compatibility with previous SDK versions, the levelFrom=all now enforces categories by dominance instead of equality. Apps with per-app and per-user categories will continue to have selinux permissions (but not necessarily unix permissions) to access app data with only per-user categories, but apps with only per-user categories will not be able to access the data of apps with both per-app and per-user categories. Bug: 63897054 Test: Boot sailfish, run apps, verify no new selinux denials. Test: cts-tradefed run cts -m CtsSelinuxTargetSdkCurrentTestCases Test: cts-tradefed run cts -m CtsSelinuxTargetSdk27TestCases Test: cts-tradefed run cts -m CtsSelinuxTargetSdk25TestCases Test: adb sideload an OTA and verify that files are correctly labeled. Change-Id: I64b013874fe87b55f47e817a1279e76ecf86b7c0
Showing
- private/app_neverallows.te 1 addition, 0 deletionsprivate/app_neverallows.te
- private/compat/26.0/26.0.cil 3 additions, 1 deletionprivate/compat/26.0/26.0.cil
- private/compat/26.0/26.0.ignore.cil 4 additions, 1 deletionprivate/compat/26.0/26.0.ignore.cil
- private/mls 3 additions, 3 deletionsprivate/mls
- private/seapp_contexts 4 additions, 3 deletionsprivate/seapp_contexts
- private/untrusted_app.te 0 additions, 4 deletionsprivate/untrusted_app.te
- private/untrusted_app_25.te 0 additions, 4 deletionsprivate/untrusted_app_25.te
- private/untrusted_app_27.te 11 additions, 3 deletionsprivate/untrusted_app_27.te
- private/untrusted_app_all.te 4 additions, 0 deletionsprivate/untrusted_app_all.te
- public/untrusted_app.te 2 additions, 0 deletionspublic/untrusted_app.te
Please register or sign in to comment