Commit graph

1136 commits

Author SHA1 Message Date
Nick Kralevich
95cd6e09a0 Merge "Make the servicemanager domain enforcing." 2013-10-31 17:38:12 +00:00
Nick Kralevich
eee41177a1 am 30ab1f81: am 68ce74b4: Merge "readme: add info on generating pem files from apks"
* commit '30ab1f81f368528a382f2a54a2032b0394fd8a7a':
  readme: add info on generating pem files from apks
2013-10-31 10:10:22 -07:00
Nick Kralevich
30ab1f81f3 am 68ce74b4: Merge "readme: add info on generating pem files from apks"
* commit '68ce74b4e7d2818a53c6e36cc289b6c5b02653a7':
  readme: add info on generating pem files from apks
2013-10-31 10:07:45 -07:00
Nick Kralevich
68ce74b4e7 Merge "readme: add info on generating pem files from apks" 2013-10-31 17:04:52 +00:00
Nick Kralevich
4fd447ce52 am 57cc77ff: am cdf54ba7: Merge "Confine keystore, but leave it permissive for now."
* commit '57cc77ffca620d6993447c777f844f57c86d4394':
  Confine keystore, but leave it permissive for now.
2013-10-31 09:33:05 -07:00
Nick Kralevich
57cc77ffca am cdf54ba7: Merge "Confine keystore, but leave it permissive for now."
* commit 'cdf54ba7f8846aac62350ee47867ddc85d9e64d1':
  Confine keystore, but leave it permissive for now.
2013-10-31 09:30:23 -07:00
Nick Kralevich
cdf54ba7f8 Merge "Confine keystore, but leave it permissive for now." 2013-10-31 16:27:53 +00:00
Stephen Smalley
0fb137487f am 5298a4f6: am b3c48b66: Change the type on /dev/uinput to match /dev/uhid.
* commit '5298a4f6108695d44498c65f4af0c8eb15f40847':
  Change the type on /dev/uinput to match /dev/uhid.
2013-10-31 08:29:26 -07:00
Stephen Smalley
5298a4f610 am b3c48b66: Change the type on /dev/uinput to match /dev/uhid.
* commit 'b3c48b66bcc9dad62a461fdc3595a70c07ff8fd3':
  Change the type on /dev/uinput to match /dev/uhid.
