Commit graph

8350 commits

Author SHA1 Message Date
Connor O'Brien
ff023a75d5 Merge "Revert "Move boot_control_hal attribute to hal_boot domain"" am: b44d2c9b7c am: f142317a83 am: 944c661fb9
am: 1d070a5b20

Change-Id: I493014ed6c7f65628249fc132ad6a5edcf1f1a32
2016-11-18 04:37:04 +00:00
Connor O'Brien
1d070a5b20 Merge "Revert "Move boot_control_hal attribute to hal_boot domain"" am: b44d2c9b7c am: f142317a83
am: 944c661fb9

Change-Id: I071c8e52635b5bf0c4b240a32d4c22378e056676
2016-11-18 04:34:04 +00:00
Connor O'Brien
944c661fb9 Merge "Revert "Move boot_control_hal attribute to hal_boot domain"" am: b44d2c9b7c
am: f142317a83

Change-Id: I89e32f17f562a75c9061348ea35bfdde06ac2ea2
2016-11-18 04:31:04 +00: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
b3c13df6d2 Merge "Removed a duplicate rule." am: 590d0e2418 am: a30f39cb58 am: 948c6cca51
am: 050982c7b4

Change-Id: I14ca5c1851da6b0acd72f265d24900ac7b4a406b
2016-11-18 00:43:15 +00:00
Max Bires
050982c7b4 Merge "Removed a duplicate rule." am: 590d0e2418 am: a30f39cb58
am: 948c6cca51

Change-Id: I9d5f8af3cf4fcc528e0e5a3da88a549b8c14dade
2016-11-18 00:27:43 +00:00
Max Bires
948c6cca51 Merge "Removed a duplicate rule." am: 590d0e2418
am: a30f39cb58

Change-Id: Iea80b880dfc806d5e33a0e81f7916bfec4a80c70
2016-11-18 00:12:42 +00:00
Max Bires
a30f39cb58 Merge "Removed a duplicate rule."
am: 590d0e2418

Change-Id: I79e775df50badaf511d6fedc1cca60e39048b5dc
2016-11-17 23:57:38 +00:00
Eric Bae
79dced3417 allow policy to create a file by vfat (fs_type) for a case using sdcardfs am: adf210d654 am: c6c8da3777 am: f43135fd4c am: b2930607ca am: bc1b4c0326 am: 8fc0265277
am: 536752f9fd

Change-Id: Id9c86833aa7ae3c4a8b05cb3e328a716d0c06d4d
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
Eric Bae
536752f9fd allow policy to create a file by vfat (fs_type) for a case using sdcardfs am: adf210d654 am: c6c8da3777 am: f43135fd4c am: b2930607ca am: bc1b4c0326
am: 8fc0265277

Change-Id: I73b75235143d089f0f042c9b08da6691c627082c
2016-11-17 23:42:09 +00:00
Eric Bae
8fc0265277 allow policy to create a file by vfat (fs_type) for a case using sdcardfs am: adf210d654 am: c6c8da3777 am: f43135fd4c am: b2930607ca
am: bc1b4c0326

Change-Id: Idc427ee345bc28bfc7a36d018dd102278c610d77
2016-11-17 23:27:36 +00:00
Eric Bae
bc1b4c0326 allow policy to create a file by vfat (fs_type) for a case using sdcardfs am: adf210d654 am: c6c8da3777 am: f43135fd4c
am: b2930607ca

Change-Id: I7ab37535f7a471712e5511dc0917cbf68bb7a1d5
2016-11-17 23:12:06 +00:00
Eric Bae
b2930607ca allow policy to create a file by vfat (fs_type) for a case using sdcardfs am: adf210d654 am: c6c8da3777
am: f43135fd4c

Change-Id: Ia01ca88536362fe910808f33a445fc5c8c54b77f
2016-11-17 22:57:05 +00:00
Eric Bae
f43135fd4c allow policy to create a file by vfat (fs_type) for a case using sdcardfs am: adf210d654
am: c6c8da3777

Change-Id: I2dcb374609183a4460891c936757319d91064682
2016-11-17 22:42:03 +00:00
Eric Bae
c6c8da3777 allow policy to create a file by vfat (fs_type) for a case using sdcardfs
am: adf210d654

Change-Id: I0386db7e81ed5e6a6c032adb1173163f45ad726e
2016-11-17 22:27:29 +00:00
Connor O'Brien
9fe95aa9de Merge "Move boot_control_hal attribute to hal_boot domain" am: e1df51038e am: 1dedd46d27 am: 61f3fe1bed
am: 05d03dd736

Change-Id: Icd88ebec27eb7aad1a9c57a4832d0985720f5c30
2016-11-17 19:55:20 +00:00
Connor O'Brien
05d03dd736 Merge "Move boot_control_hal attribute to hal_boot domain" am: e1df51038e am: 1dedd46d27
am: 61f3fe1bed

