Commit graph

2953 commits

Author SHA1 Message Date
Paul Crowley
67861bcc03 Add metadata_file class for root of metadata folder. am: 42bd1638bf
am: b494ab07fb

Change-Id: I25139c13561468d585814daa2f79b35a390730ee
2018-04-24 10:41:23 -07:00
Wei Wang
5154fc1fb2 Merge "Allow dumpstate to kill dumpstate vendor HAL in timeout case" into pi-dev
am: d45dfbff95

Change-Id: I90a0270b7820073bcee257f5a11c1d2407f8d841
2018-04-23 21:27:17 -07:00
Wei Wang
d45dfbff95 Merge "Allow dumpstate to kill dumpstate vendor HAL in timeout case" into pi-dev 2018-04-24 04:24:04 +00:00
Wei Wang
60d1767459 Allow dumpstate to kill dumpstate vendor HAL in timeout case
Bug: 77489941
Test: simulate delay in dumpstate HAL and get BR, see below from dumpstate_log.txt
    dumpstateBoard timed out after 10s, killing dumpstate vendor HAL
    dumpstateBoard failed: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: '
Change-Id: I90ed5cb8fe8da8ad21ae77676433936cb12d9d04
2018-04-23 14:41:25 -07:00
Paul Crowley
42bd1638bf Add metadata_file class for root of metadata folder.
Bug: 77335096
Test: booted device with metadata encryption and without
Change-Id: I5bc5d46deb4e91912725c4887fde0c3a41c9fc91
2018-04-23 14:14:49 -07:00
Lalit Maganti
00c8e3d95a sepolicy: allow shell to read/write traced prop
This is to fix the CTS failures given by the bugs below where devices
where traced is not enabled by default causes test failures.

(cherry picked from commit 673b4db777)

Bug: 78215159
Bug: 78347829
Change-Id: Ib0f6a1cdb770528dbbeb857368534ff5040e464e
2018-04-23 16:18:34 +00:00
Lalit Maganti
917d7d74ef sepolicy: allow shell to read/write traced prop am: 673b4db777
am: 45e5338233

Change-Id: I6aa1a6e91b5c3ff3869ed3dd60c5569aff16662a
2018-04-23 03:28:10 -07:00
Lalit Maganti
673b4db777 sepolicy: allow shell to read/write traced prop
This is to fix the CTS failures given by the bugs below where devices
where traced is not enabled by default causes test failures.

Bug: 78215159
Bug: 78347829
Change-Id: Ib0f6a1cdb770528dbbeb857368534ff5040e464e
2018-04-23 09:55:04 +00:00
Jeff Vander Stoep
3c2f89044d Merge "vendor_init: allow stat() of /data dir" into pi-dev
am: 1050e7e82f

Change-Id: I7e45828ff4365a2de259d2677cf4044a24d727d3
2018-04-20 14:48:52 -07:00
TreeHugger Robot
1050e7e82f Merge "vendor_init: allow stat() of /data dir" into pi-dev 2018-04-20 21:41:28 +00:00
Petri Gynther
683a60bd43 A2DP offload: switch to new properties
Bug: 63932139
Bug: 76201991
Test: Manual A2DP testing (A2DP offload enabled and disabled)
Change-Id: Icebb4a84cf241b3b6bc52e4826fdedd5a73d796a
Merged-In: Icebb4a84cf241b3b6bc52e4826fdedd5a73d796a
2018-04-20 14:11:11 -07:00
Tianjie Xu
1affab2200 Merge "Allow dumpstate to read the update_engine logs" into pi-dev 2018-04-20 20:09:00 +00:00
Tianjie Xu
c9962ca2b3 Merge "Allow dumpstate to read the update_engine logs" am: ebddc5993f
am: 6210924b1a

Change-Id: Ia8429966d4e6d9980b2a4d3a29a92b46c8e85635
2018-04-20 13:05:54 -07:00
Tianjie Xu
ebddc5993f Merge "Allow dumpstate to read the update_engine logs" 2018-04-20 19:52:45 +00:00
Jeff Vander Stoep
6f8d2628b3 vendor_init: allow stat() of /data dir
avc: denied { getattr } for path="/data" scontext=u:r:vendor_init:s0
tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=1

