Commit graph

1891 commits

Author SHA1 Message Date
Mark Salyzyn
21e6b4d928 Merge "Allow Developer settings to change runtime size of logd" 2014-05-15 18:12:09 +00:00
Nick Kralevich
e9f696172d am 2d9c025d: Merge "Remove graphics_device access."
* commit '2d9c025ddebeefe1132c651a8d0a15fd4d9ed3bc':
  Remove graphics_device access.
2014-05-15 13:03:07 +00:00
Nick Kralevich
2d9c025dde Merge "Remove graphics_device access." 2014-05-15 13:00:55 +00:00
Narayan Kamath
8914380d6f am 5c655876: app_process is now a symlink.
* commit '5c655876780f017c472997d7ae2c6a36d5752f09':
  app_process is now a symlink.
2014-05-15 09:41:36 +00:00
Narayan Kamath
5c65587678 app_process is now a symlink.
app_process is now a symlink to app_process32 or
app_process64, so we have to update the selinux
rules to explicitly refer to them.

See change 5a7ee9ad63d for context.

Change-Id: I7f7a107d79a8f7a3c193f97809e1e737540258f1
2014-05-15 10:17:53 +01:00
Nick Kralevich
e64e8b7f3b am 1f065398: Merge "Remove zygote write access to system_data_file."
* commit '1f065398fc75941f8927887f0da09ecdfa95fb71':
  Remove zygote write access to system_data_file.
2014-05-14 22:34:49 +00:00
Nick Kralevich
1f065398fc Merge "Remove zygote write access to system_data_file." 2014-05-14 22:30:52 +00:00
Nick Kralevich
c0a26d7996 am df2547b9: Merge "Drop unused rules for raw I/O, mknod, and block device access."
* commit 'df2547b9b5be0de3806a1426c98efb16b9e3c154':
  Drop unused rules for raw I/O, mknod, and block device access.
2014-05-14 21:37:48 +00:00
Nick Kralevich
df2547b9b5 Merge "Drop unused rules for raw I/O, mknod, and block device access." 2014-05-14 21:35:47 +00:00
dcashman
71db411043 Remove duplicate neverallow rule.
Commit: 7ffb997207 added protection against low
memory mapping for all domains, a superset of appdomain.  Remove the same,
redundant neverallow rule from appdomain.

Change-Id: Ia41c02763f6b5a260c56d10adfbab649d9f3f97c
2014-05-14 13:11:43 -07:00
Sreeram Ramachandran
9134b7c237 am 7e5b6d0c: Merge "Introduce fwmarkd: a service to set the fwmark of sockets."
* commit '7e5b6d0ca3a492bb907b71f4657c845b0a75163d':
  Introduce fwmarkd: a service to set the fwmark of sockets.
2014-05-14 19:48:12 +00:00
Nick Kralevich
22fd0f9bbc am 12dbd8f7: Merge "Neverallow low memory mappings."
* commit '12dbd8f701dee14be3f702937a7293a30f04b3cf':
  Neverallow low memory mappings.
2014-05-14 19:48:09 +00:00
Sreeram Ramachandran
7e5b6d0ca3 Merge "Introduce fwmarkd: a service to set the fwmark of sockets." 2014-05-14 19:42:09 +00:00
Nick Kralevich
12dbd8f701 Merge "Neverallow low memory mappings." 2014-05-14 19:24:57 +00:00
Stephen Smalley
a16a59e2c7 Remove graphics_device access.
Neither mediaserver nor system_server appear to require
direct access to graphics_device, i.e. the framebuffer
device.  Drop it.

Change-Id: Ie9d1be3f9071584155cddf248ea85e174b7e50a6
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 18:47:49 +00:00
Stephen Smalley
7813b36beb am 782e084d: Allow system_server to read tombstones.
* commit '782e084dc249ec96a4659c523ffc6a53ee46abb1':
  Allow system_server to read tombstones.
