Commit graph

4080 commits

Author SHA1 Message Date
Nick Kralevich
d99ea5a8af Merge "Revert /proc/net related changes" 2015-02-26 14:26:09 +00:00
Nick Kralevich
88e51490d7 am 9fe810b7: allow kernel to use vold file descriptors
* commit '9fe810b7392c1c1ca17b7700eab88ccdf8fa9d2d':
  allow kernel to use vold file descriptors
2015-02-26 01:07:04 +00:00
Nick Kralevich
9fe810b739 allow kernel to use vold file descriptors
Vold opens ASEC containsers on the sdcard, or OBB files from app's
home directories, both of which are supplied by vold. We need to
allow kernel threads to access those file descriptors.

Addresses the following denial:

  loop0   : type=1400 audit(0.0:28): avc: denied { use } for path="/mnt/secure/asec/smdl1159865753.tmp.asec" dev="mmcblk1" ino=19 scontext=u:r:kernel:s0 tcontext=u:r:vold:s0 tclass=fd permissive=0

Bug: 19516891
Change-Id: I5a3607b48f5e0e504e4b3fcaec19152c3784f49d
2015-02-25 15:14:09 -08:00
Mohamad Ayyash
988d8ac76d am ab4be88e: fs_use: Enabled loading security xattrs for squashfs
* commit 'ab4be88ecbd04e8930b534a33eb74ade6364d481':
  fs_use: Enabled loading security xattrs for squashfs
2015-02-25 22:47:01 +00:00
Mohamad Ayyash
ab4be88ecb fs_use: Enabled loading security xattrs for squashfs
Change-Id: Icfa4b2cac6a960ef47e928308e4c6c9bd797d180
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-02-25 14:18:11 -08:00
Nick Kralevich
5cf3994d8a Revert /proc/net related changes
Revert the tightening of /proc/net access. These changes
are causing a lot of denials, and I want additional time to
figure out a better solution.

Addresses the following denials (and many more):

  avc: denied { read } for comm="SyncAdapterThre" name="stats" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
  avc: denied { read } for comm="facebook.katana" name="iface_stat_fmt" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
  avc: denied { read } for comm="IntentService[C" name="if_inet6" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
  avc: denied { read } for comm="dumpstate" name="iface_stat_all" dev="proc" ino=X scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file

This reverts commit 0f0324cc82
and commit 99940d1af5

Bug: 9496886
Bug: 19034637
Change-Id: I436a6e3638ac9ed49afbee214e752fe2b0112868
2015-02-25 13:35:17 -08:00
Nick Kralevich
3cbe57fc3c am 28ddd104: su: don\'t auditallow service_manager for su
* commit '28ddd1042a2064f02cb55844180b9cafbce9e1c6':
  su: don't auditallow service_manager for su
2015-02-25 18:54:16 +00:00
Nick Kralevich
28ddd1042a su: don't auditallow service_manager for su
Addresses the following auditallow messages:

  avc: granted { find } for service=accessibility scontext=u:r:su:s0 tcontext=u:object_r:accessibility_service:s0 tclass=service_manager
  avc: granted { find } for service=activity scontext=u:r:su:s0 tcontext=u:object_r:activity_service:s0 tclass=service_manager
  avc: granted { find } for service=package scontext=u:r:su:s0 tcontext=u:object_r:package_service:s0 tclass=service_manager
  avc: granted { find } for service=user scontext=u:r:su:s0 tcontext=u:object_r:user_service:s0 tclass=service_manager
  avc: granted { find } for service=window scontext=u:r:su:s0 tcontext=u:object_r:window_service:s0 tclass=service_manager

Change-Id: Ie58ad3347e9ef1aacd39670cfec7d095875e237b
2015-02-25 09:48:54 -08:00
Nick Kralevich
4437e6540d am 4308ce8c: kernel: make kernel an mlstrustedsubject
* commit '4308ce8c7cadae3880c61f2fd62506c3541bd18d':
  kernel: make kernel an mlstrustedsubject
2015-02-25 13:23:08 +00:00
Nick Kralevich
4308ce8c7c kernel: make kernel an mlstrustedsubject
Addresses post-review comment in
https://android-review.googlesource.com/130620

Change-Id: I427ba99d63724eb526d41da47b95cc0ae038acdd
2015-02-24 18:45:46 -08:00
Nick Kralevich
19d9edc2e3 am f95858ed: Merge "kernel: remove permissive_or_unconfined()"
* commit 'f95858ede29064fad4788486b8c6c498e6acd1a7':
  kernel:  remove permissive_or_unconfined()
