Commit graph

3277 commits

Author SHA1 Message Date
Alex Light
58112b47e1 am fbc8ec2e: Make system use patchoat to relocate during runtime.
* commit 'fbc8ec2eacaff635a51b0334ea43ddaaa65655ea':
  Make system use patchoat to relocate during runtime.
2014-08-05 21:00:08 +00:00
Alex Light
fbc8ec2eac Make system use patchoat to relocate during runtime.
Add patchoat selinux rules.

Bug: 15358152

Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
2014-08-05 10:22:09 -07:00
dcashman
5a6ac67476 am 3fe1bcbb: Merge "Generate selinux_policy.xml as part of CTS build."
* commit '3fe1bcbb8d2f2e17e7506d7fb0302068c9ccc915':
  Generate selinux_policy.xml as part of CTS build.
2014-08-04 20:24:23 +00:00
dcashman
3fe1bcbb8d Merge "Generate selinux_policy.xml as part of CTS build." 2014-08-01 08:22:51 +00:00
Stephen Smalley
5cf581ce6b am d990a78f: Fix neverallow rules to eliminate CTS SELinuxTest warnings.
* commit 'd990a78f8ef398488d6c0ce0a2d18b3d3a5183c4':
  Fix neverallow rules to eliminate CTS SELinuxTest warnings.
2014-07-30 16:44:59 +00:00
Ye Wen
1d64e089bb am 770910bb: Implement broker pattern for imms (3/3)
* commit '770910bb82997e4641d268e6fddaa1b3402523cd':
  Implement broker pattern for imms (3/3)
2014-07-30 16:40:17 +00:00
Stephen Smalley
d990a78f8e Fix neverallow rules to eliminate CTS SELinuxTest warnings.
Fix two neverallow rules that yield Invalid SELinux context
warnings from the CTS SELinuxTest.

For transitions from app domains, we only need to check
{ domain -appdomain } (i.e. domains other than app domains),
not ~appdomain (i.e. all types other than app domains).  Otherwise
SELinuxTest tries to generate contexts with the r role and
non-domain types for testing since the target class is process,
and such contexts are invalid.

For keeping file_type and fs_type exclusive, we only need to
check associate permission, not all filesystem permissions, as
only associate takes a file type as the source context.  Otherwise
SELinuxTest tries to generate contexts with the r role and
non-domain types for testing filesystem permissions other than
associate, since the source of such checks is normally a process
context.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>

(cherry picked from commit 21ada26dae)

Change-Id: I3346584da9b89f352864dcc30dde06d6bf42e98e
2014-07-30 08:58:44 -07:00
Ye Wen
770910bb82 Implement broker pattern for imms (3/3)
b/16324360

Change-Id: I4adacdb1d87badfaa109da200aae91869b9786a8
2014-07-29 16:32:28 -07:00
Stephen Smalley
3d8603389c am 21ada26d: Fix neverallow rules to eliminate CTS SELinuxTest warnings.
* commit '21ada26daea538397029396099dce865267bae2f':
  Fix neverallow rules to eliminate CTS SELinuxTest warnings.
2014-07-29 23:21:41 +00:00
Stephen Smalley
21ada26dae Fix neverallow rules to eliminate CTS SELinuxTest warnings.
Fix two neverallow rules that yield Invalid SELinux context
warnings from the CTS SELinuxTest.

For transitions from app domains, we only need to check
{ domain -appdomain } (i.e. domains other than app domains),
not ~appdomain (i.e. all types other than app domains).  Otherwise
SELinuxTest tries to generate contexts with the r role and
non-domain types for testing since the target class is process,
and such contexts are invalid.

For keeping file_type and fs_type exclusive, we only need to
check associate permission, not all filesystem permissions, as
only associate takes a file type as the source context.  Otherwise
SELinuxTest tries to generate contexts with the r role and
non-domain types for testing filesystem permissions other than
associate, since the source of such checks is normally a process
context.

Change-Id: I6c2f63f4786d75294a6938613ba14b64212fc802
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-07-29 15:02:32 -04:00
dcashman
704741a5c2 Generate selinux_policy.xml as part of CTS build.
Bug: 16563899
Bug: 14251916
Change-Id: Id3172b73f10186ba361caf6b7333e5d2a0648475
2014-07-28 17:57:22 -07:00
Sreeram Ramachandran
4a518b8bbf am 997461bd: Allow system_server to talk to netlink directly.
* commit '997461bda5aaedeabf48021e3291293e48501ef7':
  Allow system_server to talk to netlink directly.
