Commit graph

312 commits

Author SHA1 Message Date
Nick Kralevich
7fb7102b40 Merge "Revert "ueventd.te: auditallow device:chr_file""
am: 8ee06cc44f

Change-Id: I870f2084bd6f483c8e1537a73259e0d0a45f3a07
2016-12-05 17:35:23 +00:00
Nick Kralevich
8ee06cc44f Merge "Revert "ueventd.te: auditallow device:chr_file"" 2016-12-05 17:30:23 +00:00
Nick Kralevich
e78fa1bf37 Revert "ueventd.te: auditallow device:chr_file"
Broke the dragon build:

libsepol.report_failure: neverallow on line 304 of system/sepolicy/public/domain.te (or line 8638 of policy.conf) violated by allow kernel device:chr_file { create setattr };
libsepol.check_assertions: 1 neverallow failures occurred
Error while expanding policy

This reverts commit ed0b4eb366.

Change-Id: I5d55ab59ed72ce7c19a10ddbb374f9f3b3fae4fd
2016-12-05 17:29:25 +00:00
Nick Kralevich
887f026beb Merge "ueventd.te: auditallow device:chr_file"
am: 4868f377fa

Change-Id: I3c57e833dd736ac87718d9e95e0a02e3048de979
2016-12-05 16:46:21 +00:00
Treehugger Robot
4868f377fa Merge "ueventd.te: auditallow device:chr_file" 2016-12-05 16:41:25 +00:00
Robert Sesek
6774088baa Merge "Allow webview_zygote to stat /sys/kernel/debug/tracing/trace_marker."
am: 2c222c1e3f

Change-Id: I89d6c56ce6d29dfb184f9eb95aaaa49909e25b44
2016-12-05 16:34:20 +00:00
Treehugger Robot
2c222c1e3f Merge "Allow webview_zygote to stat /sys/kernel/debug/tracing/trace_marker." 2016-12-05 16:30:25 +00:00
Nick Kralevich
ed0b4eb366 ueventd.te: auditallow device:chr_file
By default, files created in /dev are labeled with the "device" label
unless a different label has been assigned. The direct use of this
generic label is discouraged (and in many cases neverallowed) because
rules involving this label tend to be overly broad and permissive.

Today, generically labeled character devices can only be opened, read,
or written to by init and ueventd.

  $ sesearch --allow -t device -c chr_file -p open,read,write out/target/product/marlin/root/sepolicy
  allow init device:chr_file { setattr read lock getattr write ioctl open append };
  allow ueventd device:chr_file { read lock getattr write ioctl open append };

this is enforced by the following SELinux neverallow rule (compile time
assertion + CTS test):

  neverallow { domain -init -ueventd } device:chr_file { open read write };

Start auditallowing ueventd access to /dev character device files with the
default SELinux label. This doesn't appear to be used, but let's prove it.
While ueventd is expected to create files in /dev, it has no need to open
most of the files it creates.

Note, however, that because ueventd has mknod + setfscreate permissions,
a malicious or compromised ueventd can always create a device node under
an incorrect label, and gain access that way.

The goal of this change is to prove that no process other than init are
accessing generically labeled files in /dev.

While I'm here, tighten up the compile time assertion for
device:chr_file to include more permissions.

Test: policy compiles + device boots with no granted messages.
Change-Id: Ic98b0ddc631b49b09e58698d9f40738ccedd1fd0
2016-12-05 14:22:18 +00:00
Daniel Micay
5fa3dd0608 Merge "auditallow priv_app app_data_file execution"
am: a24d7f5392

Change-Id: Ia27cb54e53bbd755adaf588fb4bb2f948ba3d255
2016-12-05 05:58:44 +00:00
Treehugger Robot
a24d7f5392 Merge "auditallow priv_app app_data_file execution" 2016-12-05 05:53:36 +00:00
Max
45c41f35ad /dev/port does not seem to be used, adding in rules to confirm.
am: c27c23fbdb

Change-Id: I28f0ec1eac5fa78ca1268089954c190c0e38b188
2016-12-05 02:30:31 +00:00
Max
c27c23fbdb /dev/port does not seem to be used, adding in rules to confirm.
Only init and ueventd have any access to /dev/port, and neither should
have any use for it. As it stands, leaving port in just represents
additional attack surface with no useful functionality, so it should be
removed if possible, not only from Pixel devices, but from all Android
devices.

Test: The phone boots successfully

Bug:33301618
Change-Id: Iedc51590f1ffda02444587d647889ead9bdece3f
2016-12-04 16:46:11 -08:00
Daniel Micay
758e6b3678 auditallow priv_app app_data_file execution
In general, apps shouldn't be executing data from their writable data
directories. Allowing this is a security risk and use cases for this are
almost always anti-patterns where saner alternatives are available such
as using one of the standard systems for shipping libraries (extracted
by the package manager or aligned/uncompressed in the apk) or using the
existing package system to handle plugins. It's reasonable for the
untrusted_app domain to have this (not just for backwards compatibility)
for priv_app should be held to a higher standard.

Ideally, untrusted apps would be able to opt-in to disabling this and
then the default could then be switched at a new API level. It could do
more than just hardening apps not requiring it by having documentation
explain the risks and offer alternatives to reduce 'legitimate' use. The
base system could disable it for all of the bundled untrusted apps.

Change-Id: I4efcfaf01c6b6c33c39e98c22a1934e8892e2147
2016-12-04 19:33:54 -05:00
Amit Mahajan
2643c6f7b8 Merge "SEPolicy changes for radio hal."
am: 65ad9bc1c3

Change-Id: I46623679450cd1fd1302698c1ea8a1f290bc6d16
2016-12-04 22:54:20 +00:00
Treehugger Robot
65ad9bc1c3 Merge "SEPolicy changes for radio hal." 2016-12-04 22:50:51 +00:00
Amit Mahajan
b435584603 SEPolicy changes for radio hal.
Test: none
Bug: 32020264
Change-Id: If5f22dad672895b3684b8e44209c5a1eae16ba47
2016-12-04 22:50:15 +00:00
Ray Essick
2932497ae0 Allow access to mediaanalytics service
am: 090f4a4d9f

Change-Id: Ib9481c4abc8cd9b5b58f87067e9d5803651d73c1
2016-12-03 15:28:29 +00:00
Jeff Sharkey
954fc0acf2 Allow system_server to measure emulated stats.
am: 17c675b327