2015-02-24 23:14:24 +00:00
Nick Kralevich
f95858ede2 Merge "kernel: remove permissive_or_unconfined()" 2015-02-24 23:08:47 +00:00
Nick Kralevich
5f6e9303f4 am f70fcbd8: Merge "sepolicy: remove block_device access from install_recovery"
* commit 'f70fcbd8789c381357f464863f613e16585fe864':
  sepolicy:  remove block_device access from install_recovery
2015-02-24 22:33:57 +00:00
Nick Kralevich
f70fcbd878 Merge "sepolicy: remove block_device access from install_recovery" 2015-02-24 22:28:01 +00:00
Stephen Smalley
f5e7162f1d sepolicy: remove block_device access from install_recovery
The recovery partition has been assigned a recovery_block_device
type for the AOSP devices, so install_recovery should not need
rw access to the generic block_device type.  Remove it.

Change-Id: I31621a8157998102859a6e9eb76d405caf6d5f0d
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-24 18:11:51 -05:00
Nick Kralevich
2714e41a3c am b4876619: Merge "bootchart: add policy rules for bootchart"
* commit 'b487661946ad632e34412ffccf55d43723ded572':
  bootchart: add policy rules for bootchart
2015-02-24 17:22:51 +00:00
Nick Kralevich
b487661946 Merge "bootchart: add policy rules for bootchart" 2015-02-24 17:18:51 +00:00
Stephen Smalley
a02dbf4ee3 am 884ee2a6: checkseapp, seapp_contexts: drop sebool= support.
* commit '884ee2a61cc78ddaaf54b812932730045dd155c3':
  checkseapp, seapp_contexts:  drop sebool= support.
2015-02-24 00:39:50 +00:00
Stephen Smalley
afc841af8d am 534fb071: checkseapp: Detect duplicate keys in seapp_contexts entries.
* commit '534fb0711d95615a77af23ffe643e8b720a527e6':
  checkseapp:  Detect duplicate keys in seapp_contexts entries.
2015-02-24 00:39:49 +00:00
Stephen Smalley
884ee2a61c checkseapp, seapp_contexts: drop sebool= support.
SELinux policy booleans are prohibited in AOSP, so we can drop the
support for the sebool= input selector.

Change-Id: I5ae31247b2f68d90f6ae4c8830458f22c4ffc854
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-24 00:36:24 +00:00
Stephen Smalley
534fb0711d checkseapp: Detect duplicate keys in seapp_contexts entries.
Presently it ignores duplicate keys in seapp_contexts entries, e.g.
if you were to specify:

user=system seinfo=platform user=bluetooth domain=system_app type=system_app_data_file

checkseapp would ignore the duplicate and libselinux would end up using
the last value defined for the key in each line.

Change-Id: I18cadb0c1bf5a907e6fc6513df65aafed91d76fe
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-24 00:35:23 +00:00
Nick Kralevich
29d2a05b78 am c6a0feb4: Merge "checkseapp: Detect duplicate entries within seapp_contexts."
* commit 'c6a0feb44d3f9bb1f30671dad298040c594a2fe6':
  checkseapp:  Detect duplicate entries within seapp_contexts.
2015-02-24 00:05:53 +00:00
Nick Kralevich
c6a0feb44d Merge "checkseapp: Detect duplicate entries within seapp_contexts." 2015-02-24 00:00:02 +00:00
Nick Kralevich
c62718d31a am 74ddf301: neverallow mounton lnk_file fifo_file sock_file
* commit '74ddf301a086a829787ed4fd98154a86534cf5d7':
  neverallow mounton lnk_file fifo_file sock_file
2015-02-23 21:19:20 +00:00
Nick Kralevich
74ddf301a0 neverallow mounton lnk_file fifo_file sock_file
Add a compile time assertion that no SELinux rule exists which
allows mounting on top of symbolic links, fifo files, or socket
files. Remove the capability from unconfined domains.

Change-Id: I6d7cc95cd17e2e5f165fa5948563800ed206bb71
2015-02-23 13:05:49 -08:00
Stephen Smalley
0bd760e47c am 68a8f780: sepolicy: Add an introduction to the README.
* commit '68a8f780d22519176fa9bc43de5b4d151dd93338':
  sepolicy:  Add an introduction to the README.
2015-02-23 18:29:14 +00:00
Stephen Smalley
68a8f780d2 sepolicy: Add an introduction to the README.
The README jumped directly into using the BOARD_SEPOLICY_*
variables for device-specific policy; add a short introduction
describing what external/sepolicy contains and noting where to put
device-specific policy.

