- Jan 16, 2020
-
-
Changyeon Jo authored
Bug: 128345139 Test: make selinux_policy Change-Id: I477d6d94c16974f23f703d5f334ef108279ab3bb Signed-off-by:
Changyeon Jo <changyeon@google.com> (cherry picked from commit cfeaa1c664afbd10c7a52e845ec4c08c9eabb525)
-
- 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
-
- Jun 26, 2018
-
-
Luis Hector Chavez authored
This change makes it such that only init can start adbd directly. It also introduces new rules for ctl.{start,stop,restart} properties such that only usbd and recovery (and su, since it's permissive) can directly ask init to start adbd. Bug: 64720460 Test: adbd still runs Test: /data/nativetest64/adbd_test/adbd_test Test: python system/core/adb/test_adb.py Test: "USB debugging" in System Settings still start/stop adbd Test: Recovery menu still make the device show as "recovery" in adb devices Test: "Apply update from ADB" in recovery menu still works Change-Id: Iafcda8aa44e85129afcc958036b472d856fa1192
- Aug 28, 2017
-
-
Bowgo Tsai authored
Bug: 63910933 Test: boot sailfish in normal mode, checks adbd is started Test: boot sailfish in recovery mode, checks adbd is started Test: boot bullhead in normal mode, checks adbd is started Test: boot bullhead in recovery mode, checks adbd is started Change-Id: I35ed78a15a34626fbd3c21d030e2bf51033f7b79 Merged-In: I35ed78a15a34626fbd3c21d030e2bf51033f7b79 (cherry picked from commit e2423d14)
-
- Aug 16, 2017
-
-
Bowgo Tsai authored
Bug: 63910933 Test: boot sailfish in normal mode, checks adbd is started Test: boot sailfish in recovery mode, checks adbd is started Test: boot bullhead in normal mode, checks adbd is started Test: boot bullhead in recovery mode, checks adbd is started Change-Id: I35ed78a15a34626fbd3c21d030e2bf51033f7b79
-
- Feb 07, 2017
-
-
Alex Klyubin authored
This leaves only the existence of adbd domain as public API. All other rules are implementation details of this domain's policy and are thus now private. Test: No change to policy according to sesearch, except for disappearance of all allow rules to do with adbd_current except those created by other domains' allow rules referencing adbd domain from public and vendor policies. Bug: 31364497 Change-Id: Icdce8b89f67c70c6c4c116471aaa412e55028cd8
-
- Feb 06, 2017
-
-
Chad Brubaker authored
The rules for the two types were the same and /data/app-ephemeral is being removed. Remove these types. Test: Builds Change-Id: I520c026395551ad1362dd2ced53c601d9e6f9b28
-
- Jan 20, 2017
-
-
Nick Kralevich authored
As of https://android-review.googlesource.com/324092, ephemeral_app is now an appdomain, so places where both appdomain and ephemeral_app are granted the same set of rules can be deleted. Test: policy compiles. Change-Id: Ideee710ea47af7303e5eb3af1331653afa698415
-
- Jan 18, 2017
-
-
Josh Gao authored
Replace the global debuggerd with a per-process debugging helper that gets exec'ed by the process that crashed. Bug: http://b/30705528 Test: crasher/crasher64, `debuggerd <pid>`, `kill -ABRT <pid>` Change-Id: Iad1b7478f7a4e2690720db4b066417d8b66834ed
-
- Jan 11, 2017
-
-
Josh Gao authored
Bug: http://b/34228376 Test: m Change-Id: I1321ada1521bb3e3fd08105f1a41d519ee486683
-
- Dec 22, 2016
-
-
Alex Klyubin authored
This restricts access to ro.serialno and ro.boot.serialno, the two system properties which contain the device's serial number, to a select few SELinux domains which need the access. In particular, this removes access to these properties from Android apps. Apps can access the serial number via the public android.os.Build API. System properties are not public API for apps. The reason for the restriction is that serial number is a globally unique identifier which cannot be reset by the user. Thus, it can be used as a super-cookie by apps. Apps need to wean themselves off of identifiers not resettable by the user. Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome Test: Access the device via ADB (ADBD exposes serial number) Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo Bug: 31402365 Bug: 33700679 Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
-
- Oct 07, 2016
-
-
Chad Brubaker authored
Test: Builds and boots Change-Id: I3db64e12f0390c6940f5745eae83ce7efa7d65a9
-
- Oct 06, 2016
-
-
dcashman authored
Divide policy into public and private components. This is the first step in splitting the policy creation for platform and non-platform policies. The policy in the public directory will be exported for use in non-platform policy creation. Backwards compatibility with it will be achieved by converting the exported policy into attribute-based policy when included as part of the non-platform policy and a mapping file will be maintained to be included with the platform policy that maps exported attributes of previous versions to the current platform version. Eventually we would like to create a clear interface between the platform and non-platform device components so that the exported policy, and the need for attributes is minimal. For now, almost all types and avrules are left in public. Test: Tested by building policy and running on device. Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
-
- Jul 20, 2016
-
-
Jeff Vander Stoep authored
(cherry picked from commit d743ddea) avc: denied { search } for comm=73657276696365203139 name="app" dev="sda35" ino=770049 scontext=u:r:adbd:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=0 Bug: 30000600 Change-Id: I86958ebcca815ee1779f85fb425592493f40101a
-
- Jul 19, 2016
-
-
Jeff Vander Stoep authored
avc: denied { search } for comm=73657276696365203139 name="app" dev="sda35" ino=770049 scontext=u:r:adbd:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir permissive=0 Bug: 30000600 Change-Id: I86958ebcca815ee1779f85fb425592493f40101a
-
Jeff Vander Stoep authored
Bug: 30213958 Change-Id: I0449575a5ec6cc4997bc36a13676474505a4190f
-
- Jun 01, 2016
-
-
David Sehr authored
Bug: 28748264 Change-Id: I872c25666707beb737f3ce7a4f706c0135df7ad5
-
- Apr 13, 2016
-
-
Nick Kralevich authored
Allow adbd and app domains to read the symlink at /mnt/sdcard. This symlink was suppose to have been removed in the Gingerbread time frame, but lives on. Read access for this symlink was removed from adbd and the shell user in 8ca19368, and from untrusted_app in cbf7ba18. Addresses the following denials: avc: denied { read } for name="sdcard" dev="tmpfs" ino=9486 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0 avc: denied { read } for pid=4161 comm=73657276696365203137 name="sdcard" dev="tmpfs" ino=5114 scontext=u:r:adbd:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0 Bug: 25801877 Bug: 28108983 Change-Id: Ia31cd8b53c9c3a5b7d11be42c2fde170f96affb0
-
- Apr 07, 2016
-
-
Nick Kralevich authored
Make sure adbd can't transition to other non-shell domains, and in particular, can't transition to the su user on user builds. Bug: 27270128 Change-Id: I67dc974da460d63879f5ff3e1258af8eb790a815
-
- Mar 31, 2016
-
-
Daniel Rosenberg authored
With sdcardfs, we no longer have a separate sdcardd acting as an intermediate between the outside world and /data/media. Unless we modify sdcardfs to change contexts, we need these. Added for: adbd, kernel, mediaserver, and shell Remove this patch if sdcardfs is updated to change the secontext of fs accesses. Bug: 27915475 Bug: 27937873 Change-Id: I25edcfc7fb8423b3184db84040bda790a1042724
-
Daniel Rosenberg authored
With sdcardfs, we no longer have a separate sdcardd acting as an intermediate between the outside world and /data/media. Unless we modify sdcardfs to change contexts, we need these. Remove this patch if sdcardfs is updated to change the secontext of fs accesses. Bug: 27925072 Change-Id: I3ad37c0f12836249c83042bdc1111b6360f22b3c
-
- Jan 19, 2016
-
-
Rubin Xu authored
They are introduced for the device owner process logging feature. That is, for enterprise-owned devices with device owner app provisioned, the device owner may choose to turn on additional device-wide logging for auditing and intrusion detection purposes. Logging includes histories of app process startup, commands issued over ADB and lockscreen unlocking attempts. These logs will available to the device owner for analysis, potentially shipped to a remote server if it chooses to. ro.device_owner will be a master switch to turn off logging, if the device has no device owner provisioned. persist.logd.security is a switch that device owner can toggle (via DevicePoliyManager) to enable/disable logging. Writing to both properties should be only allowed by the system server. Bug: 22860162 Change-Id: Iabfe2347b094914813b9d6e0c808877c25ccd038
-
- Jan 15, 2016
-
-
Nick Kralevich authored
auditallow says never used. Change-Id: I6a3f82740bfecf483e0ccbb528b7218af36d37b8
-
- Jan 13, 2016
-
-
dcashman authored
Address the following denial when running CTS: avc: denied { search } for comm=73657276696365203136 name="/" dev="selinuxfs" ino=1 scontext=u:r:adbd:s0 tcontext=u:object_r:selinuxfs:s0 tclass=dir permissive=0 Bug: 26290097 Change-Id: Icf51061a65a5fda15f7e7ef78200a62ffbd1ca9b
-
- Dec 08, 2015
-
-
Nick Kralevich authored
Even though /dev/ion can allocate memory when opened in read-only mode, some processes seem to unnecessarily open it in read-write mode. This doesn't seem to be harmful, and was originally allowed in domain_deprecated. Re-allow it. Bug: 25965160 Change-Id: Icaf948be89a8f2805e9b6a22633fa05b69988e4f
-
- Dec 07, 2015
-
-
Nick Kralevich authored
The removal of domain_deprecated broke ddms screen capturing functionality. Steps to reproduce: 1) Run "ddms" 2) Select your device 3) Go to the Device > Screen Capture menu 4) Attempt to take a screenshot Addresses the following denials: avc: denied { read } for pid=2728 comm="screencap" name="ion" dev="tmpfs" ino=7255 scontext=u:r:adbd:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1 avc: denied { open } for pid=2728 comm="screencap" name="ion" dev="tmpfs" ino=7255 scontext=u:r:adbd:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1 avc: denied { ioctl } for pid=2728 comm="screencap" path="/dev/ion" dev="tmpfs" ino=7255 ioctlcmd=4905 scontext=u:r:adbd:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1 avc: denied { read } for pid=5261 comm="screencap" name="egl" dev="dm-1" ino=210 scontext=u:r:adbd:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0 avc: denied { read } for pid=5261 comm="screencap" name="egl" dev="dm-1" ino=210 scontext=u:r:adbd:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0 Bug: 26023462 Change-Id: Ie77c65900de56756d5c9b99dcda1e20664151ed2
-
Nick Kralevich authored
The removal of domain_deprecated broke the ability for adbd to pull files from /sdcard. Re-allow it. Addresses the following denials: avc: denied { search } for pid=2753 comm=73657276696365203530 name="/" dev="tmpfs" ino=6242 scontext=u:r:adbd:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=0 avc: denied { getattr } for pid=2755 comm=73657276696365203431 path="/sdcard" dev="rootfs" ino=5472 scontext=u:r:adbd:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0 Change-Id: I70257933f554abd008932c7f122dd0151f464b05
-
- Nov 28, 2015
-
-
Nick Kralevich authored
The extra permissions are not needed. Delete them. This change also adds read permission for /data/misc/zoneinfo back to all domains. libc refernces this directory for timezone related files, and it feels dangerous and of little value to try to restrict access. In particular, this causes problems when the shell user attempts to run "ls -la" to show file time stamps in the correct timezone. Bug: 25433265 Change-Id: I666bb460e440515151e3bf46fe2e0ac0e7c99f46
-
- Nov 25, 2015
-
-
Jeff Vander Stoep authored
Change-Id: Ia90fb531cfd99d49d179921f041dd93c7325ad50
-
- Nov 03, 2015
-
-
Jeff Vander Stoep authored
Motivation: Domain is overly permissive. Start removing permissions from domain and assign them to the domain_deprecated attribute. Domain_deprecated and domain can initially be assigned to all domains. The goal is to not assign domain_deprecated to new domains and to start removing domain_deprecated where it is not required or reassigning the appropriate permissions to the inheriting domain when necessary. Bug: 25433265 Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
-
- Sep 15, 2015
-
-
David Pursell authored
adbd needs to kill spawned subprocesses if the client terminates the connection. SIGHUP will be used for this purpose, which requires the process:signal permission. Bug: http://b/23825725 Change-Id: I36d19e14809350dd6791a8a44f01b2169effbfd4
-
- Aug 25, 2015
-
-
Stephen Smalley authored
When the toolbox domain was introduced, we allowed all domains to exec it to avoid breakage. However, only domains that were previously allowed the ability to exec /system files would have been able to do this prior to the introduction of the toolbox domain. Remove the rule from domain.te and add rules to all domains that are already allowed execute_no_trans to system_file. Requires coordination with device-specific policy changes with the same Change-Id. Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- May 07, 2015
-
-
William Roberts authored
A common source of mistakes when authoring sepolicy is properly setting up property sets. This is a 3 part step of: 1. Allowing the unix domain connection to the init/property service 2. Allowing write on the property_socket file 3. Allowing the set on class property_service The macro unix_socket_connect() handled 1 and 2, but could be confusing for first time policy authors. 3 had to be explicitly added. To correct this, we introduce a new macros: set_prop(sourcedomain, targetprop) This macro handles steps 1, 2 and 3. No difference in sediff is expected. (cherrypicked from commit 625a3526) Change-Id: I630ba0178439c935d08062892990d43a3cc1239e Signed-off-by:
William Roberts <william.c.roberts@linux.intel.com>
-
William Roberts authored
A common source of mistakes when authoring sepolicy is properly setting up property sets. This is a 3 part step of: 1. Allowing the unix domain connection to the init/property service 2. Allowing write on the property_socket file 3. Allowing the set on class property_service The macro unix_socket_connect() handled 1 and 2, but could be confusing for first time policy authors. 3 had to be explicitly added. To correct this, we introduce a new macros: set_prop(sourcedomain, targetprop) This macro handles steps 1, 2 and 3. No difference in sediff is expected. Change-Id: I630ba0178439c935d08062892990d43a3cc1239e Signed-off-by:
William Roberts <william.c.roberts@linux.intel.com>
-
- Apr 24, 2015
-
-
Nick Kralevich authored
Needed for https://android-review.googlesource.com/147730 Change-Id: Iceb87f210e4c5d0f39426cc6c96a216a4644eaa9
-
- Apr 03, 2015
-
-
Jeff Sharkey authored
avc: denied { getattr } for path="/storage/self" dev="tmpfs" ino=3129 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mnt_user_file:s0 tclass=dir permissive=0 Change-Id: I802321331e9bd7ae41d3af7ace39364240db6d84
-
Jeff Sharkey authored
Apps, shell and adbd should all have identical access to external storage. Also document where we have files and/or symlinks. Bug: 20055945 Change-Id: I133ffcf28cc3ccdb0541aba18ea3b9ba676eddbe
-
- Feb 23, 2015
-
-
Yongqin Liu authored
allow the bootchart to create dir and files at init, also allow user to create the stop and start file under /data/bootchart directory to start and stop bootchart Change-Id: Icfee8dcd17366383eef00fbe3139744bf4427a6b Signed-off-by:
Yongqin Liu <yongqin.liu@linaro.org>
-