Bug: 78345561
Test: build/boot device. Denial is gone.
Change-Id: Ie858f1fe65aeb1845b00a5143c345e81aa2ec632
2018-04-20 12:51:44 -07:00
Tianjie Xu
4af699ae3e Allow dumpstate to read the update_engine logs
Denial message:
avc: denied { read } for pid=2775 comm="dumpstate" name="update_engine_log"
dev="sda35" ino=3850274 scontext=u:r:dumpstate:s0
tcontext=u:object_r:update_engine_log_data_file:s0 tclass=dir permissive=0

Bug: 78201703
Test: take a bugreport
Change-Id: I2c788c1211812aa0fcf58cee37a6e8f955424849
(cherry picked from commit 7d47427997)
2018-04-20 10:40:51 -07:00
Petri Gynther
d5a59777d0 A2DP offload: switch to new properties am: 820656a73f
am: 93cba01663

Change-Id: I30e24decb0d730d096784049cbe3b98607dac8c8
2018-04-20 00:55:56 -07:00
Petri Gynther
820656a73f A2DP offload: switch to new properties
Bug: 63932139
Bug: 76201991
Test: Manual A2DP testing (A2DP offload enabled and disabled)
Change-Id: Icebb4a84cf241b3b6bc52e4826fdedd5a73d796a
2018-04-19 11:30:07 -07:00
Jaekyun Seok
0146653530 Neverallow unexpected domains to access bluetooth_prop and wifi_prop am: 41e42d63fe
am: c822ec3e58

Change-Id: Ib6afbbf00989994c7aaf78d91a911b9766c59ab6
2018-04-18 18:03:07 -07:00
Jaekyun Seok
dce86b3cc6 Neverallow unexpected domains to access bluetooth_prop and wifi_prop
And this CL will remove unnecessary vendor-init exceptions for nfc_prop
and radio_prop as well.

Bug: 77633703
Test: succeeded building and tested with Pixels
Change-Id: I468b8fd907c6408f51419cfb58eb2b8da29118ae
Merged-In: I468b8fd907c6408f51419cfb58eb2b8da29118ae
(cherry picked from commit 41e42d63fe)
2018-04-19 09:51:02 +09:00
Jaekyun Seok
41e42d63fe Neverallow unexpected domains to access bluetooth_prop and wifi_prop
And this CL will remove unnecessary vendor-init exceptions for nfc_prop
and radio_prop as well.

Bug: 77633703
Test: succeeded building and tested with Pixels
Change-Id: I468b8fd907c6408f51419cfb58eb2b8da29118ae
2018-04-19 08:22:26 +09:00
Tom Cherry
09ade7fce4 Merge "Allow vendor_init to access unencrypted_data_file" 2018-04-18 22:08:57 +00:00
Jeff Vander Stoep
df6d77cd45 Protect dropbox service data with selinux am: 4d3ee1a5b6
am: 1874950d21

Change-Id: Id2e5359054ae6d1882b0c99011ee09d1b75fa604
2018-04-18 15:05:34 -07:00
Jeff Vander Stoep
4d3ee1a5b6 Protect dropbox service data with selinux
Create a new label for /data/system/dropbox, and neverallow direct
access to anything other than init and system_server.

While all apps may write to the dropbox service, only apps with
android.permission.READ_LOGS, a signature|privileged|development
permission, may read them. Grant access to priv_app, system_app,
and platform_app, and neverallow access to all untrusted_apps.

Bug: 31681871
Test: atest CtsStatsdHostTestCases
Test: atest DropBoxTest
Test: atest ErrorsTests
Change-Id: Ice302b74b13c4d66e07b069c1cdac55954d9f5df
2018-04-18 19:53:03 +00:00
Tom Cherry
620dc7f814 Allow vendor_init to access unencrypted_data_file
FBE needs to access these files to set up or verify encryption for
directories during mkdir.

Bug: 77850279
Test: walleye + more restrictions continues to have FBE work
Change-Id: I84e201436ce4531d36d1257d932c3e2e772ea05e
(cherry picked from commit 18a284405f)
2018-04-18 19:39:04 +00:00
TreeHugger Robot
8ace003930 Merge "init: lock down access to keychord_device" into pi-dev 2018-04-18 18:56:32 +00:00
Tom Cherry
95bcffaa45 Merge "Allow vendor_init to access unencrypted_data_file" into pi-dev
am: 4f0a21cca8