2014-07-29 00:56:13 +00:00
Sreeram Ramachandran
997461bda5 Allow system_server to talk to netlink directly.
This is needed for http://ag/512212 to work.

Bug: 15409819
Change-Id: If91fc6891d7ce04060362c6cde8c57462394c4e8
2014-07-28 15:13:34 -07:00
Vinit Deshpande
ac37061567 am fab00f74: Add rttmanager in sepolicy\'s whitelist
* commit 'fab00f7487f58edfb65f101a97e824c6b8f179da':
  Add rttmanager in sepolicy's whitelist
2014-07-28 20:59:21 +00:00
Riley Spahn
fa617d4635 am 840e522e: Remove dumpstate from servicemanager list auditallow.
* commit '840e522e68c6036b840072c4c8941e12273521f2':
  Remove dumpstate from servicemanager list auditallow.
2014-07-28 20:45:02 +00:00
Vinit Deshpande
fab00f7487 Add rttmanager in sepolicy's whitelist
Looks like system server doesn't let you start a service without
white listing anymore.

Bug: 16628456

Change-Id: I0f6df8fd2afa24f4a1758a90cb5f8e451e0edb6a
2014-07-28 13:38:17 -07:00
Riley Spahn
840e522e68 Remove dumpstate from servicemanager list auditallow.
Do not auditallow dumpstate as it is the only instance
of listing services seen so far.

Change-Id: I1c142cf5a3a745ea64b22f3a14b8395b24f2e1d0
2014-07-28 10:00:57 -07:00
Nick Kralevich
d84d9f8611 resync with AOSP master
Merge conflict resolution patch 11a29f295d
inadvertently dropped a comment line. Pick it back up.

Change-Id: I0f7a7cdbdacafb86610595ee616e84a06da50a17
2014-07-25 15:30:19 -07:00
Nick Kralevich
d065f0483c Resync lmp-dev-plus-aosp with master
A DO NOT MERGE change merged from lmp-dev to lmp-dev-plus-aosp.
This is expected, but it's causing unnecessary merge conflicts
when handling AOSP contributions.

Resolve those conflicts.

This is essentially a revert of bf69632724
for lmp-dev-plus-aosp only.

Change-Id: Icc66def7113ab45176ae015f659cb442d53bce5c
2014-07-25 15:19:47 -07:00
Nick Kralevich
11a29f295d resolved conflicts for merge of 92b9360c to lmp-dev-plus-aosp
Change-Id: I16eca0cac13042f9ed2e1484e6aa25f233508aa9
2014-07-25 14:50:42 -07:00
Nick Kralevich
f2b7c3b0cc am 1a61fb3b: Allow sdcardd to read /data/.layout_version
* commit '1a61fb3bbcd82f0adfe134aed00238ad3b3dec98':
  Allow sdcardd to read /data/.layout_version
2014-07-25 18:45:09 +00:00
Nick Kralevich
1a61fb3bbc Allow sdcardd to read /data/.layout_version
As described in the system/core commit with the same Change-Id,
there's a race condition between installd and sdcard when it
comes to accessing /data/media. Resolve the race by checking
/data/.layout_version to make sure the filesystem has been upgraded.

Maybe indirectly fixes the following SELinux denial:

  sdcard  : type=1400 audit(0.0:3): avc: denied { write } for name="media" dev="mmcblk0p17" ino=102753 scontext=u:r:sdcardd:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir

(cherrypicked from commit 792d8650d3)

Bug: 16329437
Change-Id: I5e164f08009c1036469f8734ec07cbae9c5e262b
2014-07-25 09:46:15 -07:00
Narayan Kamath
7d62aceef4 am aa8e657e: Revert "fix system_server dex2oat exec"
* commit 'aa8e657ef09d70d8ea5657b624022925d92f4711':
  Revert "fix system_server dex2oat exec"
2014-07-25 16:45:35 +00:00
Narayan Kamath
aa8e657ef0 Revert "fix system_server dex2oat exec"
This reverts commit 10370f5ff4.

The underlying issue has been fixed and the system_server
will now go via installd to get stuff compiled, if required.