Change-Id: I3c800df93d70074384da993a689a5a0771ecb314
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-23 12:37:21 -05:00
Yongqin Liu
cc38e6d1a4 bootchart: add policy rules for bootchart
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>
2015-02-24 01:02:20 +08:00
Stephen Smalley
60c624b26c am 7d1b6c87: sepolicy: allow cross-user unnamed pipe access
* commit '7d1b6c87924a74e2163763a659fcca870a672e3c':
  sepolicy:  allow cross-user unnamed pipe access
2015-02-20 19:24:47 +00:00
Stephen Smalley
7d1b6c8792 sepolicy: allow cross-user unnamed pipe access
Exempt unnamed pipes from the MLS constraints so that they can
be used for cross-user communications when passed over binder or
local socket IPC.

Addresses denials such as:
avc: denied { read } for path="pipe:[59071]" dev="pipefs" ino=59071 scontext=u:r:untrusted_app:s0:c522,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=fifo_file

Bug: 19087939

Change-Id: I77d494c4a38bf473fec05b728eaf253484deeaf8
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-20 11:16:20 -08:00
Bill Yi
44f20421bd Merge commit '5adb97c12a76853a0b80ca89e9b39ec8d380d162' into HEAD 2015-02-19 14:31:27 -08:00
Sami Tolvanen
bf15225e47 am 47cd53a5: Allow ueventd to set verity.* properties
* commit '47cd53a55855b911b80b54b68702f5ee5db51d00':
  Allow ueventd to set verity.* properties
2015-02-19 19:56:15 +00:00
Sami Tolvanen
47cd53a558 Allow ueventd to set verity.* properties
On dm-verity errors, we catch uevents in ueventd and set the value
for a matching verity.* property. Allow ueventd to actually change
property values.

Needed by changes from
  Ibb82953594d234f81ad21c40f524190b88e4ac8f

Change-Id: I79bc90733edf8a45b27e64795f4adfbb3bc028dc
2015-02-18 13:56:06 +00:00
Stephen Smalley
0b820042e4 checkseapp: Detect duplicate entries within seapp_contexts.
Presently it only detects complete duplicates if you specify -s (strict),
which is not used in the external/sepolicy Makefile, and it allows
overriding earlier entries that have the same input selectors (e.g.
user=, seinfo=) with different values for the output selectors (e.g.
domain=, type=).  Thus, a device/<vendor>/<board>/sepolicy/seapp_contexts
file can override the external/sepolicy definitions, and even a single
seapp_contexts file can contain duplicated or conflicting definitions.

Make it always check strictly, and prohibit either duplicates on the
input selectors (i.e. overrides) or complete duplicates (redundant).

Change-Id: Id1e38133cbe31b796253101cfe3b111d1826bc8c
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-13 14:58:31 -05:00
dcashman
5adb97c12a am e814ad72: am 41d961a7: Allow bluetooth surfaceflinger access.
* commit 'e814ad7217702a93979b67086cd12fc495fab7d3':
  Allow bluetooth surfaceflinger access.
2015-02-12 18:07:54 +00:00
dcashman
e814ad7217 am 41d961a7: Allow bluetooth surfaceflinger access.
* commit '41d961a7281bff9e345dcefcf7a6ea95f6129714':
  Allow bluetooth surfaceflinger access.
2015-02-12 18:04:06 +00:00
dcashman
41d961a728 Allow bluetooth surfaceflinger access.
Address the following denial:
02-12 07:51:42.702: E/SELinux(158): avc:  denied  { find } for service=SurfaceFlinger scontext=u:r:bluetooth:s0 tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager

which occurs when the remote service starts up.
02-12 07:51:42.702: E/ServiceManager(158): find_service('SurfaceFlinger') uid=1002 - PERMISSION DENIED
02-12 07:51:42.702: I/ServiceManager(2827): Waiting for service SurfaceFlinger...
02-12 07:51:42.959: E/ActivityManager(469): ANR in com.google.android.remote.tv.services
02-12 07:51:42.959: E/ActivityManager(469): PID: 2827
02-12 07:51:42.959: E/ActivityManager(469): Reason: executing service com.google.android.tv.remote/.RemoteService

Bug: 19268019
Change-Id: I2d415c2ea2f70cf71851147253cf6e1906fd0940
2015-02-12 09:50:20 -08:00
Nick Kralevich
9cb34b8a73 am 88eb71f7: am 9ad26a7f: fix user builds.
* commit '88eb71f76c4a0daf4c867e33bbe5249446144906':
  fix user builds.
2015-02-12 17:43:02 +00:00
Nick Kralevich
88eb71f76c am 9ad26a7f: fix user builds.
* commit '9ad26a7f5c2da1d40fcaa836f2b413079a63d4d3':
  fix user builds.