Change-Id: I9b04ff4503a197e25538f0f77dc6b24888240a2c
2016-12-03 04:24:17 +00:00
Ray Essick
090f4a4d9f Allow access to mediaanalytics service
media framework analytics are gathered in a separate service.
define a context for this new service, allow various
media-related services and libraries to access this new service.

Bug: 30267133
Test: ran media CTS, watched for selinux denials.
Change-Id: I5aa5aaa5aa9e82465b8024f87ed32d6ba4db35ca
2016-12-03 00:06:20 +00:00
Robert Sesek
5af7c660cf Allow webview_zygote to stat /sys/kernel/debug/tracing/trace_marker.
Test: m
Test: angler boots

Bug: 21643067
Change-Id: I7530120385766506405a318caac8ef143e71cce7
2016-12-02 18:09:23 -05:00
Jeff Sharkey
17c675b327 Allow system_server to measure emulated stats.
Historically we pushed all system_server SD card interactions through
DefaultContainerService to avoid holding open FDs, but it's safe to
measure disk usage for internal emulated storage when looking
directly at /data/media, since there is no risk of unsafe ejection.

These rule changes give us just enough access to measure statistics.

avc: denied { getattr } for path="/data/media/0/DCIM/.thumbnails" dev="sda35" ino=589892 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0:c512,c768 tclass=dir permissive=1
avc: denied { open } for path="/data/media/0/DCIM/.thumbnails" dev="sda35" ino=589892 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0:c512,c768 tclass=dir permissive=1
avc: denied { read } for name="0" dev="sda35" ino=589827 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1

Test: builds, boots, and access allowed
Bug: 33298975
Change-Id: I9748608a5c1169d542e763c5a8f79c4f26f7a382
2016-12-02 13:16:05 -07:00
Max
2464a492b4 Merge "Added an auditallow rule to track vold remounting filesystems."
am: 685ef6b821

Change-Id: I8b1a5415261fcb6b939152ce2fe3b58b0353d1bd
2016-12-01 17:46:17 +00:00
Treehugger Robot
685ef6b821 Merge "Added an auditallow rule to track vold remounting filesystems." 2016-12-01 17:29:34 +00:00
Nick Kralevich
1780a627ae domain_deprecated.te: remove /proc/net access
am: dd649da84b

Change-Id: I648e8b2869b4b2d95255575e257f07f11153865d
2016-12-01 17:19:16 +00:00
Nick Kralevich
dd649da84b domain_deprecated.te: remove /proc/net access
Remove /proc/net access to domain_deprecated. Add it to domains where it
was missing before.

Other than these domains, SELinux denial monitoring hasn't picked up any
denials related to /proc/net

Bug: 28760354
Test: Device boots
Test: No unexpected denials in denial collection logs.
Change-Id: Ie5bfa4bc0070793c1e8bf3b00676fd31c08d426a
2016-11-30 15:23:26 -08:00
Steven Moreland
7aa5caf81c dumpstate: talk to vibrator hal
am: 839c7ded30

Change-Id: Ibbbc3e8e51cbe6a5e2f1e5be7839a1cc3341b33c
2016-11-30 05:38:13 +00:00
Max
314d8c5801 Added an auditallow rule to track vold remounting filesystems.
Vold shouldn't have this selinux permission, so this will be left in for
a few weeks to keep track of if removing it would be an issue to any
other processes. If not, then a follow-up CL will remove both the rule
and the auditallow

Test: This CL is a test in itself, auditallow rules shouldn't change
behavior of SELinux policy by themselves
Bug: 26901147
Change-Id: Ib076448863bd54278df59a3b514c9e877eb22ee5
2016-11-29 17:11:36 -08:00
Steven Moreland
839c7ded30 dumpstate: talk to vibrator hal
Bug: 33067126
Test: Dumpstate vibrator works.
Change-Id: I46ff453218ba77f156e13b448e3cba9a291df0e7
2016-11-29 15:44:40 -08:00
Daniel Rosenberg
e383684122 Merge "Allow sdcardd to remount sdcardfs"
am: 7b6dbd7360

Change-Id: I5ba0baabf29c67d6de10b673ae9948fdab7b78bd
2016-11-29 06:22:56 +00:00
Treehugger Robot
7b6dbd7360 Merge "Allow sdcardd to remount sdcardfs" 2016-11-29 06:15:34 +00:00
Connor O'Brien
3e2fed1a80 Merge "Add permissions for hal_boot"
am: 280ba8b712

Change-Id: I40ea119e77002f6d71a1b0125c9420c24fc54d49
2016-11-29 00:55:08 +00:00
Connor O'Brien
280ba8b712 Merge "Add permissions for hal_boot" 2016-11-29 00:49:20 +00:00
Daniel Rosenberg
df59b9f9f1 Allow sdcardd to remount sdcardfs
Sdcardfs now supports bind mounts and remounts
instead of needing several separate mounts

bug: 30954918
Test: Enable Sdcardfs, verify mounts
Change-Id: Id94713752a08ceeb6aea7d3c29a29d3293a9b0c8
2016-11-28 16:10:27 -08:00
William Roberts
191e8b3b2d Merge "zygote: drop braces on single item rule"
am: a8340521e5

Change-Id: I0dc7cdaacd65f027f8615e5201f9357001e5b40b
2016-11-28 18:34:42 +00:00
Treehugger Robot
a8340521e5 Merge "zygote: drop braces on single item rule" 2016-11-28 18:27:53 +00:00
Nick Kralevich
d9bd9e69fc Add directory read permissions to certain domains.
am: 49e3588429

Change-Id: Ib96dbc7f6467e55d595426242c59b9551e9ae75f
2016-11-28 17:12:36 +00:00
Nick Kralevich
49e3588429 Add directory read permissions to certain domains.
Addresses the following denials and auditallows:

avc: denied { read } for pid=561 comm="hwservicemanage" name="hw"
dev="dm-0" ino=1883 scontext=u:r:hwservicemanager:s0
tcontext=u:object_r:system_file:s0 tclass=dir permissive=0

avc: denied { read } for pid=748 comm="gatekeeperd" name="hw" dev="dm-0"
ino=1883 scontext=u:r:gatekeeperd:s0 tcontext=u:object_r:system_file:s0
tclass=dir permissive=0

avc: granted { read open } for pid=735 comm="fingerprintd"
path="/system/lib64/hw" dev="dm-0" ino=1883 scontext=u:r:fingerprintd:s0
tcontext=u:object_r:system_file:s0 tclass=dir

Test: no denials on boot
Change-Id: Ic363497e3ae5078e564d7195f3739a654860a32f
2016-11-28 17:03:41 +00:00
Nick Kralevich
3f77c683da Merge "system_server: Delete system_file:file execute_no_trans;"
am: 8fe7b8d2a7

