- Oct 29, 2013
-
-
Nick Kralevich authored
-
- Oct 28, 2013
-
-
Nick Kralevich authored
-
Nick Kralevich authored
In 9af6f1bd, the -d option was dropped from insertkeys.py. This was done to allow an Android distribution to replace the default version of keys.conf distributed in external/sepolicy/keys.conf. keys.conf was modified to reference the publicly known test keys in build/target/product/security. Unfortunately, this broke Google's build of Android. Instead of incorporating our keys directory, we were using the default AOSP keys. As a result, apps were getting assigned to the wrong SELinux domain. (see "Steps to reproduce" below) This change continues to allow others to replace keys.conf, but makes DEFAULT_SYSTEM_DEV_CERTIFICATE available as an environment variable in case the customized version wants to make reference to it. This change also modifies the stock version of keys.conf to use DEFAULT_SYSTEM_DEV_CERTIFICATE, which should be appropriate for most Android distributions. It doesn't make any sense to force each OEM to have a copy of this file. Steps to reproduce. 1) Compile and boot Android. 2) Run the following command: "adb shell ps -Z | grep process.media" Expected: $ adb shell ps -Z | grep process.media u:r:media_app:s0 u0_a5 1332 202 android.process.media Actual: $ adb shell ps -Z | grep process.media u:r:untrusted_app:s0 u0_a5 3617 187 android.process.media Bug: 11327304 Change-Id: Ica24fb25c5f9c0e2f4d181718c757cf372467822
-
- Oct 25, 2013
-
-
Nick Kralevich authored
Change-Id: Ieda312d5607dd17af0bb70045fbaba8ddec38c94
-
- Oct 23, 2013
-
-
Stephen Smalley authored
Confine the mediaserver domain, restoring our rules for it, but leave it permissive until sufficient testing has been performed. Change-Id: I3d10ee16f5125b11295bc40ff6f2e14080b4bd00 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Nick Kralevich authored
Otherwise the following denials occur on mako: <5>[ 2.494246] type=1400 audit(1382544550.200:4): avc: denied { associate } for pid=1 comm="init" name="time_in_state" dev="sysfs" ino=17444 scontext=u:object_r:sy sfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem <5>[ 2.494735] type=1400 audit(1382544550.200:5): avc: denied { associate } for pid=1 comm="init" name="total_trans" dev="sysfs" ino=17443 scontext=u:object_r:sysf s_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem <5>[ 2.495162] type=1400 audit(1382544550.200:6): avc: denied { associate } for pid=1 comm="init" name="stats" dev="sysfs" ino=17442 scontext=u:object_r:sysfs_devi ces_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem <5>[ 2.495620] type=1400 audit(1382544550.200:7): avc: denied { associate } for pid=1 comm="init" name="scaling_governor" dev="sysfs" ino=17435 scontext=u:object_r :sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem <5>[ 2.496047] type=1400 audit(1382544550.200:8): avc: denied { associate } for pid=1 comm="init" name="cpuinfo_transition_latency" dev="sysfs" ino=17429 scontext= u:object_r:sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem <5>[ 2.496505] type=1400 audit(1382544550.200:9): avc: denied { associate } for pid=1 comm="init" name="scaling_available_frequencies" dev="sysfs" ino=17439 sconte xt=u:object_r:sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem <5>[ 2.496963] type=1400 audit(1382544550.200:10): avc: denied { associate } for pid=1 comm="init" name="scaling_driver" dev="sysfs" ino=17436 scontext=u:object_r: sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem Change-Id: I584a1cf61cb871a38be4d3b308cef03e64cfda8e
-
Stephen Smalley authored
As has already been done for untrusted_app, isolated_app, and bluetooth, make all the other domains used for app processes confined while making them permissive until sufficient testing has been done. Change-Id: If55fe7af196636c49d10fc18be2f44669e2626c5 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Oct 22, 2013
-
-
Stephen Smalley authored
Remove unconfined_domain() from the bluetooth app domain, restore the rules from our policy, and move the neverallow rule for bluetooth capabilities to bluetooth.te. Make the bluetooth domain permissive again until it has received sufficient testing. Change-Id: I3b3072d76e053eefd3d0e883a4fdb7c333bbfc09 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Oct 21, 2013
-
-
Nick Kralevich authored
-
Nick Kralevich authored
In https://android-review.googlesource.com/66562 , there was a discussion about the role the unconfined template plays. Document the unconfined template so that those expectations are better understood. Change-Id: I20ac01ac2d4496b8425b6f63d4106e8021bc9b2f
-
Nick Kralevich authored
This change removes the permissive line from unconfined domains. Unconfined domains can do (mostly) anything, so moving these domains into enforcing should be a no-op. The following domains were deliberately NOT changed: 1) kernel 2) init In the future, this gives us the ability to tighten up the rules in unconfined, and have those tightened rules actually work. When we're ready to tighten up the rules for these domains, we can: 1) Remove unconfined_domain and re-add the permissive line. 2) Submit the domain in permissive but NOT unconfined. 3) Remove the permissive line 4) Wait a few days and submit the no-permissive change. For instance, if we were ready to do this for adb, we'd identify a list of possible rules which allow adbd to work, re-add the permissive line, and then upload those changes to AOSP. After sufficient testing, we'd then move adb to enforcing. We'd repeat this for each domain until everything is enforcing and out of unconfined. Change-Id: If674190de3262969322fb2e93d9a0e734f8b9245
-
- Oct 16, 2013
-
-
William Roberts authored
Change-Id: If4839218b200a0d90bdf7779d2e039719fae85a5
-
William Roberts authored
Modify check_seapp.c to verify that a packagname (name) must be specified with a signing key (seinfo). This will help thwart spoof attacks on the packagename. Change-Id: I8f1aa8a479cb5beb5c3522d85e3181604931ea72
-
- Oct 15, 2013
-
-
William Roberts authored
check_seapp at one point in time switch from a home implementation of a hash table to using GLIBC search.h routines. A struct in one of the fields was never removed during this transition. Change-Id: I65c028103ffe90fa52e0b3c9fce28124ed9c7ff9
-
- Oct 14, 2013
-
-
William Roberts authored
insertkeys.py used beginswith() when checking that the BEGIN and END CERTIFICATE clauses in PEM files were correct. It should have done an explicit check on equality. Change-Id: I5efb48d180bc674e6281a26a955acd248588b8bd
-
- Oct 10, 2013
-
-
Mike Palmiotto authored
Many keys end with whitespace or otherwise have whitespace separating the certificates. If insertkeys is intended to support multiple certificates, we should also support blank line separators. Change-Id: I5fd17be5785ad1b89a6191e9ba33bbc7c5a4e8e9
-
Nick Kralevich authored
Apps may need to access the USB Accessory interface, which involves reads / writes / etc to /dev/usb_accessory and /dev/bus/usb/* See http://developer.android.com/guide/topics/connectivity/usb/accessory.html for more information. This addresses the following denials: [ 80.075727] type=1400 audit(1379351306.384:9): avc: denied { read write } for pid=496 comm="Binder_1" path="/dev/usb_accessory" dev=tmpfs ino=5320 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usbaccessory_device:s0 tclass=chr_file [ 86.204387] type=1400 audit(1379304688.579:10): avc: denied { getattr } for pid=1750 comm="Thread-126" path="/dev/usb_accessory" dev=tmpfs ino=5320 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usbaccessory_device:s0 tclass=chr_file [ 2773.581032] type=1400 audit(1379307375.959:22): avc: denied { read write } for pid=761 comm="Binder_A" path="/dev/bus/usb/002/002" dev=tmpfs ino=12862 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usb_device:s0 tclass=chr_file [ 2773.590843] type=1400 audit(1379307375.969:23): avc: denied { getattr } for pid=5481 comm="android.app" path="/dev/bus/usb/002/002" dev=tmpfs ino=12862 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usb_device:s0 tclass=chr_file [ 2773.591111] type=1400 audit(1379307375.969:24): avc: denied { ioctl } for pid=5481 comm="android.app" path="/dev/bus/usb/002/002" dev=tmpfs ino=12862 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usb_device:s0 tclass=chr_file Bug: 10780497 Change-Id: I9663222f7a75dcbf3c42788a5b8eac45e69e00bb
-
- Oct 09, 2013
-
-
Nick Kralevich authored
-
- Oct 08, 2013
-
-
William Roberts authored
Insert keys would erroneously process pem files with openssl headers in them. Also, the tool would be fooled into attempting to use pem files that had private keys and other things in the format. This patch strengthens the formatting requirements and increases the verboseness of error messages when processing pem files. Change-Id: I03353faaa641233a000d1a18943024ae47c63e0f
-
William Roberts authored
* Keep ueventd in permissive * Drop unconfined macro to collect logs * Restore allow rules to current NSA maintained policy Change-Id: Ic4ee8e24ccd8887fed151ae1e4f197512849f57b
-
- Oct 03, 2013
-
-
William Roberts authored
Change-Id: Ie0ee266e9e6facb2ab2abd652f68765239a41af1
-
Alex Klyubin authored
/dev/hw_random is accessed only by init and by EntropyMixer (which runs inside system_server). Other domains are denied access because apps/services should be obtaining randomness from the Linux RNG. Change-Id: Ifde851004301ffd41b2189151a64a0c5989c630f
-
Nick Kralevich authored
-
Nick Kralevich authored
-
- Oct 01, 2013
-
-
Stephen Smalley authored
The /adb_keys entry will only take effect if a restorecon is applied by init.rc on a kernel that includes the rootfs labeling support, but does no harm otherwise. The /data/misc/adb labeling ensures correct labeling of the adb_keys file created if the device has ro.adb.secure=1 set. Allow adbd to read the file. Change-Id: I97b3d86a69681330bba549491a2fb39df6cf20ef Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 30, 2013
-
-
Stephen Smalley authored
Change I4be1c987a5d69ac784a56d42fc2c9063c402de11 removed all netdomain allow rules at the same time domains were made unconfined. Prior to that change, any domain that used the net_domain() macro would be granted permissions required to use the network via these rules. The change made the netdomain attribute unused in any rules, thereby rendering the net_domain() calls pointless and requiring the allow rules to be duplicated for any domain requiring network access. There are two ways to resolve this inconsistency: 1. Restore the netdomain rules as in this change. In that case, some rules in app.te can be removed as they are redundant with these rules. -or- 2. Completely remove the netdomain attribute, the net_domain() macro, and all calls to it. In that case, each domain that requires network access will need to duplicate these rules or the necessary subset in order to function. Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov> Change-Id: Ia54f0cd0bbda5c510423b1046626bd50f79ed7b6
-
Stephen Smalley authored
Shell domain can transition to other domains for runas, ping, etc. Change-Id: If9aabb4f51346dc00a89d03efea25499505f278d Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 28, 2013
-
-
Nick Kralevich authored
-
- Sep 27, 2013
-
-
Nick Kralevich authored
-
Geremy Condra authored
-
Stephen Smalley authored
This change synchronizes the AOSP set of neverallow rules for app domains with our own. However, as we exclude unconfineddomain from each neverallow rule, it causes no breakage in the AOSP policy. As app domains are confined, you will need to either adjust the app domain or the neverallow rule according to your preference. But our policy builds with all of these applied with all app domains confined. Change-Id: I00163d46a6ca3a87e3d742d90866300f889a0b11 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Stephen Smalley authored
Otherwise it defaults to the label of /data/system and cannot be distinguished from any other socket in that directory. Also adds allow rule required for pre-existing wpa_socket transition to function without unconfined_domain. Change-Id: I57179aa18786bd56d247f397347e546cca978e41 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Geremy Condra authored
-
Stephen Smalley authored
Some file types used as domain entrypoints were missing the exec_type attribute. Add it and add a neverallow rule to keep it that way. Change-Id: I7563f3e03940a27ae40ed4d6bb74181c26148849 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Stephen Smalley authored
Change-Id I027f76cff6df90e9909711cb81fbd17db95233c1 added a /data/local/tmp/selinux entry at the same time domains were made permissive. I do not know why, and do not see how this is used. So remove it. Change-Id: I3218cc18de9781bc65ae403f2cf4c234847ef5f5 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Stephen Smalley authored
Add a create_pty() macro that allows a domain to create and use its own ptys, isolated from the ptys of any other domain, and use that macro for untrusted_app. This permits the use of a pty by apps without opening up access to ptys created by any other domain on the system. Change-Id: I5d96ce4d1b26073d828e13eb71c48d1e14ce7d6b Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 26, 2013
-
-
Stephen Smalley authored
These device nodes were specific to crespo / Nexus S and if ever needed again, should be re-introduced in the per-device sepolicy, not here. Change-Id: I8366de83967974122c33937f470d586d49c34652 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 23, 2013
-
-
Nick Kralevich authored
per the discussion in https://android-review.googlesource.com/#/c/65063/1/zygote.te adjust the comment in this file. Change-Id: I8db31e22ec34493442bc8e86bcd0bc0136b7bae4
-
Nick Kralevich authored
This was a mistaken attempt to fix bug 10498304, but it didn't actually have any impact. Revert. This reverts commit fc2bd01b. Bug: 10498304
-
- Sep 20, 2013
-
-
Stephen Smalley authored
This is now possible due to the kernel change to support setting security contexts on rootfs inodes. Change-Id: I2a9aac1508eceabb92c3ae8eb5c63a16b28dda6f Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-