2015-02-12 17:35:21 +00:00
Nick Kralevich
9ad26a7f5c fix user builds.
14d5619a1a added a neverallow
rule for System V IPC calls. Since this was still allowed
for unconfined domains, this broke user builds.

Remove System V IPC stuff from unconfined and fix the build.

Change-Id: Iea66a9f97a90f8db496f6fa34b5e9642ee926fe6
2015-02-12 09:12:50 -08:00
Nick Kralevich
b3e215fbe5 am ce29a859: am 3c985dd6: Merge "domain.te: neverallow System V IPC classes"
* commit 'ce29a859092f5888e57c374a7a748c2e7613f702':
  domain.te: neverallow System V IPC classes
2015-02-12 00:47:54 +00:00
Nick Kralevich
ce29a85909 am 3c985dd6: Merge "domain.te: neverallow System V IPC classes"
* commit '3c985dd6b13141c2e1a1b5cc23cf6281028d55e7':
  domain.te: neverallow System V IPC classes
2015-02-11 23:28:48 +00:00
Nick Kralevich
3c985dd6b1 Merge "domain.te: neverallow System V IPC classes" 2015-02-11 23:23:59 +00:00
dcashman
83e512fb6c am 3be66999: am 895a4f2c: Allow bluetooth mediaserver_service access.
* commit '3be6699930c56120a2f720a1a24fb2c78ab873ad':
  Allow bluetooth mediaserver_service access.
2015-02-11 23:17:15 +00:00
Nick Kralevich
14d5619a1a domain.te: neverallow System V IPC classes
Android doesn't want to support System V IPC classes.
Ensure that it isn't supported by adding a neverallow rule
(compile time assertion).

Change-Id: I278d45960ee557917584f9137323b4cabfe140a9
2015-02-11 15:15:23 -08:00
dcashman
3be6699930 am 895a4f2c: Allow bluetooth mediaserver_service access.
* commit '895a4f2cf7a3530ad0a6cfbc0fc16134f43bb5cf':
  Allow bluetooth mediaserver_service access.
2015-02-11 23:02:03 +00:00
dcashman
895a4f2cf7 Allow bluetooth mediaserver_service access.
This was observed when attempting to change volume for a bluetooth device
supporting AVRCP volume control.

Addresses the following denials:
avc:  denied  { find } for service=media.audio_flinger scontext=u:r:bluetooth:s0 tcontext=u:object_r:mediaserver_service:s0 tclass=service_manager
avc:  denied  { find } for service=media.audio_policy scontext=u:r:bluetooth:s0 tcontext=u:object_r:mediaserver_service:s0 tclass=service_manager

Bug: 19341236
Change-Id: If7f2ff1ea9fc694bad700cf59f400f2d2df8c2dd
2015-02-11 13:25:57 -08:00
Nick Kralevich
b726d8c927 am df770fcb: am b8ef2b02: fix "Unable to add user\'s profile photo id."
* commit 'df770fcb71f475d7ddf256ec0e6a02540e90aebf':
  fix "Unable to add user's profile photo id."
2015-02-11 17:34:43 +00:00
Nick Kralevich
df770fcb71 am b8ef2b02: fix "Unable to add user\'s profile photo id."
* commit 'b8ef2b0297ca112846cb7ed27b78ba7137f20076':
  fix "Unable to add user's profile photo id."
2015-02-11 17:27:44 +00:00
Nick Kralevich
b8ef2b0297 fix "Unable to add user's profile photo id."
Commit a833763ba0 enabled per-user
isolation, which requires that any files / processes which cross
user boundaries be marked with the mlstrustedsubject attribute.

system_app_data_file, used for storing a user's profile photos,
is not marked as such. As a result, users are unable to add profile
photos.

Addresses the following denial:

  avc: denied { write } for path="/data/data/com.android.settings/cache/TakeEditUserPhoto2.jpg" dev="mmcblk0p28" ino=82184 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_app_data_file:s0 tclass=file

Steps to reproduce:

  1.Flash & Factory the Deb device with tip-of-tree build
  2.Go to 'Settings-Users'
  3.Under users&profiles,click on Owner to add profile photo.
  4.Select 'Choose photo from Gallery' and select a photo.
  5.Then click the 'Done' button.
  6.Device showed the message as 'Unable to save the photo edits'.

OBSERVED RESULTS:
  Unable to add user's profile photo id. This issue is coming for all
  users(Restricted user,second user)also.

EXPECTED RESULTS:
  Device should allow to add profile photo id.

Bug: 19170844
Change-Id: If657dc09dd391e63ca85320f9cc1728580e51a15
2015-02-11 08:39:41 -08:00