2014-05-14 18:39:37 +00:00
Stephen Smalley
782e084dc2 Allow system_server to read tombstones.
Address denials such as:
 avc:  denied  { read } for  name="tombstones" dev="dm-0" ino=765537 scontext=u:r:system_server:s0 tcontext=u:object_r:tombstone_data_file:s0 tclass=dir
 avc:  denied  { open } for  name="tombstones" dev="dm-0" ino=765537 scontext=u:r:system_server:s0 tcontext=u:object_r:tombstone_data_file:s0 tclass=dir
 avc:  denied  { getattr } for  path="/data/tombstones/tombstone_00" dev="dm-0" ino=765538 scontext=u:r:system_server:s0 tcontext=u:object_r:tombstone_data_file:s0 tclass=file
 avc:  denied  { read } for  name="tombstone_00" dev="dm-0" ino=765538 scontext=u:r:system_server:s0 tcontext=u:object_r:tombstone_data_file:s0 tclass=file
 avc:  denied  { open } for  name="tombstone_00" dev="dm-0" ino=765538 scontext=u:r:system_server:s0 tcontext=u:object_r:tombstone_data_file:s0 tclass=file

Change-Id: Iae5a10bed9483589660b84a88b6b9f8f8e9a8f5c
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 14:30:43 -04:00
Sreeram Ramachandran
56ecf4bdf8 Introduce fwmarkd: a service to set the fwmark of sockets.
(cherry picked from commit 7d51096d4106a441a15741592d9ccdd0bfaca907)

Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9
2014-05-14 11:23:28 -07:00
Stephen Smalley
7ffb997207 Neverallow low memory mappings.
This just adds a neverallow rule to ensure we never
add an allow rule permitting such mappings.

Change-Id: Id20463b26e0eac5b7629326f68b3b94713108cc2
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 14:05:49 -04:00
Stephen Smalley
c2c91bba59 Drop unused rules for raw I/O and mknod.
We added these rules to the recovery domain when we removed them
from unconfined to ensure that we did not break anything. But we
have seen no uses of these rules by the recovery domain.  Tested
wiping userdata and cache from the recovery and performing an
adb sideload of an ota zip file.

Change-Id: I261cb1124130f73e98b87f3e5a31d6d7f521ff11
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 13:14:54 -04:00
Nick Kralevich
d34d744b2f am 45206a38: Merge "Allow installd to unlink /data/media files and search /data/app-asec."
* commit '45206a388c580070bbd021f2b167bd8b3e3376f6':
  Allow installd to unlink /data/media files and search /data/app-asec.
2014-05-14 13:35:44 +00:00
Stephen Smalley
cdae7debe6 Drop unused rules for raw I/O, mknod, and block device access.
We added these rules to the kernel domain when we removed them
from unconfined to ensure that we did not break anything.  But
we have seen no uses of these rules and this matches our expectation
that any actual operations that require these permissions occurs
after switching to the init domain.

Change-Id: I6f3556a26b0f6f4e6effcb874bfc9498e7dfaa47
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 09:31:06 -04:00
Nick Kralevich
45206a388c Merge "Allow installd to unlink /data/media files and search /data/app-asec." 2014-05-14 13:30:28 +00:00
Nick Kralevich
4d9e380ea4 am 4bdd13e4: untrusted_app: neverallow debugfs
* commit '4bdd13e4c3632587c72b487a16d6c71a7a30714f':
  untrusted_app: neverallow debugfs
2014-05-14 13:27:31 +00:00
Stephen Smalley
df48bd2ca8 Remove zygote write access to system_data_file.
These rules seem to be a legacy of old Android or perhaps old policy
before we began splitting types on /data.  I have not been able to
trigger the auditallow rules on AOSP master.  Reduce the rules to
only read access to system data.  If we need write access to some
specific directory under /data, we should introduce a type for it.