Change-Id: I904920227113f9b8e43182a4b3ba22b191cceb64
2016-11-28 16:58:43 +00:00
Nick Kralevich
97aff6aefc Merge "Remove domain_deprecated from some domains."
am: 2affae65dc

Change-Id: I9f5c692674c60b526b0ed7ac2bc46610b9e3c5ab
2016-11-28 16:58:33 +00:00
Nick Kralevich
f42128af64 Merge "Delete more from domain_deprecated.te"
am: fae2794e44

Change-Id: Iba87329c6ae3de6ad95868a9237eec83fd76da05
2016-11-28 16:58:22 +00:00
Treehugger Robot
8fe7b8d2a7 Merge "system_server: Delete system_file:file execute_no_trans;" 2016-11-28 16:55:09 +00:00
Treehugger Robot
2affae65dc Merge "Remove domain_deprecated from some domains." 2016-11-28 16:52:21 +00:00
Treehugger Robot
fae2794e44 Merge "Delete more from domain_deprecated.te" 2016-11-28 16:51:25 +00:00
William Roberts
96385a7534 zygote: drop braces on single item rule
commit 221938cbee
introduces a fix that uses braces around a single item.
This is not within the normal style of no brace around
a single item. Drop the braces.

Change-Id: Ibeee1e682c0face97f18d5e5177be13834485676
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-28 08:07:25 -08:00
Nick Kralevich
067bdcfb61 Merge "Remove "eng" macro"
am: 03e74a2026

Change-Id: I168746eb6e2fded35d2da632731d4300522e0afd
2016-11-28 16:02:15 +00:00
Nick Kralevich
73ea360542 logd.te: Remove setting persist.sys. and sys.powerctl
am: 31e9f39f59

Change-Id: I763244982b9e104f3a2ef68a81609db0b5ca9f39
2016-11-28 16:02:02 +00:00
Treehugger Robot
03e74a2026 Merge "Remove "eng" macro" 2016-11-28 15:56:59 +00:00
Nick Kralevich
d070b67190 Remove "eng" macro
Never used.

Test: policy compiles.
Change-Id: I0ce6c46bb05925a4b3eda83531b28f873b0c9b99
2016-11-27 16:03:26 -08:00
Nick Kralevich
31e9f39f59 logd.te: Remove setting persist.sys. and sys.powerctl
As of system/core commit a742d1027784a54c535cff69b375a9f560893155, this
functionality is no longer used.

Test: device boots and no obvious problems.
Change-Id: Ia3ad8add92f1cdaaff36f4935be8b03458fed7f2
2016-11-27 15:34:18 -08:00
Nick Kralevich
0fa81a27a0 Remove domain_deprecated from some domains.
No denials showing up in collected audit logs.

Bug: 28760354
Test: Device boots
Test: No unexpected denials in denial collection logs.
Change-Id: I5a0d4f3c51d296bfa04e71fc226a01dcf5b5b508
2016-11-25 17:37:30 -08:00
Nick Kralevich
06da58b9ab Delete more from domain_deprecated.te
No unexpected usages.

Bug: 28760354
Test: Device boots
Test: No unexpected denials in denial collection logs.
Change-Id: I43226fd0b8103afb1b25b1eb21445c04bc79954e
2016-11-25 17:14:45 -08:00
Nick Kralevich
80659f5508 Merge "Move to ioctl whitelisting for /dev/pts/* files"
am: d1228f2e70

Change-Id: Ic825465ad7cf20ebe26cb1f0a4e6077bf3648ce9
2016-11-26 00:27:28 +00:00
Treehugger Robot
d1228f2e70 Merge "Move to ioctl whitelisting for /dev/pts/* files" 2016-11-26 00:23:49 +00:00
Nick Kralevich
55e86a3a34 system_server: Delete system_file:file execute_no_trans;
auditallow has been in place since Apr 2016
(f84b798151) and no SELinux denials have
been generated / collected. Remove unused functionality.

