Commit graph

2801 commits

Author SHA1 Message Date
android-build-team Robot
d8d7a3f7cc Merge "Never expand proc_type attribute" into pi-dev 2018-05-03 14:29:48 +00:00
Jeff Vander Stoep
db6218417c Never expand proc_type attribute
It's used in build-time tests and in CTS.

Bug: 78898770
Test: build user-build
Change-Id: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
(cherry picked from commit beeb122405070a5b4cee326a0cdae92a1a791fbc)
2018-05-02 15:00:55 -07:00
Andrew Sapperstein
b12ca61e9c Merge "Add ro.oem.key1 to SELinux policy." into pi-dev 2018-05-02 21:10:41 +00:00
android-build-team Robot
9d4573c448 Merge changes Ic3f85992,I33f47db7 into pi-dev
* changes:
  Sepolicy: Modify postinstall_dexopt
  Sepolicy: Modify postinstall_dexopt
2018-05-02 18:52:02 +00:00
Andrew Sapperstein
99bfd8efdf Add ro.oem.key1 to SELinux policy.
vendor-init-settable|public-readable

Change-Id: I8262cc03150931080c0982350cd990ee8f5422bc
Fixes: 78636965
Test: adb shell getprop ro.oem.key1
2018-05-02 11:48:30 -07:00
Jaekyun Seok
d097ff9516 Allow vendor-init-settable for properties used in Android TV
The following properties will be whitelisted.
- ro.hdmi.device_type, ro.hdmi.wake_on_hotplug and
persist.sys.hdmi.keep_awake for hdmi
- ro.sf.disable_triple_buffer for SurfaceFlinger
- media.stagefright.cache-params and persist.sys.media.avsync for
nuplayer

Bug: 78205669
Bug: 78430613
Test: succeeded building
Change-Id: I5ee1a1de72c265bca87aa041c6acd9554f5f8c07
Merged-In: I5ee1a1de72c265bca87aa041c6acd9554f5f8c07
(cherry picked from commit 18aaaad937)
2018-05-02 07:41:52 +09:00
Pavel Maltsev
811113e8b5 Merge "Revert "Allow auto HAL clients to access hw services"" into pi-dev 2018-05-01 20:28:14 +00:00
Pavel Maltsev
87ac80b874 Revert "Allow auto HAL clients to access hw services"
This reverts commit aa38ce7279.

Reason for revert: broken build

Change-Id: Ib6ca328576ef180fd1150ae6d6b3f90e928a07ac
2018-05-01 20:05:41 +00:00
android-build-team Robot
20d4069aea Merge "Allow auto HAL clients to access hw services" into pi-dev 2018-05-01 18:59:54 +00:00
Andreas Gampe
b5c927184f Sepolicy: Modify postinstall_dexopt
Grant fsetid as it was done for installd. Suppress write to
profile files.

(cherry picked from commit 006e160b1a)

Bug: 77958490
Test: m
Test: manual
Merged-In: I33f47db7c16f0eda41ffdb526cf43f8fa9484c62
Change-Id: I33f47db7c16f0eda41ffdb526cf43f8fa9484c62
2018-05-01 10:47:21 -07:00
android-build-team Robot
fc865e4b8e Merge "Allow profman to resolve symlinks on dirs" into pi-dev 2018-05-01 00:34:17 +00:00
Calin Juravle
9e80bfc880 Allow profman to resolve symlinks on dirs
When opening the dex files we sometime need to check for the real location
of the file (even if it was open via an fd).

Denial example:

avc: denied { getattr } for comm="profman" path="/data/app" dev="sda13"
ino=1048577 scontext=u:r:profman:s0 tcontext=u:object_r:apk_data_file:s0
tclass=dir permissive=0

Test: verify we get no denials when taking a profile snapshot.
Bug: 77922323
Change-Id: Ifa5570656c644819d14f46af74e4c15e903a8a54
2018-04-30 14:56:34 -07:00
android-build-team Robot
bbb500d705 Merge "Adding labeling for vendor security patch prop am: 5cac1aa99c am: ad3602d262" into pi-dev 2018-04-30 20:42:38 +00:00
Pavel Maltsev
aa38ce7279 Allow auto HAL clients to access hw services
Bug: 70637118
Test: m && emulator ; also verified on bat_land
Change-Id: I5d78eaf53f7df32837f113c14786f483955a8ac2
2018-04-29 12:56:33 -07:00
android-build-team Robot
26ee5a8590 Merge "Move automotive HALs sepolicy to system/" into pi-dev 2018-04-27 22:11:56 +00:00
android-build-team Robot
e5059b176f Merge "Adding ability for keystore to find dropbox" into pi-dev 2018-04-27 20:31:30 +00:00
Max Bires
d2d91e60de Adding ability for keystore to find dropbox
This will allow the logging in keystore to actually work.

