From 25725b63301d786374ef132549793d61a7015689 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey <jsharkey@android.com> Date: Thu, 6 Aug 2015 11:52:45 -0700 Subject: [PATCH] Protect runtime storage mount points. We have a bunch of magic that mounts the correct view of storage access based on the runtime permissions of an app, but we forgot to protect the real underlying data sources; oops. This series of changes just bumps the directory heirarchy one level to give us /mnt/runtime which we can mask off as 0700 to prevent people from jumping to the exposed internals. Also add CTS tests to verify that we're protecting access to internal mount points like this. Bug: 22964288 Change-Id: Ic585c4d4381fe51bd764902ef28c38db63b7f2cc --- file_contexts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/file_contexts b/file_contexts index 8fc29ebcb..d964f9bc2 100644 --- a/file_contexts +++ b/file_contexts @@ -314,7 +314,5 @@ # external storage /mnt/media_rw(/.*)? u:object_r:mnt_media_rw_file:s0 /mnt/user(/.*)? u:object_r:mnt_user_file:s0 -/mnt/runtime_default(/.*)? u:object_r:storage_file:s0 -/mnt/runtime_read(/.*)? u:object_r:storage_file:s0 -/mnt/runtime_write(/.*)? u:object_r:storage_file:s0 +/mnt/runtime(/.*)? u:object_r:storage_file:s0 /storage(/.*)? u:object_r:storage_file:s0 -- GitLab