Change-Id: I5279628f96b9caf12f4ec8ab13afea7f2b36a7c9
2016-11-17 19:45:43 +00:00
Connor O'Brien
61f3fe1bed Merge "Move boot_control_hal attribute to hal_boot domain" am: e1df51038e
am: 1dedd46d27

Change-Id: I306f748d596217010b3f42470e0e117497a1174e
2016-11-17 19:38:06 +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
1ba5d893a8 shell.te: revoke syslog(2) access to shell user am: c9630dc6a1 am: 883d1a1893 am: b58b14b569
am: d121c1fade

Change-Id: I9b2baa5f496f75bbd13eece81675648290ee9a82
2016-11-17 16:03:33 +00:00
Nick Kralevich
d121c1fade shell.te: revoke syslog(2) access to shell user am: c9630dc6a1 am: 883d1a1893
am: b58b14b569

Change-Id: Ic980f9ad6a24d7d55e28996885524e8b7b662f0c
2016-11-17 15:49:12 +00:00
Nick Kralevich
b58b14b569 shell.te: revoke syslog(2) access to shell user am: c9630dc6a1
am: 883d1a1893

Change-Id: If4781c1e2a9c15e4735fcff0212d898a87191bf2
2016-11-17 15:41:40 +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
Nick Kralevich
d7dce6de61 Merge "exclude su from app auditallow" am: 747c69f43c am: bbf21a4ffe am: 3e24c640ca
am: 78860bcde4

Change-Id: I559a86860d9e7358b9ccf23cfdff34b27867752e
2016-11-15 23:50:25 +00:00
Nick Kralevich
22f980e402 isolated_app: allow access to pre-opened sdcard FDs am: c121735f42 am: 506cae4729 am: 7089d2bbdd
am: 2ef8483264

Change-Id: Id207d184bae87cf6f0d4b68eec5576f33de978f3
2016-11-15 23:50:13 +00:00
Daichi Hirono
ae710af62f Allow apps to search appfuse mount point and open a file on appfuse mount point. am: 4c7044e0b1 am: 00020b8edf am: 6a6744c72a
am: 54bc9b46b0

Change-Id: Ibbc6e0b32865567695263cf47abb9dd26871661f
2016-11-15 23:50:02 +00:00
Chad Brubaker
e9724ae81a Merge "Allow ephemeral apps network connections" am: 41301ab74b am: 5fa5ffe1c8 am: 41496cd47f
am: ee3116a5ad

Change-Id: I55cd83937c7830ddf3aa6c36d7849c729c6cf91f
2016-11-15 23:49:49 +00:00
Connor O'Brien
bfce62caa1 Merge "Allow update_verifier to use boot HIDL HAL" am: 353244451f am: 57a25f9c25 am: 448859b20c
am: b8bbf5f2bb

Change-Id: I1f89f833253b8cdc04d4f5db5251353b3b0b4eed
2016-11-15 23:49:36 +00:00
Nick Kralevich
027bf8e60d resolve merge conflicts of 833485b to master
Test: policy compiles
Change-Id: I709b0b8c74b25671a1e6509802131459348deb40
2016-11-15 15:38:27 -08:00
Nick Kralevich
c6ea0b45b4 resolve merge conflicts of 837a6f2 to master
Test: manualmerge
Change-Id: Ibe49e8397f0f8ea8be677ab0ae9c52e2a5feb9a5
2016-11-15 15:27:21 -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
78860bcde4 Merge "exclude su from app auditallow" am: 747c69f43c am: bbf21a4ffe
am: 3e24c640ca

Change-Id: I71252738b4bc2dfee727c900e651ee7724dbc833
2016-11-15 23:05:35 +00:00
Nick Kralevich
2ef8483264 isolated_app: allow access to pre-opened sdcard FDs am: c121735f42 am: 506cae4729
am: 7089d2bbdd

Change-Id: I4b819ce27c807c4d1b228129df18ee847deaa8f8
2016-11-15 23:05:23 +00:00
Nick Kralevich
3e24c640ca Merge "exclude su from app auditallow" am: 747c69f43c
am: bbf21a4ffe

Change-Id: I744421bb3872552287578791af1f7f8ad7949e5f
2016-11-15 22:57:33 +00:00
Nick Kralevich
7089d2bbdd isolated_app: allow access to pre-opened sdcard FDs am: c121735f42
am: 506cae4729

Change-Id: Ifd22fba7d7481627a51e328963fcd2219a5b2b45
2016-11-15 22:57:23 +00: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
54bc9b46b0 Allow apps to search appfuse mount point and open a file on appfuse mount point. am: 4c7044e0b1 am: 00020b8edf
am: 6a6744c72a

Change-Id: Ibef1dee340f5054f6c0a9c60d1232b5228994638
2016-11-15 03:25:58 +00:00
Daichi Hirono
6a6744c72a Allow apps to search appfuse mount point and open a file on appfuse mount point. am: 4c7044e0b1
am: 00020b8edf

Change-Id: Ibb0b783e686cb04c48ea39ca74e8d8adc1cc0384
2016-11-15 03:18:27 +00: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