Change-Id: I5962ef88fd66889724bafa938bede39581318bfb
2018-04-18 10:47:57 -07:00
Tom Cherry
4f0a21cca8 Merge "Allow vendor_init to access unencrypted_data_file" into pi-dev 2018-04-18 17:37:23 +00:00
Tianjie Xu
7d47427997 Allow dumpstate to read the update_engine logs
Denial message:
avc: denied { read } for pid=2775 comm="dumpstate" name="update_engine_log"
dev="sda35" ino=3850274 scontext=u:r:dumpstate:s0
tcontext=u:object_r:update_engine_log_data_file:s0 tclass=dir permissive=0

Bug: 78201703
Test: take a bugreport
Change-Id: I2c788c1211812aa0fcf58cee37a6e8f955424849
2018-04-18 06:54:39 +00:00
Tom Cherry
18a284405f Allow vendor_init to access unencrypted_data_file
FBE needs to access these files to set up or verify encryption for
directories during mkdir.

Bug: 77850279
Test: walleye + more restrictions continues to have FBE work
Change-Id: I84e201436ce4531d36d1257d932c3e2e772ea05e
2018-04-17 15:21:32 -07:00
Mark Salyzyn
8daacf64f1 init: lock down access to keychord_device
The out-of-tree keychord driver is only intended for use by init.

Test: build
Bug: 64114943
Bug: 78174219
Change-Id: I96a7fbcd9a54a38625063606f5c4ab6d40d701f6
2018-04-17 14:04:24 -07:00
Tri Vo
8c1a1b2472 Sepolicy for rw mount point for vendors.
Bug: 64905218
Test: device boots with /mnt/vendor present and selinux label
mnt_vendor_file applied correctly.
Change-Id: Ib34e2859948019d237cf2fe8f71845ef2533ae27
Merged-In: Ib34e2859948019d237cf2fe8f71845ef2533ae27
(cherry picked from commit 210a805b46)
2018-04-17 21:04:15 +00:00
Tri Vo
5fd38baf04 Merge "Sepolicy for rw mount point for vendors." into pi-dev
am: ae0b835c58

Change-Id: I72eb24a252571974b8732facf500a6f23eb9ccf1
2018-04-17 13:42:27 -07:00
Mark Salyzyn
b79e00ac52 Merge "init: lock down access to keychord_device" am: 53cabd6c35
am: 27696cae57

Change-Id: If252f78e4acccfafc7f46ec9d1c2556d66480523
2018-04-17 13:09:38 -07:00
Treehugger Robot
53cabd6c35 Merge "init: lock down access to keychord_device" 2018-04-17 19:59:58 +00:00
Treehugger Robot
cc23e48f9f Merge "Make traced_probes mlstrustedsubject." 2018-04-17 19:47:58 +00:00
TreeHugger Robot
ae0b835c58 Merge "Sepolicy for rw mount point for vendors." into pi-dev 2018-04-17 19:16:56 +00:00
Mark Salyzyn
f14f735455 init: lock down access to keychord_device
The out-of-tree keychord driver is only intended for use by init.

Test: build
Bug: 64114943
Bug: 78174219
Change-Id: I96a7fbcd9a54a38625063606f5c4ab6d40d701f6
2018-04-17 11:24:35 -07:00
Florian Mayer
4378ba7c84 Make traced_probes mlstrustedsubject.
Denials:
04-12 12:42:47.795   903   903 W traced_probes: type=1400 audit(0.0:5684): avc: denied { search } for name="1376" dev="proc" ino=204553 scontext=u:r:traced_probes:s0 tcontext=u:r:untrusted_app_27:s0:c512,c768 tclass=dir permissive=0
04-12 12:42:47.795   903   903 W traced_probes: type=1400 audit(0.0:5685): avc: denied { search } for name="1402" dev="proc" ino=204554 scontext=u:r:traced_probes:s0 tcontext=u:r:platform_app:s0:c512,c768 tclass=dir permissive=0
04-12 12:42:47.801   903   903 W traced_probes: type=1400 audit(0.0:5686): avc: denied { search } for name="1496" dev="proc" ino=204557 scontext=u:r:traced_probes:s0 tcontext=u:r:untrusted_app:s0:c85,c256,c512,c768 tclass=dir permissive=0
04-12 12:42:47.805   903   903 W traced_probes: type=1400 audit(0.0:5687): avc: denied { search } for name="1758" dev="proc" ino=204563 scontext=u:r:traced_probes:s0 tcontext=u:r:priv_app:s0:c512,c768 tclass=dir permissive=0

