- Nov 01, 2018
-
-
Nick Kralevich authored
Require all SELinux domains which have permission to perform ioctls on /dev/tun explicitly specify what ioctls they perform. Only allow the safe defaults FIOCLEX and FIONCLEX, which are alternate, uncommon ways to set and unset the O_CLOEXEC flag. Remove app's ability to issue *any* ioctls on /dev/tun, period. Add neverallow assertions (compile time assertion + CTS test) to prevent regressions. Limit system_server's ability to perform ioctls on /dev/tun to FIOCLEX, FIONCLEX, TUNGETIFF, and TUNSETIFF. Testing and source code examination shows that only TUNGETIFF and TUNSETIFF are used by system_server. The goal of this change is to put SELinux ioctl controls in place for /dev/tun, so we don't have to maintain the custom kernel patch at https://android.googlesource.com/kernel/common/+/11cee2be0c2062ba88f04eb51196506f870a3b5d%5E%21 Delete the neverallow assertion in isolated_app.te. This is already covered by the assertion present in app_neverallows.te. Test: cts-tradefed run cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideVpnTests Test: cts-tradefed run cts -m CtsHostsideNetworkTests Test: cts-tradefed run cts -m CtsNetTestCases Bug: 111560739 Bug: 111560570 Change-Id: Ibe1c3a9e880db0bee438535554abdbc6d84eec45
-
Treehugger Robot authored
-
Mark Salyzyn authored
Already has permissions to remove the scratch partition, but to allow more refined cleansing (eg: just remove vendor override), need the ability to mount and scrub overlay directories. Test: manual Bug: 117605276 Change-Id: Ibc272c0aa7ce207280023912f5f119ccf5079a7f
-
Minchan Kim authored
-
Hongyi Zhang authored
Test: manual on device Change-Id: Ibafe1b345489c88a49a7ed3e2e61e5cc5e1880a1
-
Treehugger Robot authored
-
Minchan Kim authored
Vendor need to hook bugreport propery as well as dumpstatez. This CL exports it. Test: Confirmed verndor can get property trigger hook manually Bug: 118718191 Change-Id: I64a0e38716fb863ccd8923c6c41a776ea341f2d1 Signed-off-by:
Minchan Kim <minchan@google.com>
-
- Oct 31, 2018
-
-
Treehugger Robot authored
-
David Anderson authored
-
Nick Kralevich authored
Kernel commit 3ba4bf5f1e2c ("selinux: add a map permission check for mmap") added a map permission check on mmap so that we can distinguish memory mapped access (since it has different implications for revocation). system/sepolicy commit 4397f082 introduced the permission to Android and updated common macros. Since then, we've been adding more mmap support where it was accidentally omitted. Add the ability for isolated_apps to mmap() app data files. There's no reason why this should be blocked. Also fixup sdcard access which has similar problems. Bug: 118760652 Bug: https://crbug.com/892014 Test: policy compiles. Change-Id: I3823f313103c9dcedf3b21d081a22f8fbb271c02
-
Nick Kralevich authored
Create a transient SELinux domain where system_server can perform certain JIT setup. The idea is that system_server will start in the system_server_startup domain, setup certain JIT pages, then perform a one-way transition into the system_server domain. From that point, further JITing operations are disallowed. Bug: 62356545 Test: device boots, no permission errors Change-Id: Ic55b2cc5aba420ebcf62736622e08881a4779004
-
Treehugger Robot authored
-
Nick Kralevich authored
This reverts commit 0dd738d8. Reason for revert: CtsSimpleperfTestCases CTS test case failures. See b/118704604 for details. Bug: 112357170 Bug: 118704604 Change-Id: Ibe921f3bbc3404694542ef695883c1a30777d68b
-
- Oct 30, 2018
-
-
David Anderson authored
These ioctls are similar to BLKGETSIZE64; they return benign information about the partition's alignment, and are used by liblp to optimally align dynamic partition extents. The system_block_device is included here because on retrofit devices, the "super" partition is mapped to the system partition. Bug: 116802789 Test: fastboot flashall Change-Id: I38282904828105cf5f16ce9d4b5884d2b0e89d38
-
Tri Vo authored
This is a temporary measure to disable treble sepolicy tests for non-compliant targets. Bug: 113124961 Bug: 111243627 Change-Id: I83d6efad0ff5c7d87a4b990560c390b66aeb3653 Test: m selinux_policy
-
Wei Wang authored
-
Tri Vo authored
-
Nick Kralevich authored
This reverts commit 67ed4328. Reason for revert: Broken CTS test. See b/118642091 Bug: 118642091 Bug: 110379912 Change-Id: I5afd16bf23149c74f2740720cdd248a255ff1497
-
- Oct 29, 2018
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Nick Kralevich authored
untrusted_app: Remove the ability to run execve() on files within an application's home directory. Executing code from a writable /home directory is a W^X violation (https://en.wikipedia.org/wiki/W%5EX). Additionally, loading code from application home directories violates a security requirement that all executable code mapped into memory must come from signed sources, or be derived from signed sources. Note: this change does *not* remove the ability to load executable code through other mechanisms, such as mmap(PROT_EXEC) of a file descriptor from the app's home directory. In particular, functionality like dlopen() on files in an app's home directory continues to work even after this change. untrusted_app_25 and untrusted_app_27: For backwards compatibility, continue to allow these domains to execve() files from the application's home directory. seapp_contexts: Bump the minimum API level required to enter the untrusted_app domain. This will run API level 27-28 processes in the API level 27 sandbox. API level 28 will continue to run with levelFrom=all, and API level 27 will continue to run with levelFrom=user. Bug: 112357170 Test: Device boots and no obvious problems. Test: See CTS test at https://android-review.googlesource.com/c/platform/cts/+/804228 Change-Id: Ief9ae3a227d16ab5792f43bacbb577c1e70185a0
-
- Oct 27, 2018
-
-
Jeff Sharkey authored
Update the "allowxperm" to reflect the various ioctl() performed in the vold source code. Bug: 118437832 Test: atest android.os.storage.cts.StorageManagerTest Change-Id: Ide3a09104d8b4ce7fa2b7e23e9b215139186f595
-
Nick Kralevich authored
system/sepolicy commit 23c9d91b introduced a new type called privapp_data_file. This type is used to label priv-app's /home files. For backwards compatibility, priv-app rules involving normal app_data_files were preserved. Subsequently, system/sepolicy commit 5d175519 assigned the file label privapp_data_file to /home files owned by priv-apps. Because of the previous labeling of priv-app data files, priv-apps were granted the ability to mmap(PROT_EXEC) any other app's /home files, regardless of how trustworthy or untrustworthy those files were. Commit 23c9d91b preserved the status quo. However, now that we have a more refined label for priv-app /home files, we no longer need to be as permissive. Drop the ability for priv-apps to map executable code from untrusted_apps home directories. "execute" is removed in this change, and "execute_no_trans" was previously removed in commit 8fb4cb8b. Add a neverallow assertion (compile time assertion + CTS test) to prevent regressions. Further clarify why we need to support priv-apps loading executable code from their own home directories, at least for now. b/112037137 covers further tightening we can do in this area. Bug: 112357170 Test: Device boots and no problems. Change-Id: Ia6a9eb4c2ed8a02ad45644d025181ba3c8424cda
-
- Oct 26, 2018
-
-
Treehugger Robot authored
-
Nick Kralevich authored
The current rule is missing mmap. r_file_perm implicitly adds mmap, so we should just use that instead. Test: policy compiles. Change-Id: I4051d1eb4c36a2b6ff2b5f26ce53355287cbe2b4
-
Risan authored
We are moving AppFuse mount from system_server's mount namespace to vold. Hence, we could reduce the SELinux permissions given to system_server, in the expense of adding allow rules to vold and letting appdomain have access to vold's fd. Bug: 110379912 Test: testOpenProxyFileDescriptor passes (after vold and system_server code changes) Change-Id: I4731a8ec846c5cb84ec4b680d51938494e8ddd75
-
Tri Vo authored
-
Tri Vo authored
Remove blanket coredomain access to same_process_hal_file in favor of granular access. This change takes into account audits from go/sedenials (our internal dogfood program) Bug: 37211678 Test: m selinux_policy Change-Id: I5634fb65c72d13007e40c131a600585a05b8c4b5
-
Tri Vo authored
-
Jiyong Park authored
apexd is using following additional ioctl cmds to mount the mini filesystem inside APEXs: LOOP_SET_STATUS64 LOOP_SET_FD LOOP_SET_BLOCK_SIZE LOOP_SET_DIRECT_IO LOOP_CLR_FD Test: m; m apex.test; adb push <the_built_apex> /data/apex; adb reboot /apex/com.android.example.apex exists Change-Id: I68388cc4f323e4fcff370c8cdc0958cbd827e9cc
-
Tri Vo authored
/dev/tegra.* is not used in android platform and is device-specific Bug: 110962171 Test: boot walleye Change-Id: I4cc790d28457b429a3ed9829de223dae357eb498
-
Tri Vo authored
This is a temporary measure to disable treble sepolicy tests for non-compliant targets. Bug: 113124961 Bug: 111243627 Test: m selinux_policy Change-Id: I291b7cc3c8c07b838f1ea22e55550c42c5083d8f
-
- Oct 25, 2018
-
-
Jiwen 'Steve' Cai authored
Bug: 118124442 Test: device can boot with android.frameworks.bufferhub@1.0-service running Change-Id: I1d186d5350671b0d2dd4e831429b8fba828316e0
-
Anton Hansson authored
-
- Oct 24, 2018
-
-
Bill Yi authored
Change-Id: I7a398025c18a7ce22c775a67328dc5504f98c04f
-
Treehugger Robot authored
-
Jack Yu authored
Added a new flag to specify the IWLAN operation mode. Also allowed this system properties for vendor native service to access. Test: Manual Bug: 73659459 Change-Id: I23197e451557fae36a0cc5da4b50b3a00f9233dc
-
Anton Hansson authored
-
Tom Cherry authored
-