Test: Device boots with no problems.
Test: no SELinux denials of this type collected.
Bug: 28035297
Change-Id: I52414832abb5780a1645a4df723c6f0c758eb5e6
2016-11-25 16:20:34 -08:00
Nick Kralevich
07c3a5a522 Move to ioctl whitelisting for /dev/pts/* files
In particular, get rid of TIOCSTI, which is only ever used for exploits.

http://www.openwall.com/lists/oss-security/2016/09/26/14

Bug: 33073072
Bug: 7530569
Test: "adb shell" works
Test: "adb install package" works
Test: jackpal terminal emulator from
      https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
      works
Change-Id: I96b5e7059d106ce57ff55ca6e458edf5a4c393bf
2016-11-22 18:59:38 -08:00
Tao Bao
0733c2066f Merge "recovery.te: Allow writing to sysfs_devices_system_cpu."
am: 94d76c877b

Change-Id: I3d4343c5c1bc210253e24de8aeec192e331ffebb
2016-11-22 23:57:21 +00:00
Treehugger Robot
94d76c877b Merge "recovery.te: Allow writing to sysfs_devices_system_cpu." 2016-11-22 23:48:44 +00:00
Nick Kralevich
a824fa33ca neverallow some /proc file reads
am: 0b7506ff53

Change-Id: I8093d316ef2f0e5839073b88351bca4eace75b7b
2016-11-22 23:26:07 +00:00
Tao Bao
ee7960c05d recovery.te: Allow writing to sysfs_devices_system_cpu.
recovery (update_binary) may need to set up cpufreq during an update.

avc:  denied  { write } for  pid=335 comm="update_binary" name="scaling_max_freq" dev="sysfs" ino=7410 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file permissive=0

Bug: 32463933
Test: Build a recovery image and apply an OTA package that writes to
      /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq.

Change-Id: Ia90af9dd15e162dd94bcd4722b66aa296e3058c5
2016-11-22 14:03:25 -08:00
Nick Kralevich
0b7506ff53 neverallow some /proc file reads
Lock in the gains we've made so far in restricting access to generically
labeled /proc files. There's more we can do here, but let's avoid
inadvertent regressions.

Test: policy compiles. Only compile time assertions added.
Bug: 26813932
Change-Id: If354c2ddc1c59beed7f0eb4bcbd3f0d9971c3b8a
2016-11-22 13:18:02 -08:00
Nick Kralevich
1d18ef4486 access_vectors: Remove unused permission definitions
am: 11dc03e5a2

Change-Id: Ie2c7f871c47d378cc3b8399e174b229439511452
2016-11-22 01:39:56 +00:00
Nick Kralevich
11dc03e5a2 access_vectors: Remove unused permission definitions
Description stolen from
42a9699a9f

Remove unused permission definitions from SELinux.
Many of these were only ever used in pre-mainline
versions of SELinux, prior to Linux 2.6.0.  Some of them
were used in the legacy network or compat_net=1 checks
that were disabled by default in Linux 2.6.18 and
fully removed in Linux 2.6.30.

Permissions never used in mainline Linux:
file swapon
filesystem transition
tcp_socket { connectto newconn acceptfrom }
node enforce_dest
unix_stream_socket { newconn acceptfrom }

Legacy network checks, removed in 2.6.30:
socket { recv_msg send_msg }
node { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
netif { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }

Test: policy compiles and no boot errors (marlin)
Change-Id: Idaef2567666f80db39c3e3cee70e760e1dac73ec
2016-11-21 23:41:18 +00:00
Jorge Lucangeli Obes
2c2ee69500 Merge "Add WITH_DEXPREOPT_PIC to 'with_dexpreopt' SELinux macro."
am: f25e5550a7

Change-Id: I267d30094daf909158f720fa8e7c501e13a5ccc3
2016-11-21 23:28:38 +00:00
Treehugger Robot
f25e5550a7 Merge "Add WITH_DEXPREOPT_PIC to 'with_dexpreopt' SELinux macro." 2016-11-21 23:16:53 +00:00
Connor O'Brien
12443b7a51 Add permissions for hal_boot
The service running the boot control HAL needs the permissions
provided by the boot_control_hal attribute. update_engine and
update_verifier still also need these permissions in order
to successfully call the new HAL in pass-through mode, but also
need permission to call the new service.

Bug: 31864052
Test: Built and confirmed no permission denials.
Change-Id: I2a6fdd5cf79b9e461d7cc14bd5b7abd6481ed911
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-11-21 10:09:40 -08:00
Jorge Lucangeli Obes
2899434716 Add WITH_DEXPREOPT_PIC to 'with_dexpreopt' SELinux macro.
|WITH_DEXPREOPT_PIC = false| will still cause code to be loaded from
/data.

Bug: 32970029
Test: On HiKey and Marlin:
Test: Add |WITH_DEXPREOPT_PIC = false|, see SELinux denial.
Test: Apply this CL, no SELinux denials.
Change-Id: I0a1d39eeb4d7f75d84c1908b879d9ea1ccffba74
2016-11-21 11:57:08 -05:00
Nick Kralevich
b9566eff33 Collapse urandom_device into random_device
am: 5eadcb8cb1

Change-Id: I79ed60bfb69e16c0e55ff84583e0930a7adf7cb8
2016-11-21 16:41:26 +00:00
Nick Kralevich
f1f6f2ffaa domain_deprecated.te: delete stale permissions
am: f2de07529b

Change-Id: I198f91d03eb87d3fc707b67d50a9a363d94e066a
2016-11-21 16:41:15 +00:00
Nick Kralevich
5eadcb8cb1 Collapse urandom_device into random_device
urandom_device and random_device have the exact same security
properties. Collapse them into one type.

Test: device boots and /dev/urandom is labeled correctly.
Change-Id: I12da30749291bc5e37d99bc9422bb86cb58cec41
2016-11-21 16:37:07 +00:00
Nick Kralevich
f2de07529b domain_deprecated.te: delete stale permissions
auditallows have been in place for quite a while now, and nothing has
triggered. Let's do some cleanup!

Bug: 28760354
Test: device boots and no new denials
Test: SELinux denials collection has seen no instances of these
      permissions
Change-Id: I9293f8d8756c9db6307e344c32cd11b9e0183e7f
2016-11-20 08:34:02 -08:00
Daniel Micay
9ab5a2787a only permit text relocations in untrusted_app
am: dc083f596d

Change-Id: I38a2613d04dc0e59dc9e76dff39ab5ae9a024ae4
2016-11-20 15:16:55 +00:00
Daniel Micay
dc083f596d only permit text relocations in untrusted_app
The other domains either don't have the same backwards compatibility
issues (isolated_app) or are privileged components that are pretty much
part of the platform and can be expected to meet a higher standard.

It would be possible to expose a build option for disabling the ART JIT,
allowing conditional removal of execmem from some of these domains too
(ones not ever using the WebView, until that's always in isolated_app).

Bug: 20013628
Change-Id: Ic22513157fc8b958b2a3d60381be0c07b5252fa5
2016-11-20 15:10:34 +00:00
Jorge Lucangeli Obes
ff63c47d78 Merge "Use with_dexpreopt macro for zygote execute permissions."
am: 1eb00fb625

Change-Id: Iacfd0778591ebcc34f72c82d4ea4fcc3f7777ce7
2016-11-18 21:56:48 +00:00
Jorge Lucangeli Obes
1eb00fb625 Merge "Use with_dexpreopt macro for zygote execute permissions." 2016-11-18 21:52:07 +00:00
dcashman
7d25474624 Move hal_light to attribute.
am: 3319d5ee16

Change-Id: I6cd85d7fb4235cb2adb4eb0f598959cec52108d0
2016-11-18 19:29:36 +00:00
Jorge Lucangeli Obes
84db84e6cd Use with_dexpreopt macro for zygote execute permissions.
When WITH_DEXPREOPT is set, the zygote does not need to execute
dalvikcache_data_file objects.

Bug: 32970029
Test: Add policy line inside macro, build with and without WITH_DEXPREOPT.
Test: HiKey builds, boots, no zygote denials.
Change-Id: I4dace93e8044267232f0f26cfe427fc250d351fb
2016-11-18 14:22:37 -05:00
dcashman
3319d5ee16 Move hal_light to attribute.
HAL policy defines how the platform and a given HAL interact, but not how the
HAL is implemented.  This policy should be represented as an attribute that all
processes implementing the HAL can include.

Bug: 32123421
Test: Builds.
Change-Id: I17e5612c0835773c28e14f09e2ce7bdc3f210c15
2016-11-18 08:40:04 -08:00
Connor O'Brien
f142317a83 Merge "Revert "Move boot_control_hal attribute to hal_boot domain""
am: b44d2c9b7c

Change-Id: Ia43d948ce7b31336d90f188b6fb2578832be1fee
2016-11-18 04:28:34 +00:00
Treehugger Robot
b44d2c9b7c Merge "Revert "Move boot_control_hal attribute to hal_boot domain"" 2016-11-18 04:24:34 +00:00
Connor O'Brien
394ed93d90 Revert "Move boot_control_hal attribute to hal_boot domain"
This reverts commit 1f3294659d.

Bug: 32973182
Change-Id: Ic0277b38b0249710a4f1fc362e777f3880ff096b
2016-11-18 02:43:03 +00:00
Max Bires
a30f39cb58 Merge "Removed a duplicate rule."
am: 590d0e2418

Change-Id: I79e775df50badaf511d6fedc1cca60e39048b5dc
2016-11-17 23:57:38 +00:00
Max Bires
590d0e2418 Merge "Removed a duplicate rule." 2016-11-17 23:46:29 +00:00
Max
ca04f9b3c4 Removed a duplicate rule.
Test: Device boots
Change-Id: I151c5fb6f56850eaa215e1a917ac9ad609dbdd4a
2016-11-17 23:46:15 +00:00
Connor O'Brien
1dedd46d27 Merge "Move boot_control_hal attribute to hal_boot domain"
am: e1df51038e

Change-Id: I796889ba9eea3c4496ac581d5da2d383b08465ab
2016-11-17 19:32:42 +00:00
Connor O'Brien
e1df51038e Merge "Move boot_control_hal attribute to hal_boot domain" 2016-11-17 19:06:42 +00:00
Nick Kralevich
883d1a1893 shell.te: revoke syslog(2) access to shell user
am: c9630dc6a1

Change-Id: I81c7f5b62ad2b057a586148ff6ce4cc7654be98a
2016-11-17 15:33:38 +00:00
Nick Kralevich
c9630dc6a1 shell.te: revoke syslog(2) access to shell user
external/toybox commit a583afc812cf7be74ebab72294c8df485908ff04 started
having dmesg use /dev/kmsg, which is unreadable to the unprivileged
shell user. Revoke syslog(2) to the shell user for consistency.

The kernel dmesg log is a source of kernel pointers, which can leak
kASLR information from the kernel. Restricting access to kernel
information will make attacks against Android more difficult. Having
said that, dmesg information is still available from "adb bugreport", so
this change doesn't completely shutdown kernel info leaks.

This change essentially reverts us to the state we were in between Nov 8
2011 and May 27 2014. During that almost 3 year period, the unprivileged
shell user was unable to access dmesg, and there was only one complaint
during that time.

References:
* https://android.googlesource.com/platform/system/core/+/f9557fb
* https://android.googlesource.com/platform/system/sepolicy/+/f821b5a

TODO: Further unify /dev/kmsg permissions with syslog_read permissions.

Test: policy compiles, no dmesg output
Change-Id: Icfff6f765055bdbbe85f302b781aed2568ef532f
2016-11-16 10:22:51 -08:00
Alex Deymo
1f3294659d Move boot_control_hal attribute to hal_boot domain
Grant boot_control_hal permissions to the hal_boot service;
update_engine and update_verifier can call that service rather
than using those permissions themselves.

Bug: 31864052
Test: `bootctl set-active-boot-slot 1`
Change-Id: I5188bc32e7933d4a0f5135b3246df119d3523d69
2016-11-15 15:12:41 -08:00
Nick Kralevich
bbf21a4ffe Merge "exclude su from app auditallow"
am: 747c69f43c

Change-Id: I780f075beb031516bd4c2ce292c1fd1a2beaa5ac
2016-11-15 22:50:03 +00:00
Nick Kralevich
506cae4729 isolated_app: allow access to pre-opened sdcard FDs
am: c121735f42

Change-Id: I3db269a6629b4f246939acc139e99d274ddd6b81
2016-11-15 22:49:51 +00:00
Treehugger Robot
747c69f43c Merge "exclude su from app auditallow" 2016-11-15 22:40:49 +00:00
Nick Kralevich
e0d5c5323d exclude su from app auditallow
su is an appdomain, and as such, any auditallow statements applicable to
appdomain also apply to su. However, su is never enforced, so generating
SELinux denials for such domains is pointless. Exclude su from
ion_device auditallow rules.

Addresses the following auditallow spam:

  avc: granted { ioctl } for comm="screencap" path="/dev/ion" dev="tmpfs"
  ino=10230 ioctlcmd=4906 scontext=u:r:su:s0
  tcontext=u:object_r:ion_device:s0 tclass=chr_file

Test: policy compiles
Change-Id: I2e783624b9e53ad365669bd6f2d4db40da475a16
2016-11-15 13:17:42 -08:00
Nick Kralevich
c121735f42 isolated_app: allow access to pre-opened sdcard FDs
Allow isolated apps to read/write/append/lock already open sdcard
file descriptors passed to it by normal app processes. isolated_apps are
used by processes like Google drive when handling untrusted content.

Addresses the following denial:

  audit(0.0:1508): avc: denied { read } for
  path="/storage/emulated/0/Download/02-corejava.pdf" dev="fuse" ino=310
  scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:fuse:s0
  tclass=file permissive=0

This partially reverts the tightening added in
ce4b5eeaee.

Add a TODO to consider removing isolated_apps ability to write or append
to files on the sdcard. This limits the damage that can occur should the
isolated_app process be compromised.

Bug: 32896414
Test: Policy compiles. Rule add only, so no possibility of breakage.
Change-Id: Ia128569608fc9c872c90e6c380106b7c81eb7b6f
2016-11-15 12:58:06 -08:00
Daichi Hirono
00020b8edf Allow apps to search appfuse mount point and open a file on appfuse mount point.
am: 4c7044e0b1

Change-Id: Ifd25505c9c2f679b5ace565f9b26e681c54572e6
2016-11-15 03:11:57 +00:00
Daichi Hirono
4c7044e0b1 Allow apps to search appfuse mount point and open a file on appfuse mount point.
Bug: 29970149
Test: None
Change-Id: I59f49f3bf20d93effde5e1a9a3c1ed64fbecb7a8
2016-11-15 10:22:19 +09:00
Chad Brubaker
5fa5ffe1c8 Merge "Allow ephemeral apps network connections"
am: 41301ab74b

Change-Id: Ibf5f1cc6fdd65d35300afaaf73daa963e18baed1
2016-11-14 22:02:49 +00:00
Connor O'Brien
57a25f9c25 Merge "Allow update_verifier to use boot HIDL HAL"
am: 353244451f

Change-Id: I204db093f2bc787e6a1a137b9dd4e7b998b1f617
2016-11-14 22:02:38 +00:00
Treehugger Robot
41301ab74b Merge "Allow ephemeral apps network connections" 2016-11-14 21:53:15 +00:00
Connor O'Brien
353244451f Merge "Allow update_verifier to use boot HIDL HAL" 2016-11-14 21:53:07 +00:00
Chad Brubaker
4abf491a9e Allow ephemeral apps network connections
Test: Verify that HTTP and HTTPS connections from ephemeral apps do not
cause denials.
Change-Id: I0ce25602906e63ec55d5b5869445f2aec10900cb
2016-11-14 12:24:51 -08:00
Chia-I Wu
cc15b4ce63 Add sepolicy for hwcomposer HAL
am: fb08872a40

Change-Id: I739ce0035d0a0d22987aae2d67ea9553f43efbad
2016-11-14 01:54:33 +00:00
Chia-I Wu
aeb6d5bfcb Add sepolicy for gralloc-alloc HAL
am: dd958e5a21

Change-Id: Iad2857dd8d282353281ca0018c478b74d2f98db9
2016-11-14 01:54:31 +00:00
Chia-I Wu
fb08872a40 Add sepolicy for hwcomposer HAL
Allow SurfaceFlinger to call into IComposer, and vice versa for
IComposerCallback.

Specifically,

hwbinder_use(...) for
avc: denied { call } for scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
avc: denied { transfer } for scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1

binder_call(..., surfaceflinger) for
avc: denied { call } for scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:surfaceflinger:s0 tclass=binder permissive=1

allow ... gpu_device:chr_file rw_file_perms for
avc: denied { read write } for name="kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
avc: denied { open } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 ioctlcmd=940 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1

allow ... ion_device:chr_file r_file_perms for
avc: denied { ioctl } for path="/dev/ion" dev="tmpfs" ino=15014 ioctlcmd=4900 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1

allow ... graphics_device ... for
avc: denied { ioctl } for path="/dev/graphics/fb0" dev="tmpfs" ino=15121 ioctlcmd=5380 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file permissive=1

allow ... ...:fd use for
avc: denied { use } for path="anon_inode:dmabuf" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:hal_graphics_allocator_service:s0 tclass=fd permissive=1
avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:bootanim:s0 tclass=fd permissive=1
avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:surfaceflinger:s0 tclass=fd permissive=1
avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:platform_app:s0:c512,c768 tclass=fd permissive=1

binder_call(surfaceflinger, ...) for
avc: denied { call } for scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=binder permissive=1
avc: denied { transfer } for scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=binder permissive=1
avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 ioctlcmd=3e02 scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=fd permissive=1
avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=fd permissive=1

allow bootanim ...:fd use for
avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=11947 scontext=u:r:bootanim:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=fd permissive=1

Bug: 32021609
Test: make bootimage
Change-Id: I036cdbebf0c619fef7559f294f1865f381b17588
2016-11-14 01:10:02 +00:00
Chia-I Wu
dd958e5a21 Add sepolicy for gralloc-alloc HAL
Allow SurfaceFlinger to call into IAllocator, and allow everyone to access
IAllocator's fd.

Specifically,

hwbinder_use(...) for
avc: denied { call } for scontext=u:r:hal_graphics_allocator:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
avc: denied { transfer } for scontext=u:r:hal_graphics_allocator:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1

allow ... ion_device:chr_file r_file_perms for
avc: denied { read } for name="ion" dev="tmpfs" ino=15014 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
avc: denied { open } for path="/dev/ion" dev="tmpfs" ino=15014 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
avc: denied { ioctl } for path="/dev/ion" dev="tmpfs" ino=15014 ioctlcmd=4900 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1

allow ... gpu_device:chr_file rw_file_perms; for
avc: denied { read write } for name="kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
avc: denied { open } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 ioctlcmd=940 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1

binder_call(surfaceflinger, ...) for
avc: denied { call } for scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_allocator:s0 tclass=binder permissive=1

allow ... ...:fd use for
avc: denied { use } for path="anon_inode:dmabuf" dev="anon_inodefs" ino=12794 scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_allocator:s0 tclass=fd permissive=1

Bug: 32021161
Test: make bootimage
Change-Id: Ie7700142313407ac438c43dd1a85544dc4c67f13
2016-11-14 01:09:51 +00:00
Chad Brubaker
7ece155217 Label ephemeral APKs and handle their install/uninstall
am: 6f090f6911

Change-Id: I97d83d29f28fb04500f30bd29c4a316f3bbb7ee0
2016-11-12 00:36:35 +00:00
Chad Brubaker
6f090f6911 Label ephemeral APKs and handle their install/uninstall
Fixes: 32061937
Test: install/uninstall and verified no denials
Change-Id: I487727b6b32b1a0fb06ce66ed6dd69db43c8d536
2016-11-12 00:27:28 +00:00
Nick Kralevich
b1985a8498 property.te: delete security_prop
am: ee751c33c5

Change-Id: I2acdab95a5d2302a10ed6cf57c0705edc480bc6c
2016-11-11 22:44:33 +00:00
Nick Kralevich
ee751c33c5 property.te: delete security_prop
This property is never used.

Test: policy compiles
Change-Id: I43ace92950e1221754db28548031fbbfc0437d7a
2016-11-11 12:31:19 -08:00
Nick Kralevich
4778d65665 Merge "property.te: sort entries"
am: 7da34af860

Change-Id: Ifee77468b2596cc3570abfa276e3ba23dcf2c2e4
2016-11-11 17:27:09 +00:00
Treehugger Robot
7da34af860 Merge "property.te: sort entries" 2016-11-11 17:20:33 +00:00
Robert Sesek
d94ae33832 Add the "webview_zygote" domain.
am: dc43f7cd84

Change-Id: I5f2e21e9ea3a85c8f0cb4b8e15ae54a54eb9e1ab
2016-11-11 15:30:00 +00:00
Robert Sesek
dc43f7cd84 Add the "webview_zygote" domain.
The webview_zygote is a new unprivileged zygote and has its own sockets for
listening to fork requests. However the webview_zygote does not run as root
(though it does require certain capabilities) and only allows dyntransition to
the isolated_app domain.

Test: m
Test: angler boots

Bug: 21643067
Change-Id: I89a72ffe6dcb983c4a44048518efd7efb7ed8e83
2016-11-11 10:13:17 -05:00
Nick Kralevich
26c6d726dd property.te: sort entries
Sort the entries in property.te. This will make it slightly easier to
read, and avoids merge conflicts by discouraging the common practice of
adding entries to the bottom of this file.

Test: policy compiles.
Change-Id: I87ae96b33156dba73fb7eafc0f9a2a961b689853
2016-11-11 02:44:51 -08:00
Jason Monk
829672f098 Add persist.vendor.overlay. to properties
am: 0e1cbf568a

Change-Id: Ic60dfc5a0caf4cd43c2fdc25c44f58eaacf4fd66
2016-11-11 00:07:08 +00:00
Jason Monk
0e1cbf568a Add persist.vendor.overlay. to properties
Allow the system_server to change. Allow the zygote to read it as well.

Test: Have system_server set a property
Change-Id: Ie90eec8b733fa7193861026a3a6e0fb0ba5d5318
2016-11-10 17:35:39 -05:00
Connor O'Brien
b24e69dca8 Allow update_verifier to use boot HIDL HAL
Test: Flashed device and verified no update_verifier permission denials
Change-Id: I5de063c202aefef399645b153f68ff7909989eba
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-11-09 11:16:16 -08:00
Nick Kralevich
b2245d6420 Revert "Restore system_server ioctl socket access."
am: 58305da980

Change-Id: I9379e8a7d52d6daccfadae4c0e2b19ee43f1932b
2016-11-09 01:33:12 +00:00
Nick Kralevich
58305da980 Revert "Restore system_server ioctl socket access."
The underlying ioctl denial was fixed in device-specific policy.
It's not needed in core policy.

A search of SELinux denials shows no reported denials, other than the
ones showing up on marlin.

This reverts commit ec3285cde0.

(cherrypicked from commit 863ce3e7c7)

Test: AndroiTS GPS Test app shows GPS data, no SELinux denials.
Bug: 32290392
Change-Id: I1ba7bad43a2cdd7cdebbe1c8543a71eee765621d
2016-11-08 12:40:44 -08:00
Nick Kralevich
d62abbeea3 profman/debuggerd: allow libart_file:file r_file_perms
am: 364fd19782

Change-Id: I4022ab4a4f92a197c48db96a9847cc8166ed2dab
2016-11-08 20:08:38 +00:00
Nick Kralevich
364fd19782 profman/debuggerd: allow libart_file:file r_file_perms
Addresses the following auditallow spam:

avc: granted { read open } for comm="profman"
path="/system/lib/libart.so" dev="dm-0" ino=1368 scontext=u:r:profman:s0
tcontext=u:object_r:libart_file:s0 tclass=file

avc: granted { read open } for comm="debuggerd64"
path="/system/lib64/libart.so" dev="dm-0" ino=1897
scontext=u:r:debuggerd:s0 tcontext=u:object_r:libart_file:s0 tclass=file

avc: granted { getattr } for comm="debuggerd64"
path="/system/lib64/libart.so" dev="dm-0" ino=1837
scontext=u:r:debuggerd:s0 tcontext=u:object_r:libart_file:s0 tclass=file

Test: Policy compiles. Not a tightening of rules.
Change-Id: I501b0a6a343c61b3ca6283647a18a9a15deddf2a
2016-11-08 09:28:28 -08:00
Polina Bondarenko
458888a7d3 sepolicy: Add policy for thermal HIDL service
am: 9785f2addd

Change-Id: I2543991deefb4ba16ef0476e92442cfadba25793
2016-11-08 15:13:48 +00:00
Polina Bondarenko
9785f2addd sepolicy: Add policy for thermal HIDL service
Bug: 32022261
Test: manual
Change-Id: I664a3b5c37f6a3a36e4e5beb91b384a9599c83f8
2016-11-08 13:34:31 +01:00
Nick Kralevich
b8b0d3746f installd: r_dir_file(installd, system_file)
am: 68f233648e

Change-Id: I3dbbe8bc411dfb530e1363ad563db2dbdbfc1736
2016-11-08 03:25:38 +00:00
Nick Kralevich
68f233648e installd: r_dir_file(installd, system_file)
Allow installd to read through files, directories, and symlinks
on /system. This is needed to support installd using files in
/system/app and /system/priv-app

Addresses the following auditallow spam:

avc: granted { getattr } for comm="installd"
path="/system/app/Bluetooth/lib/arm/libbluetooth_jni.so"
dev="mmcblk0p41" ino=19 scontext=u:r:installd:s0
tcontext=u:object_r:system_file:s0 tclass=lnk_file

avc: granted { getattr } for comm="installd"
path="/system/priv-app/MtpDocumentsProvider/lib/arm64/libappfuse_jni.so"
dev="dm-0" ino=2305 scontext=u:r:installd:s0
tcontext=u:object_r:system_file:s0 tclass=lnk_file

avc: granted { read open } for comm="installd"
path="/system/priv-app/TelephonyProvider" dev="mmcblk0p43" ino=1839
scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0 tclass=dir

avc: granted { read } for comm="installd" name="Velvet" dev="mmcblk0p43"
ino=1841 scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0
tclass=dir

avc: granted { read open } for comm="installd"
path="/system/priv-app/GoogleOneTimeInitializer" dev="mmcblk0p43"
ino=1778 scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0
tclass=dir

avc: granted { read open } for comm="installd"
path="/system/app/PlayAutoInstallConfig" dev="mmcblk0p43" ino=112
scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0 tclass=dir

Test: policy compiles
Change-Id: I5d14ea2cd7d281f949d0651b9723d5b7fae2e1f2
2016-11-07 16:18:38 -08:00
Roshan Pius
fd637d065f Merge "wpa.te: Add binder permission back"
am: b0c375d46d

Change-Id: I592ed31123b505a1863b514ff6acb98b2771ee41
2016-11-07 23:39:02 +00:00
Treehugger Robot
b0c375d46d Merge "wpa.te: Add binder permission back" 2016-11-07 23:28:35 +00:00
Roshan Pius
cec44a61ba wpa.te: Add binder permission back
Adding back the binder permission to access keystore from
wpa_supplicant. This was removed by mistake in the previous patch
(commit#: 6caeac) to add hwbinder permissions.

Denials in logs:
11-03 14:37:54.831  9011  9011 I auditd  : type=1400 audit(0.0:1490):
avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:54.831  9011  9011 W wpa_supplicant: type=1400
audit(0.0:1490): avc: denied { call } for scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:55.838  9011  9011 I ServiceManager: Waiting for service
android.security.keystore...
11-03 14:37:55.834  9011  9011 I auditd  : type=1400 audit(0.0:1491):
avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:55.834  9011  9011 W wpa_supplicant: type=1400
audit(0.0:1491): avc: denied { call } for scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:56.838  9011  9011 I ServiceManager: Waiting for service
android.security.keystore...
11-03 14:37:56.834  9011  9011 I auditd  : type=1400 audit(0.0:1492):
avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:56.834  9011  9011 W wpa_supplicant: type=1400
audit(0.0:1492): avc: denied { call } for scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:57.839  9011  9011 I ServiceManager: Waiting for service
android.security.keystore...
11-03 14:37:57.834  9011  9011 I auditd  : type=1400 audit(0.0:1493):
avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
11-03 14:37:57.834  9011  9011 W wpa_supplicant: type=1400
audit(0.0:1493): avc: denied { call } for scontext=u:r:wpa:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=0

Bug: 32655747
Test: Compiles. Will send for integration testing.
Change-Id: Ic57a5bf0e6ea15770efc0d09f68d04b2db9ec1b8
2016-11-07 12:51:07 -08:00
Etan Cohen
2143eab887 Merge "[NAN-AWARE] Remove NAN service"
am: 0182a87dab

Change-Id: Iae511c7d37b80cb142ed2bafa8232920acc7c6ca
2016-11-06 22:01:22 +00:00
Etan Cohen
0182a87dab Merge "[NAN-AWARE] Remove NAN service" 2016-11-06 21:56:05 +00:00
Etan Cohen
66502077a9 Merge "[NAN-AWARE] Add Aware service"
am: 8da9cd640b

Change-Id: I3b249385f40083bc598784e0b27b91d42fdec16b
2016-11-05 04:06:07 +00:00
Etan Cohen
8da9cd640b Merge "[NAN-AWARE] Add Aware service" 2016-11-05 04:00:40 +00:00
Etan Cohen
43b96aaf12 [NAN-AWARE] Remove NAN service
Finish NAN -> Aware rename process. Removes old NAN service.

Bug: 32263750
Test: device boots and all Wi-Fi unit-tests pass
Change-Id: I2f0d9595efea2494b56074752194e7a6e66070f2
2016-11-04 13:38:14 -07:00
Etan Cohen
44527cb970 [NAN-AWARE] Add Aware service
Add Aware service - new name for NAN. But do not remove NAN
yet. Enables smooth transition.

Bug: 32263750
Test: device boots and all Wi-Fi unit-tests pass
Change-Id: Ieb9f1ebf1d2f31ee27f228562b4601023da5282d
2016-11-04 13:37:17 -07:00
dcashman
84992ead69 Restore system_server ioctl socket access.
am: ec3285cde0

Change-Id: Id926897e8a5d72771dddbda3fbe06cbe6302be7d
2016-11-04 05:16:16 +00:00
dcashman
ec3285cde0 Restore system_server ioctl socket access.
Bug: 32290392
Test: Builds.
Change-Id: I46e8af202b41131cfc9bb280f04a214859c9b0de
2016-11-03 19:36:11 -07:00
Ruchi Kandoi
bd85244dbc hal_memtrack: Add sepolicy for memtrack service.
am: 0a924a6e1a

Change-Id: I7038ee63b1c662f226a3a1fdc5fc1ea905b667df
2016-11-04 00:16:28 +00:00
Ruchi Kandoi
77a862665c hal_power: Add sepolicy for power service.
am: 3c30c4e2db

Change-Id: I9393144a4aa777dcf71571f0f4b659d2ea495524
2016-11-04 00:16:26 +00:00
Ruchi Kandoi
0a924a6e1a hal_memtrack: Add sepolicy for memtrack service.
Bug: 31180823
Test: reduced sepolicy errors
Change-Id: Ibfba2efa903adec340e37abec2afb3b94a262678
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-11-03 13:05:48 -07:00
Ruchi Kandoi
3c30c4e2db hal_power: Add sepolicy for power service.
Bug: 31177288
Test: reduced sepolicy errors
Change-Id: I29556276ee14c341ac8f472875e6b69f903851ff
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-11-03 13:01:48 -07:00
Steven Moreland
cdd1bd76fa Sepolicy for light hal.
am: 1ec710c8ff

Change-Id: Idec0f4922dac7b12a909e83ce963806de78653b7
2016-11-01 23:40:27 +00:00
Steven Moreland
1ec710c8ff Sepolicy for light hal.
Bug: 32022100
Test: end to end
Change-Id: I5dd9b64c98a5c549fdaf9e47d5a92fa6963370c7
2016-11-01 21:30:51 +00:00
Dianne Hackborn
33619e31de Allow new settings system service.
am: 11877133ba

Change-Id: I379cb009d5a47f3c52a69cca1a80321a9e9859b5
2016-11-01 21:30:34 +00:00
Felipe Leme
517a9ed1e3 Merge "Added permissions for the dumpstate service."
am: ae9d3c0c31

Change-Id: Ic15a4bfac6fd0bad7325eaae311150b057e4da0d
2016-11-01 21:18:49 +00:00
Dianne Hackborn
11877133ba Allow new settings system service.
Test: N/A
Change-Id: Ib3c85118bf752152f5ca75ec13371073fc2873cc
2016-11-01 21:16:56 +00:00
Treehugger Robot
ae9d3c0c31 Merge "Added permissions for the dumpstate service." 2016-11-01 21:13:31 +00:00
Jorge Lucangeli Obes
52dd15a0c1 Merge "init: Allow SETPCAP for dropping bounding set."
am: 02c8383521

Change-Id: Ia923906119e34aa64c8a81fa53b8b53b4dc4af46
2016-11-01 20:28:16 +00:00
Treehugger Robot
02c8383521 Merge "init: Allow SETPCAP for dropping bounding set." 2016-11-01 20:23:14 +00:00
Jorge Lucangeli Obes
847bfa4ab2 init: Allow SETPCAP for dropping bounding set.
This is required for https://android-review.googlesource.com/#/c/295748
so that init can drop the capability bounding set for services.

Bug: 32438163
Test: With 295748 and a test service using ambient capabilities.
Change-Id: I57788517cfe2ef0e7a2f1dfab94d0cb967ede065
2016-11-01 14:32:13 -04:00
Felipe Leme
b5f5931e8c Added permissions for the dumpstate service.
- Allow dumpstate to create the dumpservice service.
- Allow System Server and Shell to find that service.
- Don't allow anyone else to create that service.
- Don't allow anyone else to find that service.

BUG: 31636879
Test: manual verification
Change-Id: I642fe873560a2b123e6bafde645467d45a5f5711
2016-11-01 10:43:25 -07:00
Nick Kralevich
a9aac6a9bf Merge "system_server: allow appendable file descriptors"
am: 184851a212

Change-Id: Iea91ab9bd1cc9c45cb1efdc0db0d42d4cda9630d
2016-10-31 15:55:34 +00:00