Bug: 77955286

Change-Id: If0985d3ddd7d14c2b139be1c842c9c8df99b90db
Merged-In: If0985d3ddd7d14c2b139be1c842c9c8df99b90db
2018-04-17 18:12:28 +00:00
TreeHugger Robot
1f4037f23a Merge "Selinux: Give lmkd read access to /proc/meminfo" into pi-dev 2018-04-17 16:58:17 +00:00
TreeHugger Robot
f03783609f Merge "Let vold_prepare_subdirs completely clean deleted user data." into pi-dev 2018-04-17 15:44:13 +00:00
Suren Baghdasaryan
f7010ab109 Selinux: Give lmkd read access to /proc/meminfo
Allow lmkd read access to /proc/meminfo for retrieving information
on memory state.

Bug: 75322373
Change-Id: I7cf685813a5a49893c8f9a6ac4b5f6619f3c18aa
Merged-In: I7cf685813a5a49893c8f9a6ac4b5f6619f3c18aa
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit 76384b3ee0)
2018-04-17 15:27:52 +00:00
TreeHugger Robot
c8a58767bb Merge "Allow dumpstate to read property_type" into pi-dev 2018-04-17 01:44:50 +00:00
Joel Galenson
1a4c83a856 Let vold_prepare_subdirs completely clean deleted user data. am: 254a872cab
am: 397c854db6

Change-Id: I635703793fe5b980087900aa8cfcaacb402c101f
2018-04-16 17:03:10 -07:00
Joel Galenson
2bae5b9693 Let vold_prepare_subdirs completely clean deleted user data.
After adding a new user, deleting it, and rebooting, some of the user's data still remained.  This adds the SELinux permissions necessary to remove all of the data.  It fixes the followign denials:

avc: denied { rmdir } for scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
avc: denied { unlink } for scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=file

Bug: 74866238
Test: Create user, delete user, reboot user, see no denials or
leftover data.

Change-Id: Ibc43bd2552b388a9708bf781b5ad206f21df62dc
(cherry picked from commit 254a872cab)
2018-04-16 16:40:52 -07:00
Joel Galenson
254a872cab Let vold_prepare_subdirs completely clean deleted user data.
After adding a new user, deleting it, and rebooting, some of the user's data still remained.  This adds the SELinux permissions necessary to remove all of the data.  It fixes the followign denials:

avc: denied { rmdir } for scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
avc: denied { unlink } for scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=file

Bug: 74866238
Test: Create user, delete user, reboot user, see no denials or
leftover data.

Change-Id: Ibc43bd2552b388a9708bf781b5ad206f21df62dc
2018-04-16 16:39:43 -07:00
TreeHugger Robot
7b90367a7b Merge "Add exFAT support; unify behind "sdcard_type"." into pi-dev 2018-04-16 23:15:22 +00:00
Jaekyun Seok
c3ef1e7b45 Allow dumpstate to read property_type am: 4de238e9b9
am: dfb48cf6fc

Change-Id: I4a5516f694a72624ce353a00b4dd0df0f14ebff6
2018-04-16 16:13:38 -07:00
Jaekyun Seok
f99c74ccf8 Allow dumpstate to read property_type
dumpstate needs to read all the system properties for debugging.

Bug: 77277669
Test: succeeded building and tested with taimen
Change-Id: I3603854b3be67d4fc55d74f7925a21bfa59c81ee
Merged-In: I3603854b3be67d4fc55d74f7925a21bfa59c81ee
(cherry picked from commit 4de238e9b9)
2018-04-17 07:44:05 +09:00
TreeHugger Robot
6991a930e1 Merge "Allow vendor_init to write to misc_block_device" into pi-dev 2018-04-16 22:01:16 +00:00