bug: 16317188

Change-Id: I77a07748a39341f7082fb9fc9792c4139c90516d
2014-07-25 15:37:27 +01:00
Nick Kralevich
8a17c005f9 am 792d8650: Allow sdcardd to read /data/.layout_version
* commit '792d8650d3dd5e0362a2a04a0af77f751a84b1de':
  Allow sdcardd to read /data/.layout_version
2014-07-25 03:10:51 +00:00
Nick Kralevich
792d8650d3 Allow sdcardd to read /data/.layout_version
As described in the system/core commit with the same Change-Id,
there's a race condition between installd and sdcard when it
comes to accessing /data/media. Resolve the race by checking
/data/.layout_version to make sure the filesystem has been upgraded.

Maybe indirectly fixes the following SELinux denial:

  sdcard  : type=1400 audit(0.0:3): avc: denied { write } for name="media" dev="mmcblk0p17" ino=102753 scontext=u:r:sdcardd:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir

Bug: 16329437
Change-Id: I5e164f08009c1036469f8734ec07cbae9c5e262b
2014-07-24 17:07:27 -07:00
Stephen Smalley
9d24d52e97 am ba992496: Define debuggerd class, permissions, and rules.
* commit 'ba992496f01e40a10d9749bb25b6498138e607fb':
  Define debuggerd class, permissions, and rules.
2014-07-24 20:26:34 +00:00
Christopher Ferris
f0c4cdfc05 am 12b8f79d: Allow dumpstate to read /data/tombstones.
* commit '12b8f79d389802baee5dc5498a7fd833f77cc9ae':
  Allow dumpstate to read /data/tombstones.
2014-07-24 19:48:11 +00:00
Stephen Smalley
ba992496f0 Define debuggerd class, permissions, and rules.
Define a new class, permissions, and rules for the debuggerd
SELinux MAC checks.

Used by Ib317564e54e07cc21f259e75124b762ad17c6e16 for debuggerd.

Change-Id: I8e120d319512ff207ed22ed87cde4e0432a13dda
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-07-24 15:33:44 -04:00
Christopher Ferris
12b8f79d38 Allow dumpstate to read /data/tombstones.
Change-Id: Iad32cfb4d5b69176fc551b8339d84956415a4fe7
2014-07-23 19:16:36 -07:00
Christopher Ferris
665bc083af resolved conflicts for merge of b2eaa28d to lmp-dev-plus-aosp
Change-Id: Ifb5d9765b08217307a6b7bc5a0b3215d48c2985b
2014-07-23 15:57:53 -07:00
Nick Kralevich
92b9360cbc Merge "Add fine grained access control to DrmManagerService." 2014-07-23 17:53:27 +00:00
Riley Spahn
70f75ce9e5 Add fine grained access control to DrmManagerService.
Add policies supporting SELinux MAC in DrmManagerservice.
Add drmservice class with verbs for each of the
functions exposed by drmservice.

Change-Id: Ib758a23302962f41e5103c4853c65adea3a5994e
2014-07-24 13:36:38 -07:00
Christopher Ferris
b2eaa28d11 Allow dumpstate to read /data/tombstones.
Change-Id: Iad32cfb4d5b69176fc551b8339d84956415a4fe7
2014-07-22 19:11:41 -07:00
dcashman
6a6f67d7af am af4a3db0: Merge "DO NOT MERGE. Update readme to reflect addition of SEPOLICY_IGNORE." into lmp-dev
* commit 'af4a3db073f2a459343b12fc9c6103deb33b8546':
  DO NOT MERGE. Update readme to reflect addition of SEPOLICY_IGNORE.
2014-07-22 22:47:06 +00:00
dcashman
24def635ef am 5a45ed4a: Merge "Update readme to reflect addition of SEPOLICY_IGNORE."
* commit '5a45ed4af0293c20118aec4660d20e5b510e467d':
  Update readme to reflect addition of SEPOLICY_IGNORE.