Change-Id: I780835950cc366c97b7d0901fc73527d9ea479b1
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 08:58:06 -04:00
Stephen Smalley
d30060a0cb Allow installd to unlink /data/media files and search /data/app-asec.
Address recent installd denials resulting from the recent
tightening of installd access to /data file types, including:
 avc:  denied  { unlink } for  name="._playmusicid" dev="mmcblk0p30" ino=1038393 scontext=u:r:installd:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
 avc:  denied  { search } for  pid=195 comm="installd" name="app-asec" dev="mmcblk0p28" ino=578225 scontext=u:r:installd:s0 tcontext=u:object_r:asec_image_file:s0 tclass=dir

Change-Id: I957738139678699949da9ad09d3bddb91605f8cf
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-14 08:29:00 -04:00
Nick Kralevich
4bdd13e4c3 untrusted_app: neverallow debugfs
Too many leaky files in that directory. It's a security best practice
to not mount this filesystem, however, we need it mounted for
tracing support. Even though it's mounted, make sure the files aren't
readable.

Bug: 11635985
Change-Id: I6f116c0a03a567a8107a8e07135ce025e51458dd
2014-05-13 14:45:00 -07:00
Nick Kralevich
2680a8c4ea am f78fb4e0: Merge "Make ppp domain enforcing."
* commit 'f78fb4e0c8ae49bb73e691a37de00f2d5b66f9e1':
  Make ppp domain enforcing.
2014-05-13 21:19:43 +00:00
Nick Kralevich
132e56b941 am e3519d6c: Merge "Label /data/.layout_version with its own type."
* commit 'e3519d6c2a39e1abae38109d07fc23f9b0fcaf1d':
  Label /data/.layout_version with its own type.
2014-05-13 21:19:42 +00:00
Nick Kralevich
f78fb4e0c8 Merge "Make ppp domain enforcing." 2014-05-13 21:17:32 +00:00
Nick Kralevich
e3519d6c2a Merge "Label /data/.layout_version with its own type." 2014-05-13 21:15:42 +00:00
Nick Kralevich
6d4392137c am bc36ce13: Merge "Restrict system_server to only the data file types needed."
* commit 'bc36ce1385f938d3d6c69d280e1cada8680f3115':
  Restrict system_server to only the data file types needed.
2014-05-13 18:35:50 +00:00
Nick Kralevich
bc36ce1385 Merge "Restrict system_server to only the data file types needed." 2014-05-13 18:29:55 +00:00
Nick Kralevich
1a1abe51cf am f67e0ef3: Merge "Revisit kernel setenforce"
* commit 'f67e0ef3f77e1b14d168a624d6f69b7683356006':
  Revisit kernel setenforce
2014-05-13 15:46:25 +00:00
Nick Kralevich
24247d1898 am 4fc25052: Merge "Allow ppp to inherit/use mtp unix datagram socket."
* commit '4fc250529c41b47e967ce63a0cdeb9e2b5b61b2a':
  Allow ppp to inherit/use mtp unix datagram socket.
2014-05-13 15:46:25 +00:00
Nick Kralevich
f67e0ef3f7 Merge "Revisit kernel setenforce" 2014-05-13 15:44:31 +00:00
Nick Kralevich
4fc250529c Merge "Allow ppp to inherit/use mtp unix datagram socket." 2014-05-13 15:42:09 +00:00
Stephen Smalley
87bf6de930 am efc72991: Allow mediaserver to use app-created pipes.
* commit 'efc7299169d9376ba7edea22a10856be14d39d95':
  Allow mediaserver to use app-created pipes.
2014-05-13 13:16:23 +00:00
Stephen Smalley
7011072875 Make ppp domain enforcing.
Change-Id: If6b85fbb2332f7a03b603f2d46bd2f73c778ecf9
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-13 08:25:31 -04:00
Stephen Smalley
b300765095 Allow ppp to inherit/use mtp unix datagram socket.
Resolves denials such as:
avc:  denied  { read write } for  path="socket:[33571]" dev="sockfs" ino=33571 scontext=u:r:ppp:s0 tcontext=u:r:mtp:s0 tclass=unix_dgram_socket

