- Oct 09, 2018
-
-
Tri Vo authored
What changed: - Removed cgroup access from untrusted and priv apps. - Settings app writes to /dev/stune/foreground/tasks, so system_app domain retains access to cgroup. - libcutils exports API to /dev/{cpuset, stune}/*. This API seems to be used abundantly in native code. So added a blanket allow rule for (coredomain - apps) to access cgroups. - For now, only audit cgroup access from vendor domains. Ultimately, we want to either constrain vendor access to individual domains or, even better, remove vendor access and have platform manage cgroups exclusively. Bug: 110043362 Test: adb shell setprop ro.config.per_app_memcg true, device correctly populates /dev/memcg on a per app basis on a device that supports that. Test: aosp_sailfish, wahoo boot without cgroup denials Change-Id: I9e441b26792f1edb1663c660bcff422ec7a6332b
-
- Oct 08, 2018
-
-
Tri Vo authored
Bug: 117178352 Test: no denials to /system/asan.options on asan walleye Change-Id: I6042693afb926a22a3e2be79bd2a7ba062806143
-
- Oct 04, 2018
-
-
Martijn Coenen authored
apexd is a new daemon for managing APEX packages installed on the device. It hosts a single binder service, "apexservice". Bug: 112455435 Test: builds, binder service can be registered, apexes can be accessed, verified and mounted Change-Id: I634ad100f10b2edcd9a9c0df0d33896fa5d4ed97
-
- Sep 27, 2018
-
-
Nick Kralevich authored
system_file_type is a new attribute used to identify files which exist on the /system partition. It's useful for allow rules in init, which are based off of a blacklist of writable files. Additionally, it's useful for constructing neverallow rules to prevent regressions. Additionally, add commented out tests which enforce that all files on the /system partition have the system_file_type attribute. These tests will be uncommented in a future change after all the device-specific policies are cleaned up. Test: Device boots and no obvious problems. Change-Id: Id9bae6625f042594c8eba74ca712abb09702c1e5
-
Nick Kralevich authored
/system/usr/share/zoneinfo is currently labeled zoneinfo_data_file, a label shared with /data/misc/zoneinfo. However, each of these directory locations has different security characteristics. In particular, the files in /system/usr/share/zoneinfo must never be writable, whereas /data/misc/zoneinfo may be written to by system_server. Reusing the same label hides these different security characteristics. Create a separate label for /system/usr/share/zoneinfo. Test: Device boots and no obvious problems. Change-Id: I8cf16ff038b06b38f77388e546d9b7a6865f7879
-
- Sep 23, 2018
-
-
Jeff Vander Stoep authored
Assert that only apps and installd may open private app files. Remove "open" permission for mediaserver/vold and remove their neverallow exemption. Test: verify no related audit messages in the logs. Test: build Fixes: 80300620 Fixes: 80418809 Bug: 80190017 Change-Id: If0c1862a273af1fedd8898f334c9b0aa6b9be728
-
- Sep 20, 2018
-
-
Tri Vo authored
This change limits global access to /system files down to: /system/bin/linker* /system/lib[64]/* /system/etc/ld.config* /system/etc/seccomp_policy/* /system/etc/security/cacerts/* /system/usr/share/zoneinfo/* Bug: 111243627 Test: boot device, browse internet without denials to system_* types. Test: VtsHalDrmV1_{1, 0}TargetTest without denials Change-Id: I69894b29733979c2bc944ac80229e84de5d519f4
-
- Sep 19, 2018
-
-
Benjamin Gordon authored
kernel commit 2a4c22426955d4fc04069811997b7390c0fb858e (fs: switch order of CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH checks) swapped the order of dac_override and dac_read_search checks. Domains that have dac_override will now generate spurious denials for dac_read_search unless they also have that permission. Since dac_override is a strict superset of dac_read_search, grant dac_read_search to all domains that already have dac_override to get rid of the denials. Bug: 114280985 Bug: crbug.com/877588 Test: Booted on a device running 4.14. Change-Id: I5c1c136b775cceeb7f170e139e8d4279e73267a4
-
- Sep 18, 2018
-
-
Tri Vo authored
In cases when a device upgrades to system-as-root from O to P, it needs a mount point for an already existing partition that is accessed by both system and vendor. Devices launching with P must not have /mnt/vendor accessible to system. Bug: 78598545 Test: m selinx_policy Change-Id: Ia7bcde44e2b8657a7ad9e0d9bae7a7259f40936f
-
- Sep 14, 2018
-
-
Nick Kralevich authored
Add additional compile time constraints on the ability to ptrace various sensitive domains. llkd: remove some domains which llkd should never ptrace, even on debuggable builds, such as kernel threads and init. crash_dump neverallows: Remove the ptrace neverallow checks because it duplicates other neverallow assertions spread throughout the policy. Test: policy compiles and device boots Change-Id: Ia4240d1ce7143b983bb048e046bb4729d0af5a6e
-
- Sep 13, 2018
-
-
Hridya Valsaraju authored
Metadata needs to be erased as part of fastboot flashall -w. Test: fastboot erase metadata Bug: 113648914 Change-Id: I38a0debd9face16cad9d9a13a48549f3f58652fa
-
- Sep 12, 2018
-
-
Nick Kralevich authored
Test: comments only. Policy compiles. Change-Id: Ic51533d37fff6c553950a122f33a48e3c119c67c
-
- Sep 11, 2018
-
-
Martijn Coenen authored
But in a very restricted form: 1) Nobody can initiate calls into init 2) Nobody can transfer binder objects into init, except servicemanager Bug: 112684055 Test: device boots Change-Id: Icfb218f2871e234284c74e096eccd7a2e786cf94
-
- Sep 06, 2018
-
-
Nick Kralevich authored
Not needed for modern Android versions. These rules are really, really old. Test: "adb bugreport" continues to work Test: Generating a bugreport via key combo continues to work. Change-Id: Ibc1157fb36abd7fc701db3819474f25210a3cb5f
-
- Sep 04, 2018
-
-
Mark Salyzyn authored
llkd needs the ptrace capabilities and dac override to monitor for live lock conditions on the stack dumps. Test: compile Bug: 33808187 Change-Id: Ibc1e4cc10395fa9685c4ef0ca214daf212a5e126
-
- Aug 28, 2018
-
-
Mark Salyzyn authored
Test: compile Bug: 64114943 Change-Id: I1d20cc027dbd1a94e2a79b6aebdd265cefe8a6a5
-
- Aug 21, 2018
-
-
Benjamin Gordon authored
commit 9b2e0cbe added a new self:global_capability_class_set macro that covers both self:capability and self:cap_userns. Apply the new macro to various self:capability references that have cropped up since then. Bug: 112307595 Test: policy diff shows new rules are all cap_userns Change-Id: I3eb38ef07532a8e693fd549dfdbc4a6df5329609
-
- Aug 15, 2018
-
-
Jerry Zhang authored
Also allow adb and fastboot to talk to recovery through recovery_socket. This enables changing between modes with usb commands. Test: No selinux denials Bug: 78793464 Change-Id: I80c54d4eaf3b94a1fe26d2280af4e57cb1593790
-
Florian Mayer authored
This reverts commit 0fd3ed3b. Reason for revert: Broke user builds. Change-Id: If95f1a25d22425a5a2b68a02d1561352fb5a52f0
-
- Aug 14, 2018
-
-
Steven Moreland authored
Forgotten cleanup item. Bug: 35870313 Test: making sepolicy (neverallows resolved at compile time) Change-Id: If9a583c4508db63356869502ec374727afa84b0b
-
Jerry Zhang authored
Also allow adb and fastboot to talk to recovery through recovery_socket. This enables changing between modes with usb commands. Test: No selinux denials Bug: 78793464 Change-Id: I1f97659736429fe961319c642f458c80f199ffb4
-
- Aug 11, 2018
-
-
Tri Vo authored
This rule prevents adding further fwk->vendor access. Left a TODO to clean up already existing access. Bug: 37168747 Test: build sailfish, walleye policies Change-Id: I5e61d0b94b81df228628dba5746e084f291a7904
-
- Aug 08, 2018
-
-
Nick Kralevich authored
Text relocation support was removed from the linker for apps targeting API >= 23. See https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#text-relocations-enforced-for-api-level-23 However, the security policy was not updated to remove the execmod permission at that time, since we didn't have support for targeting SELinux policies to API versions. Remove execmod permissions for apps targeting API 26 or greater. The linker support was removed, so it's pointless to keep around the SELinux permissions. Retain execmod support for apps targeting API 25 or lower. While in theory we could remove support for API 23-25, that would involve the introduction of a new SELinux domain (and the associated rule explosion), which I would prefer to avoid. This change helps protect application executable code from modification, enforcing W^X properties on executable code pages loaded from files. https://en.wikipedia.org/wiki/W%5EX Test: auditallow rules were added and nothing triggered for apps targeting API >= 26. Code compiles and device boots. Bug: 111544476 Change-Id: Iab9a0bd297411e99699e3651c110e57eb02a3a41
-
- Aug 07, 2018
-
-
Tri Vo authored
/vendor/bin/bcc being a dependency of renderscript should be labeled as same_process_hal_file. To facilitate that we relax neverallow rules for executing same_process_hal_file from coredomain. See details on /vendor/bin/bcc: https://source.android.com/devices/architecture/vndk/renderscript Bug: n/a Test: build-time change Change-Id: Ie996fb863090bf08b3d3ef653da827d0b22937d7
-
Nick Kralevich authored
Kernels above 4.14 have a new mmap permission. However, neverallow rules exclude the use of mmap, even when file FDs are passable across the vendor/non-vendor boundary. Since we allow reading / writing of passed file descriptors, also allow the use of mmap for passed file descriptors. Bug: 112171217 Test: policy compiles Change-Id: I8176f86960bdff0cf5de770809510e9df5d62db9
-
Nick Kralevich authored
This reverts commit 0f11ffcc. Reason for revert: libmono crashes Bug: 112292089 Bug: 111544476 Test: policy compiles, device boots Change-Id: I064090aa9337cf17b80cd2c9af9342df851a3b27
-
- Aug 02, 2018
-
-
Nick Kralevich authored
Currently, both untrusted apps and priv-apps use the SELinux file label "app_data_file" for files in their /data/data directory. This is problematic, as we really want different rules for such files. For example, we may want to allow untrusted apps to load executable code from priv-app directories, but disallow untrusted apps from loading executable code from their own home directories. This change adds a new file type "privapp_data_file". For compatibility, we adjust the policy to support access privapp_data_files almost everywhere we were previously granting access to app_data_files (adbd and run-as being exceptions). Additional future tightening is possible here by removing some of these newly added rules. This label will start getting used in a followup change to system/sepolicy/private/seapp_contexts, similar to: -user=_app isPrivApp=true domain=priv_app type=app_data_file levelFrom=user +user=_app isPrivApp=true domain=priv_app type=privapp_data_file levelFrom=user For now, this newly introduced label has no usage, so this change is essentially a no-op. Test: Factory reset and boot - no problems on fresh install. Test: Upgrade to new version and test. No compatibility problems on filesystem upgrade. Change-Id: I9618b7d91d1c2bcb5837cdabc949f0cf741a2837
-
Alan Stokes authored
Remove the exemptions for untrusted apps and broaden the neverallow so they can't be reinstated. Modifying executable pages is unsafe. Text relocations are not supported. Bug: 111544476 Test: Builds. Change-Id: Ibff4f34d916e000203e38574bb063513e4428bb7
-
- Jul 25, 2018
-
-
Bowgo Tsai authored
vold will trim rw mount points about daily, but it is denied by SELinux: root 603 603 W Binder:603_2: type=1400 audit(0.0:11): avc: denied { search } for name="vendor" dev="tmpfs" ino=23935 scontext=u:r:vold:s0 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 Allowing vold to search /mnt/vendor/* to fix the denials. Note that device-specific sepolicy needs to be extended to allow vold to send FITRIM ioctl. e.g., for /mnt/vendor/persist, it needs: allow vold persist_file:dir { ioctl open read }; Bug: 111409607 Test: boot a device, checks the above denial is gone Change-Id: Ia9f22d973e5a2e295678781de49a0f61fccd9dad
-
- Jul 17, 2018
-
-
Yifan Hong authored
Test: perfprofd tests Bug: 110890430 Change-Id: I0f7476d76b8d35b6b48fe6b77544ca8ccc71534d
-
- Jul 12, 2018
-
-
Yifan Hong authored
It doesn't need to read batteryinfo to function properly. Bug: 110891415 Test: builds and boots Change-Id: I7f388180a25101bfd0c088291ef03a9bf8ba2b2c
-
Yifan Hong authored
... but should do it via health HAL and healthd. Bug: 110891415 Test: builds Change-Id: Ib124f82d31f1dfbe99a56475dba04a37f81bdca3
-
- Jun 29, 2018
-
-
Bowgo Tsai authored
Bug: 110808288 Test: device boots with /mnt/product present and selinux label mnt_product_file applied correctly. Change-Id: I596e4b79285fe1a79d31ad1b07f4bcffe6a6cd98
-
- Jun 22, 2018
-
-
Jeff Vander Stoep authored
Grant access to icmp_socket to netdomain. This was previously labeled as rawip_socket which apps are allowed to use. Neverallow all other new socket types for apps. Kernels versions > 4.9 redefine ICMP sockets from rawip_socket to icmp_socket. To pass neverallow tests, we need to define which IOCTLs are allowed (and disallowed). Note that this does not change behavior on devices with kernel versions <=4.9. However, it is necessary (although not sufficient) to pass CTS on kernel version 4.14. Bug: 110520616 Test: Grant icmp_socket in net.te and build. Change-Id: I5c7cb6867d1a4cd1554a8da0d55daa8e06daf803
-
- Jun 14, 2018
-
-
John Stultz authored
For 4.14+ kernels, we need map permissions for vendor_config_files, for things like kernel loaded firmware blobs, etc. Change-Id: I8144c50b0239aedf4124569003187cc50c963080 Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- Jun 13, 2018
-
-
padarshr authored
Legacy hardware and code still depends on the ueventd helpers to locate the firmware supported files which are on new mount path labeled with mnt_vendot_file. For ueventd helper to work we need dir search and read permission on this new label so moving ueventd to exempted list. Already ueventd has the vendor_file_type read access. Bug:110083808 Change-Id: Ia15cc39ecef9e29b4f1f684efdddbeb78b427988
-
- May 30, 2018
-
-
Steven Moreland authored
(breaks vendor blobs, will have to be regenerated after this CL) This moves mediacodec to vendor so it is replaced with hal_omx_server. The main benefit of this is that someone can create their own implementation of mediacodec without having to alter the one in the tree. mediacodec is still seccomp enforced by CTS tests. Fixes: 36375899 Test: (sanity) YouTube Test: (sanity) camera pics + video Test: check for denials Change-Id: I31f91b7ad6cd0a891a1681ff3b9af82ab400ce5e
-
- May 29, 2018
-
-
Jeff Vander Stoep authored
In particular, add assertions limiting which processes may directly open files owned by apps. Reduce this to just apps, init, and installd. App data is protected by a combination of selinux permissions and Unix permissions, so limiting the open permission to just apps (which are not allowed to have CAP_DAC_OVERRIDE or CAP_DAC_READ_SEARCH) ensures that only installd and init have complete access an app's private directory. In addition to apps/init/installd, other processes currently granted open are mediaserver, uncrypt, and vold. Uncrypt's access appears to be deprecated (b/80299612). Uncrypt now uses /data/ota_package instead. b/80418809 and b/80300620 track removal for vold and mediaserver. Test: build/boot aosp_taimen-userdebug. Verify no "granted" audit messages in the logs. Bug: 80190017 Bug: 80300620 Bug: 80418809 Fixes: 80299612 Change-Id: I153bc7b62294b36ccd596254a5976dd887fed046
-
- May 16, 2018
-
-
Andreas Huber authored
shipping API version: For devices shipped on O-MR1 nothing changes, data is stored under /data/system/users/<user-id>/fpdata/... Devices shipped from now on will instead store fingerprint data under /data/vendor_de/<user-id>/fpdata. Support for /data/vendor_de and /data/vendor_ce has been added to vold. Bug: 36997597 Change-Id: Ibc7cc33b756f64abe68a749c0ada0ca4f6d92514 Merged-In: Ibc7cc33b756f64abe68a749c0ada0ca4f6d92514 Test: manually (cherry picked from commit 6116daa7)
-
Yongqin Liu authored
to workaround some VTS VtsKernelLtp failures introduced by change on vfs_iter_write here: https://android.googlesource.com/kernel/hikey-linaro/+/abbb65899aecfc97bda64b6816d1e501754cfe1f%5E%21/#F3 for discussion please check threads here: https://www.mail-archive.com/seandroid-list@tycho.nsa.gov/msg03348.html Sandeep suggest to re-order the events in that thread, that should be the right solution, this change is only a tempory workaround before that change. Bug: 79528964 Test: manually with -m VtsKernelLtp -t VtsKernelLtp#fs.fs_fill_64bit Change-Id: I3f46ff874d3dbcc556cfbeb27be21878574877d1 Signed-off-by:
Yongqin Liu <yongqin.liu@linaro.org> (cherry picked from commit 64ff9e95) Merged-In: I3f46ff874d3dbcc556cfbeb27be21878574877d1
-