2014-07-22 22:03:27 +00:00
dcashman
af4a3db073 Merge "DO NOT MERGE. Update readme to reflect addition of SEPOLICY_IGNORE." into lmp-dev 2014-07-22 22:02:49 +00:00
dcashman
ea44c79701 DO NOT MERGE. Update readme to reflect addition of SEPOLICY_IGNORE.
Change-Id: I427c0f4828d45f2c43206c09cb37e3eb30455dee
2014-07-22 15:31:20 -07:00
dcashman
5a45ed4af0 Merge "Update readme to reflect addition of SEPOLICY_IGNORE." 2014-07-22 20:47:29 +00:00
dcashman
a8e4ecdefa Update readme to reflect addition of SEPOLICY_IGNORE.
Change-Id: I427c0f4828d45f2c43206c09cb37e3eb30455dee
2014-07-22 14:37:41 -07:00
Ye Wen
6152ee4987 am 9f49e9f9: Merge "Move MmsService into phone process (2/2)" into lmp-dev
* commit '9f49e9f9e1e6fc01cc27925d958f176ca8890e0f':
  Move MmsService into phone process (2/2)
2014-07-22 17:00:52 +00:00
Stephen Smalley
68417e666f am 9d2703a5: Prohibit execute to fs_type other than rootfs for most domains.
* commit '9d2703a53b5455379d5c90d52a6fb31a0a36757c':
  Prohibit execute to fs_type other than rootfs for most domains.
2014-07-21 17:17:33 +00:00
Stephen Smalley
9d2703a53b Prohibit execute to fs_type other than rootfs for most domains.
Augment the already existing neverallow on loading executable content
from file types other than /system with one on loading executable content
from filesystem types other than the rootfs.  Include exceptions for
appdomain and recovery as required by current policy.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>

(cherry picked from commit 4644ac4836)

Change-Id: I5e2609a128d1bf982a7a5c3fa3140d1e9346c621
2014-07-21 10:07:31 -07:00
Colin Cross
1688fb0aca am 3cfc7ea8: sepolicy: allow charger to read /sys/fs/pstore/console-ramoops
* commit '3cfc7ea89f44f822cb44c87916b1847eecd44eb7':
  sepolicy: allow charger to read /sys/fs/pstore/console-ramoops
2014-07-21 17:01:51 +00:00
Colin Cross
3cfc7ea89f sepolicy: allow charger to read /sys/fs/pstore/console-ramoops
Addresses the denial in charger mode:
[   17.993733] type=1400 audit(1405412231.119:4): avc:  denied  { search } for  pid=123 comm="charger" name="/" dev="pstore" ino=10287 scontext=u:r:healthd:s0 tcontext=u:object_r:pstorefs:s0 tclass=dir permissive=0

(cherry picked from commit bb96bffc37)

Change-Id: I2dde6adc3ff99df99409d4da3ef32c3987228801
2014-07-21 09:53:12 -07:00
Colin Cross
070180ddce am bb96bffc: sepolicy: allow charger to read /sys/fs/pstore/console-ramoops
* commit 'bb96bffc379f8bb6d5d42ac1d044ae8a5502f108':
  sepolicy: allow charger to read /sys/fs/pstore/console-ramoops
2014-07-21 16:51:38 +00:00
Colin Cross
bb96bffc37 sepolicy: allow charger to read /sys/fs/pstore/console-ramoops
Addresses the denial in charger mode:
[   17.993733] type=1400 audit(1405412231.119:4): avc:  denied  { search } for  pid=123 comm="charger" name="/" dev="pstore" ino=10287 scontext=u:r:healthd:s0 tcontext=u:object_r:pstorefs:s0 tclass=dir permissive=0

Change-Id: I95e65753a99aa61ef86b8eebb7083b3d450e6b7b
2014-07-21 09:43:10 -07:00
Stephen Smalley
f6f6fc5572 am 4644ac48: Prohibit execute to fs_type other than rootfs for most domains.
* commit '4644ac483667befac441bb541733e489d902bacf':
  Prohibit execute to fs_type other than rootfs for most domains.
2014-07-21 16:32:35 +00:00
Stephen Smalley
4644ac4836 Prohibit execute to fs_type other than rootfs for most domains.
Augment the already existing neverallow on loading executable content
from file types other than /system with one on loading executable content
from filesystem types other than the rootfs.  Include exceptions for
appdomain and recovery as required by current policy.

Change-Id: I73d70ab04719a67f71e48ac795025f2ccd5da385
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-07-21 10:21:20 -04:00
Ye Wen
9f49e9f9e1 Merge "Move MmsService into phone process (2/2)" into lmp-dev 2014-07-18 22:16:50 +00:00