Change-Id: Icb1ee00d8513179039bfb738647f49480e836f25
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-13 08:24:38 -04:00
Stephen Smalley
efc7299169 Allow mediaserver to use app-created pipes.
Resolves denials such as:
 avc:  denied  { getattr } for  path="pipe:[167684]" dev="pipefs" ino=167684 scontext=u:r:mediaserver:s0 tcontext=u:r:untrusted_app:s0 tclass=fifo_file

Change-Id: I1120c8b130a592e40992c5233650345640a23a87
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-13 08:07:31 -04:00
Stephen Smalley
538edd3317 Restrict system_server to only the data file types needed.
Drop rules on data_file_type attribute and replace with rules
on specific types under /data.

Change-Id: I5cbfef64cdd71b8e93478d9ef377689bf6dda192
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-13 07:58:18 -04:00
Nick Kralevich
253d5a397b am 02e71525: Merge "Revert "Make the mediaserver domain enforcing.""
* commit '02e715259542a283d3674420f605851bd53f9e3f':
  Revert "Make the mediaserver domain enforcing."
2014-05-13 02:40:43 +00:00
Nick Kralevich
02e7152595 Merge "Revert "Make the mediaserver domain enforcing."" 2014-05-13 02:34:58 +00:00
Nick Kralevich
f42cc61879 Revert "Make the mediaserver domain enforcing."
I didn't fix unpublished denials before switching this into enforcing. Need to revert.

This reverts commit ae50551142.

Bug: 14844424
Change-Id: I01408b77a67ad43a8fb20be213d3ffbace658616
2014-05-13 02:33:44 +00:00
Nick Kralevich
abae8a9b58 Revisit kernel setenforce
Kernel userspace helpers may be spawned running in the kernel
SELinux domain. Those userspace helpers shouldn't be able to turn
SELinux off.

This change revisits the discussion in
https://android-review.googlesource.com/#/c/71184/

At the time, we were debating whether or not to have an allow rule,
or a dontaudit rule. Both have the same effect, as at the time we
switch to enforcing mode, the kernel is in permissive and the operation
will be allowed.

Change-Id: If335a5cf619125806c700780fcf91f8602083824
2014-05-12 14:32:59 -07:00
Mark Salyzyn
c52d738834 Allow Developer settings to change runtime size of logd
- permit logd control from system_app

Bug: 14563261
Change-Id: Id5992cca70647a0e4b913a793c6ba8334dc57963
2014-05-12 10:14:19 -07:00
Stephen Smalley
9452d9ac9e am 0099148e: Audit zygote create/write access to system_data_file.
* commit '0099148ee4c69d0eabb3f73735a6e94f72842dbc':
  Audit zygote create/write access to system_data_file.
2014-05-12 17:06:26 +00:00
Stephen Smalley
0099148ee4 Audit zygote create/write access to system_data_file.
Report any attempts by zygote to create/write files in system_data_file
so that we can ultimately move any such cases to their own type
and reduce this to read-only access.

Change-Id: I310b8da5ba5b462ef2cfdaab289628498f4d2cec
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-12 11:55:20 -04:00
Stephen Smalley
baf49bd541 Label /data/.layout_version with its own type.
installd creates /data/.layout_version.  Introduce a separate type
for this file (and any other file created by installd under a directory
labeled system_data_file) so that we can allow create/write access by
installd without allowing it to any system data files created by other
processes.  This prevents installd from overwriting other system data
files, and ensure that any files it creates will require explicit
rules in order to access.

Change-Id: Id04e49cd571390d18792949c8b2b13b1ac59c016
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-05-12 11:31:09 -04:00