2013-10-31 08:27:52 -07:00
Stephen Smalley
b3c48b66bc Change the type on /dev/uinput to match /dev/uhid.
/dev/uinput is accessed in the same way as /dev/uhid,
and unlike /dev/input/*.  bluetooth requires access to
the former and not to the latter, while shell requires access
to the latter and not the former.  This is also consistent
with their DAC group ownerships (net_bt_stack for /dev/uinput
and /dev/uhid vs input for /dev/input/*).

Change-Id: I0059d832a7fe036ed888c91e1fb96f3e6e0bd2d4
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-31 08:24:49 -07:00
Nick Kralevich
df15a0d548 am 1680ce64: am 8c302d0f: Merge "Move sysfs_devices_system_cpu to the central policy."
* commit '1680ce64e953edbc173e017805c60db4b092c799':
  Move sysfs_devices_system_cpu to the central policy.
2013-10-31 08:24:44 -07:00
Nick Kralevich
1680ce64e9 am 8c302d0f: Merge "Move sysfs_devices_system_cpu to the central policy."
* commit '8c302d0f974892d7c9a2f9aac87f20001609d315':
  Move sysfs_devices_system_cpu to the central policy.
2013-10-31 08:22:26 -07:00
Nick Kralevich
8c302d0f97 Merge "Move sysfs_devices_system_cpu to the central policy." 2013-10-31 15:17:51 +00:00
Stephen Smalley
b2b62e5bd2 Make the servicemanager domain enforcing.
Change-Id: I410ba7dc105322135463fa6f76cac75d6b65e38a
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-31 08:29:28 -04:00
Nick Kralevich
85e39f607b am 9002232a: am a59c525c: Merge "Confine servicemanager, but leave it permissive for now."
* commit '9002232adbf5fe40b87b9470e8fc7f27f6095466':
  Confine servicemanager, but leave it permissive for now.
2013-10-30 14:55:48 -07:00
Nick Kralevich
9002232adb am a59c525c: Merge "Confine servicemanager, but leave it permissive for now."
* commit 'a59c525ce828854eb95334054f535a6255fc62c2':
  Confine servicemanager, but leave it permissive for now.
2013-10-30 14:53:50 -07:00
Nick Kralevich
a59c525ce8 Merge "Confine servicemanager, but leave it permissive for now." 2013-10-30 21:51:23 +00:00
Nick Kralevich
967f39a6e8 Move sysfs_devices_system_cpu to the central policy.
Every device has a CPU. This is not device specific.

Allow every domain to read these files/directories.
For unknown reasons, these files are accessed by A LOT
of processes.

Allow ueventd to write to these files. This addresses
the following denials seen on mako:

<5>[    4.935602] type=1400 audit(1383167737.512:4): avc:  denied  { read } for  pid=140 comm="ueventd" name="cpu0" dev="sysfs" ino=3163 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=dir
<5>[    4.935785] type=1400 audit(1383167737.512:5): avc:  denied  { open } for  pid=140 comm="ueventd" name="cpu0" dev="sysfs" ino=3163 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=dir
<5>[    4.935937] type=1400 audit(1383167737.512:6): avc:  denied  { search } for  pid=140 comm="ueventd" name="cpu0" dev="sysfs" ino=3163 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=dir
<5>[    4.936120] type=1400 audit(1383167737.512:7): avc:  denied  { write } for  pid=140 comm="ueventd" name="uevent" dev="sysfs" ino=3164 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file
<5>[    4.936303] type=1400 audit(1383167737.512:8): avc:  denied  { open } for  pid=140 comm="ueventd" name="uevent" dev="sysfs" ino=3164 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file

Change-Id: I4766dc571762d8fae06aa8c26828c070b80f5936
2013-10-30 14:12:21 -07:00
William Roberts
9793a452e7 readme: add info on generating pem files from apks
Often times OEMs and other integrators will need to create PEM
files from presigned APKs they are integrating. This patch will
update the README to include a technique for doing so.

Change-Id: Ica52269542409d2038cfe30cbd5f28ead2fba4de
2013-10-30 11:48:22 -07:00
Nick Kralevich
491883030d am 968a156d: am 5b38c47b: Allow bluetooth to write to bluetooth properties
* commit '968a156d981dee060566e92415df22db13e8b3c8':
  Allow bluetooth to write to bluetooth properties
2013-10-29 14:05:26 -07:00
Nick Kralevich
968a156d98 am 5b38c47b: Allow bluetooth to write to bluetooth properties
* commit '5b38c47b7e53371f7c400cf9c0f312a1f147dce9':
  Allow bluetooth to write to bluetooth properties
2013-10-29 14:02:31 -07:00
Stephen Smalley
52a85237f7 Confine surfaceflinger, but leave it permissive for now.
Change-Id: Id6d89e7d87642fba22445484034e39f94bb90f5b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 16:19:08 -04:00
Nick Kralevich
5b38c47b7e Allow bluetooth to write to bluetooth properties
Some bluetooth implementations write to bluetooth.* properties.
It seems reasonable to allow this for all bluetooth implementations.

This addresses the following denial (seen on mako):

<4>[  132.182755] avc:  denied  { set } for property=bluetooth.hciattach scontext=u:r:bluetooth:s0 tcontext=u:object_r:bluetooth_prop:s0 tclass=property_service

Change-Id: I6d92c0ff108838dd1107c5fb3c436699ef824814
2013-10-29 12:45:10 -07:00
Stephen Smalley
1ff644112e Confine system_server, but leave it permissive for now.
Change-Id: Ia0de9d739575c34a7391db5f0be24048d89a7bd1
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:49:29 -04:00
Stephen Smalley
cfb2e99f92 Confine servicemanager, but leave it permissive for now.
Change-Id: Ib29d63b9bff0d3b1b2c152c4e4d82e21360aacc5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:48:38 -04:00
Stephen Smalley
23ceab3f9b Confine ping, but leave it permissive for now.
Change-Id: I3fda2946271456dbe0905651c5015d9eb120a8ea
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:47:44 -04:00
Stephen Smalley
cdd83f4eae Confine keystore, but leave it permissive for now.
Change-Id: Ia92165478764b062e7e33e7741742f5ec8762ad9
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:47:32 -04:00
Stephen Smalley
e14a51dd31 Confine hci_attach, but leave it permissive for now.
Change-Id: I4b6cacf70805065ad6fd9678417283c25a53b51b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:46:32 -04:00
Stephen Smalley
3b2684887e Confine drmserver, but leave it permissive for now.
Change-Id: I8f344dda3ab9766b4a72c404061f242e054129cd
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:46:08 -04:00
Stephen Smalley
258cb17abc Confine debuggerd, but leave it permissive for now.
Change-Id: I09932cdd59f9d3a38e69df9fcfc34cc9cec1d8cd
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-29 14:45:41 -04:00
William Roberts
8c8674b1a7 am f0ed17ed: am fd22922d: README: Add quip on keys.conf supporting env vars
* commit 'f0ed17edc01aa5891e77085307493ceab623afd3':
  README: Add quip on keys.conf supporting env vars
2013-10-29 11:18:02 -07:00
William Roberts
f0ed17edc0 am fd22922d: README: Add quip on keys.conf supporting env vars
* commit 'fd22922d596d6816adf2f4eee050d3cac3e9ce16':
  README: Add quip on keys.conf supporting env vars
2013-10-29 11:15:00 -07:00
William Roberts
fd22922d59 README: Add quip on keys.conf supporting env vars
Since Change-Id: If4f169d9ed4f37b6ebd062508de058f3baeafead
the insert_keys.py tool has had support for expanding
environment variable strings. This change addresses the lack
of an updated README covering said change.

Change-Id: I88e81ea58fb84110da3fc3cfb8b49fd0d6c027c2
2013-10-29 04:52:22 +00:00
Nick Kralevich
ac06091323 am 0aaacb3c: am dba93a9f: Merge "Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf"
* commit '0aaacb3c2fea875e9ba11c3e9fa4a8577125ae94':
  Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf
2013-10-28 17:12:30 -07:00
Nick Kralevich
0aaacb3c2f am dba93a9f: Merge "Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf"
* commit 'dba93a9f2e9b7b144b57e60bd20e78b38d9c23d9':
  Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf
2013-10-28 17:09:21 -07:00
Nick Kralevich
dba93a9f2e Merge "Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf" 2013-10-29 00:06:53 +00:00
Nick Kralevich
9b5dfdf94d am 75f670b2: am 067ffcc1: Merge "Confine mediaserver, but leave it permissive for now."
* commit '75f670b2090b3a3a17814c05c16b289ef3ecaea9':
  Confine mediaserver, but leave it permissive for now.
2013-10-28 14:15:44 -07:00
Nick Kralevich
8de83941ab am 0e65c20d: am 73c5ea72: fix typo
* commit '0e65c20d9aac26ee9fcdaa5ac20c8bea4275b789':
  fix typo
2013-10-28 14:15:43 -07:00
Nick Kralevich
75f670b209 am 067ffcc1: Merge "Confine mediaserver, but leave it permissive for now."
* commit '067ffcc1e10289bb56e13fa5998c50a2ae2d7992':
  Confine mediaserver, but leave it permissive for now.
2013-10-28 14:12:58 -07:00
Nick Kralevich
067ffcc1e1 Merge "Confine mediaserver, but leave it permissive for now." 2013-10-28 21:11:17 +00:00
Nick Kralevich
c3c9052bc7 Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf
In 9af6f1bd59, 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
2013-10-28 13:08:14 -07:00
Nick Kralevich
0e65c20d9a am 73c5ea72: fix typo
* commit '73c5ea722c7ee328f0d10179601afd9d5a054b94':
  fix typo
2013-10-28 08:53:52 -07:00
Nick Kralevich
73c5ea722c fix typo
Change-Id: Ieda312d5607dd17af0bb70045fbaba8ddec38c94
2013-10-25 16:53:37 -07:00
Nick Kralevich
b27b9832cc am 3a12f7b2: am c4a3b510: sysfs_devices_system_cpu should be a sysfs_type
* commit '3a12f7b2a9debe897358f6c4c88736729c48713e':
  sysfs_devices_system_cpu should be a sysfs_type
2013-10-24 12:33:35 -07:00
Stephen Smalley
3d01ba4089 am 69eda0f0: am 5637099a: Confine all app domains, but make them permissive for now.
* commit '69eda0f0488b9ecbc0853fb0d543740881f64f7d':
  Confine all app domains, but make them permissive for now.
2013-10-24 11:59:36 -07:00
Nick Kralevich
3a12f7b2a9 am c4a3b510: sysfs_devices_system_cpu should be a sysfs_type
* commit 'c4a3b51062cfc9eaf38d997b6d6609a7dcf3a3c4':
  sysfs_devices_system_cpu should be a sysfs_type
2013-10-24 11:58:39 -07:00
Stephen Smalley
69eda0f048 am 5637099a: Confine all app domains, but make them permissive for now.
* commit '5637099a252c7ef647ca22d1d1094d67f54bb916':
  Confine all app domains, but make them permissive for now.
2013-10-24 09:12:36 -07:00
Stephen Smalley
af9238c9b8 Confine mediaserver, but leave it permissive for now.
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>
2013-10-23 14:23:43 -04:00
Nick Kralevich
c4a3b51062 sysfs_devices_system_cpu should be a sysfs_type
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
2013-10-23 10:42:58 -07:00
Stephen Smalley
d29f0ddb42 am 77828e1e: am d7fd22e6: Confine bluetooth app.
* commit '77828e1e80651dc5c27004f8cfc936047548a682':
  Confine bluetooth app.
2013-10-23 10:20:04 -07:00