Bug: 36549319
Test: keystore dropbox logging is successful
Change-Id: Ic135fa9624c289c54187e946affbd0caacef13c1
(cherry picked from commit 2e69afc079)
2018-04-26 16:14:24 +00:00
Max Bires
30d80f0c1c Adding labeling for vendor security patch prop am: 5cac1aa99c
am: ad3602d262

Test: Vendor security patch prop is properly labeled
Bug: 76428542
Change-Id: I034f2f2c9eab3667cfa92ea41b4b5f4afa1c7df7
Merged-In: I034f2f2c9eab3667cfa92ea41b4b5f4afa1c7df7
(cherry picked from commit 15a9fbc277)
2018-04-26 01:36:23 +00:00
Chia-I Wu
f16afc094d Make persist.sys.sf.native_mode an integer
This allows for more native modes.

Bug: 73824924
Test: adb shell setprop persist.sys.sf.native_mode 2
Change-Id: Iffdeadc8dc260de4b0c7f2b46aab08d64d25e3b1
Merged-In: Iffdeadc8dc260de4b0c7f2b46aab08d64d25e3b1
2018-04-25 11:35:51 -07:00
Paul Crowley
1fb3bfba78 Merge "Add metadata_file class for root of metadata folder." into pi-dev 2018-04-24 17:32:52 +00: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
Pavel Maltsev
394dbe34a0 Move automotive HALs sepolicy to system/
Bug: 70637118
Test: build, flash and boot bat_land and owl automotive builds

Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
2018-04-23 15:46:41 -07: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
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
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
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
Paul Crowley
5f79b334ff Add metadata_file class for root of metadata folder.
Bug: 77335096
Test: booted device with metadata encryption and without
Change-Id: I5bc5d46deb4e91912725c4887fde0c3a41c9fc91
2018-04-20 11:14:49 -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
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
TreeHugger Robot
8ace003930 Merge "init: lock down access to keychord_device" into pi-dev 2018-04-18 18:56:32 +00:00
Tom Cherry
4f0a21cca8 Merge "Allow vendor_init to access unencrypted_data_file" into pi-dev 2018-04-18 17:37:23 +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
TreeHugger Robot
ae0b835c58 Merge "Sepolicy for rw mount point for vendors." into pi-dev 2018-04-17 19:16:56 +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
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
TreeHugger Robot
7b90367a7b Merge "Add exFAT support; unify behind "sdcard_type"." into pi-dev 2018-04-16 23:15:22 +00: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
Jeff Sharkey
b469c30069 Add exFAT support; unify behind "sdcard_type".
We're adding support for OEMs to ship exFAT, which behaves identical
to vfat.  Some rules have been manually enumerating labels related
to these "public" volumes, so unify them all behind "sdcard_type".

Test: atest
Bug: 67822822
Change-Id: I09157fd1fc666ec5d98082c6e2cefce7c8d3ae56
2018-04-16 12:49:10 -06:00
Tri Vo
210a805b46 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
2018-04-16 11:07:40 -07:00
Jeff Vander Stoep
fde3e6a0f7 tombstoned: allow unlinking anr files
Tombstoned unlinks "trace_XX" files if there are too many of them.

avc: denied { unlink } for comm="tombstoned" name="trace_12"
scontext=u:r:tombstoned:s0 tcontext=u:object_r:anr_data_file:s0
tclass=file

Bug: 77970585
Test: Build/boot taimen. adb root; sigquit an app.

(cherry picked from commit eb8f938fd4)

Change-Id: I2f29d12f747d688f8f4e06b48cf72c5109adc2ae
2018-04-16 12:51:35 +01:00
TreeHugger Robot
c9523bd47c Merge "Make traced_probes mlstrustedsubject." into pi-dev 2018-04-13 17:07:30 +00:00
Tom Cherry
1f6018ea62 Allow vendor_init to write to misc_block_device
Vendors may use this to write custom messages to their bootloader, and
as the bootloader is under vendor control, this makes sense to allow.

Bug: 77881566
Test: build
Merged-In: I78f80400e5f386cad1327a9209ee1afc8e334e56
Change-Id: I78f80400e5f386cad1327a9209ee1afc8e334e56
(cherry picked from commit db465285cf)
2018-04-13 10:00:06 -07:00
Jaekyun Seok
a11b16c9ee Whitelist vendor-init-settable bluetooth_prop and wifi_prop
Values of the following properties are set by SoC vendors on some
devices including Pixels.
- persist.bluetooth.a2dp_offload.cap
- persist.bluetooth.a2dp_offload.enable
- persist.vendor.bluetooth.a2dp_offload.enable
- ro.bt.bdaddr_path
- wlan.driver.status

So they should be whitelisted for compatibility.

Bug: 77633703
Test: succeeded building and tested with Pixels
Change-Id: Ib2b81bcc1fd70ddd571dc7fb2b923b576d62b7d5
Merged-In: Ib2b81bcc1fd70ddd571dc7fb2b923b576d62b7d5
(cherry picked from commit 224921d18a)
2018-04-13 11:08:48 +09:00