Commit graph

368 commits

Author SHA1 Message Date
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
yro
cd3c5d816e Merge "Setting up sepolicies for statsd planB of listening to its own socket" into pi-dev
am: 51baefaf2c

Change-Id: I7f7627dadec376fe82a3054eda990dfca08d4cd9
2018-04-20 19:57:19 -07:00
yro
93c16bda16 Setting up sepolicies for statsd planB of listening to its own socket
Test: manual
Bug: 78318738

Change-Id: Ifa1cbbfdbb5acb713dfeb1d4bf98d1e116e5a89b
2018-04-20 13:57:54 -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
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
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
TreeHugger Robot
ae0b835c58 Merge "Sepolicy for rw mount point for vendors." into pi-dev 2018-04-17 19:16:56 +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 Sharkey
ea3997beab Merge "Add exFAT support; unify behind "sdcard_type"." am: ba89007178
am: ff0369ad4c

Change-Id: I3d323c85ff019824be74fa6887b0578f308e6251
2018-04-14 16:28:52 -07:00
Jeff Sharkey
000cafc701 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-13 14:08:10 -06:00
Jaekyun Seok
296734312e Whitelist vendor-init-settable bluetooth_prop and wifi_prop am: 224921d18a
am: 21026c55f9

Change-Id: If61c950aad21beb7887f4fc833c27906624abc1e
2018-04-12 19:36:08 -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
Jaekyun Seok
224921d18a 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
2018-04-13 09:25:06 +09:00
Tri Vo
fad493bff9 Add internal types to 27.0[.ignore].cil.
Bug: 69390067
Test: manual run of treble_sepolicy_tests
Change-Id: I1b772a3f7c96875765c75bfc1031f249411c3338
Merged-In: I1b772a3f7c96875765c75bfc1031f249411c3338
(cherry picked from commit 9fbd65200d)
2018-04-11 08:02:06 +09:00
Max Bires
15a9fbc277 Adding labeling for vendor security patch prop am: 5cac1aa99c
am: ad3602d262

Change-Id: I034f2f2c9eab3667cfa92ea41b4b5f4afa1c7df7
2018-04-10 12:38:45 -07:00
Max Bires
5cac1aa99c Adding labeling for vendor security patch prop
This will allow adb shell getprop ro.vendor.build.security_patch to
properly return the correct build property, whereas previously it was
offlimits due to lack of label.

Test: adb shell getprop ro.vendor.build.security_patch successfully
returns whatever VENDOR_SECURITY_PATCH is defined to be in the Android
.mk files

Change-Id: Ie8427738125fc7f909ad8d51e4b76558f5544d49
2018-04-09 15:34:42 -07:00
Jeff Vander Stoep
e8db0b37ad Merge "Rename qtaguid_proc to conform to name conventions" am: 38a84cf8da
am: d093691cda

Change-Id: Ie6ffba47ea2164260d60115a738c57f0e47f04be
2018-04-03 21:53:11 -07:00
Jeff Vander Stoep
bdf2a9c417 Rename qtaguid_proc to conform to name conventions
Test: build
Bug: 68774956
Change-Id: I0f9fd87eb41e67e14f35e49eba13e3d1de745250
2018-04-03 14:47:38 -07:00
Jeff Vander Stoep
3aa7ca56fd Add untrusted_app_27
This is a partial cherry pick of commit 6231b4d9
'Enforce per-app data protections for targetSdk 28+'.

Untrusted_app_27 remains unreachable, but it's existence
prevents future merge conflicts.

Bug: 63897054
Test: build/boot aosp_walleye-userdebug
Change-Id: I64b013874fe87b55f47e817a1279e76ecf86b7c0
Merged-In: I64b013874fe87b55f47e817a1279e76ecf86b7c0
(cherry picked from commit 6231b4d9fc)
2018-04-03 12:25:51 -07:00
Pawin Vongmasa
514dde5170 Merge "Put in sepolicies for Codec2.0 services" into pi-dev
am: eaee65f043

Change-Id: I2f4c80d5cf5616f39e1659e23d4d162c84dcfb00
2018-03-30 19:05:15 +00:00
Pawin Vongmasa
4be2889477 Put in sepolicies for Codec2.0 services
Test: Builds

Bug: 64121714
Bug: 31973802
Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73
2018-03-29 04:42:25 -07:00
Jaekyun Seok
588d49712c Merge "Allow vendor-init-settable to persist.radio.multisim.config" am: c22f971195
am: 66a8672393

Change-Id: I87d4691d6a80de7304b1bba71d7b51266dc2d496
2018-03-28 04:10:01 +00:00
Jaekyun Seok
7d3bd8dbc3 Allow vendor-init-settable to persist.radio.multisim.config
A default value of persist.radio.multisim.config can be set by SoC
vendors, and so vendor-init-settable should be allowed to it.

Bug: 73871799
Test: succeeded building and tested with taimen
Change-Id: Ie62b91e7e3d7e05425b742838417f1cab7b3fed4
Merged-In: Ie62b91e7e3d7e05425b742838417f1cab7b3fed4
(cherry picked from commit ac8c6e3d44)
2018-03-28 12:55:30 +09:00
Jaekyun Seok
ac8c6e3d44 Allow vendor-init-settable to persist.radio.multisim.config
A default value of persist.radio.multisim.config can be set by SoC
vendors, and so vendor-init-settable should be allowed to it.

Bug: 73871799
Test: succeeded building and tested with taimen
Change-Id: Ie62b91e7e3d7e05425b742838417f1cab7b3fed4
2018-03-27 13:41:47 +09:00
Primiano Tucci
5dc527e18d Revert "Allow system server to set persist.traced.enable" am: 4f673cf4a9
am: 078ac38049

Change-Id: If6046cc4c3e70cc2f7c501d3095e5c8a56e773fd
2018-03-26 18:06:58 +00:00
Primiano Tucci
4f673cf4a9 Revert "Allow system server to set persist.traced.enable"
This reverts commit 6f2040f873.

Reason for revert: not needed anymore after ag/3773705
This was meant to allow system_server toggling the property on/off.
Later we realized that we needed a separate property for that 
(see discussion in b/76077784) and system server happens to
have already permissions to write to sys.* properties even without
this CL.
Reverting because at this point this creates just unnecessary clutter.

Change-Id: Ia73d000aad3c4288a5652047dfe10896e231b0b1
Test: perfetto_integrationtests
Bug: 76077784
2018-03-26 17:48:11 +00:00
Primiano Tucci
bace65b287 Fix selinux brekage on user for atrace am: 6824024183
am: 0c45e03a42

Change-Id: I4d13d99b6404481d055933bd454f82773ab6d10d
2018-03-22 11:09:47 +00:00
Primiano Tucci
f3fd4d6bf8 Reland: perfetto: allow traced_probes to execute atrace
This CL adds the SELinux permissions required to execute
atrace and get userspace tracing events from system services.
This is to enable tracing of events coming from surfaceflinger,
audio HAL, etc.
atrace, when executed, sets a bunch of debug.atrace. properties
and sends an IPC via binder/hwbinder to tell the services to
reload that property.

This CL does NOT affect systrace. In that case (i.e. when
atrace is executed from adb/shell) atrace still runs in
the shell domain and none of those changes apply.

Change-Id: I11b096d5c5c5593f18bce87f06c1a7b1ffa7910e
Merged-In: I11b096d5c5c5593f18bce87f06c1a7b1ffa7910e
Merged-In: Iba195d571aec9579195d79d4970f760e417608c6
Bug: b/73340039
2018-03-22 11:00:49 +00:00
Primiano Tucci
6824024183 Fix selinux brekage on user for atrace
Follow up to aosp/635599. It broke user builds again
despite being tree hugged because of b/74344625.
Adding missing ignore entries.

Bug: b/73340039
Change-Id: Iba195d571aec9579195d79d4970f760e417608c6
2018-03-22 10:46:44 +00:00
Fyodor Kupolov
c5b15872ac Merge "Added SELinux policy for BinderCallsStatsService" into pi-dev 2018-03-21 23:02:58 +00:00
Fyodor Kupolov
624dc30de4 Added SELinux policy for BinderCallsStatsService
Test: manual
Bug: 75318418
Merged-In: I700c1b8b613dba1c99f4fbffdd905c0052c1b2e7
Change-Id: I700c1b8b613dba1c99f4fbffdd905c0052c1b2e7
2018-03-21 00:50:33 +00:00
Fyodor Kupolov
19106e82f3 Merge "Added SELinux policy for BinderCallsStatsService" am: 7b49e73716
am: b50eed45a6

Change-Id: I0759e39cce175d5899eaee67e27931b2ae93824f
2018-03-20 23:21:26 +00:00
Fyodor Kupolov
05675aa94c Added SELinux policy for BinderCallsStatsService
Test: manual
Bug: 75318418
Change-Id: I700c1b8b613dba1c99f4fbffdd905c0052c1b2e7
2018-03-20 21:51:17 +00:00
Hector Dearman
9b403e34c7 Merge "Allow system server to set persist.traced.enable" am: 3bf4f641fe
am: d0e3ffdbdb

Change-Id: I114b24f6cdbadaff553afa0de60184bd2f72bea2
2018-03-20 11:37:28 +00:00
Hector Dearman
6f2040f873 Allow system server to set persist.traced.enable
To enable/disable the traced and traced_probes deamons remotely we would
like system server to be able to set persist.traced.enable.
See also ag/3736001.

Denial:
selinux: avc: denied { set } for
property=persist.traced.enable
pid=1606 uid=1000 gid=1000
scontext=u:r:system_server:s0
tcontext=u:object_r:default_prop:s0 tclass=property_service
permissive=0\x0a

Run:
$ adb shell 'ps -A | grep traced'
Should see traced.
$ adb shell 'settings put global sys_traced 0'
$ adb shell 'ps -A | grep traced'
Should no longer see traced.

Test: See above.
Change-Id: I245b7df3853cabeb0e75db41fb4facaa178ab8f1
2018-03-19 15:48:50 +00:00
Jaekyun Seok
709e967f35 Merge "Allow only public-readable to ro.secure and ro.adb.secure" am: c828802643
am: 0953687dea

Change-Id: I2ab330100983790a301c57168a57f12a96d59a56
2018-03-18 23:45:40 +00:00
Jaekyun Seok
6f3e73db05 Allow only public-readable to ro.secure and ro.adb.secure
Bug: 74866333
Test: succeeded building and tested with taimen
Change-Id: Id19fec168ab266e386ea4c710a4c5cedfc4df33c
Merged-In: Id19fec168ab266e386ea4c710a4c5cedfc4df33c
(cherry picked from commit 62acbce4a2)
2018-03-19 08:35:39 +09:00
Jaekyun Seok
62acbce4a2 Allow only public-readable to ro.secure and ro.adb.secure
Bug: 74866333
Test: succeeded building and tested with taimen
Change-Id: Id19fec168ab266e386ea4c710a4c5cedfc4df33c
2018-03-16 04:49:45 +00:00
Amit Mahajan
c3eb8ad9d7 Merge "Revert "Revert "Move rild from public to vendor.""" into pi-dev
am: 37666db3ff

Change-Id: Ic8652b9b05fea70cd901baeb4041af37d68613a6
2018-03-12 20:58:16 +00:00
Amit Mahajan
3007344dcd Revert "Revert "Move rild from public to vendor.""
This reverts commit 016f0a58a9.

Reason for revert: Was temporarily reverted, merging back in with fix.

Test: Basic telephony sanity, treehugger
Bug: 74486619
Bug: 36427227
Merged-in: Ide68726a90d5485c2758673079427407aee1e4f2
Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
(cherry picked from commit 312248ff72)
2018-03-12 13:13:39 -07:00
TreeHugger Robot
37666db3ff Merge "Revert "Revert "Move rild from public to vendor.""" into pi-dev 2018-03-12 20:02:01 +00:00
Amit Mahajan
58758dc222 Revert "Move rild from public to vendor."
This reverts commit aed57d4e4d.

Reason for revert: This CL is expected to break pre-submit tests (b/74486619)

Merged-in: I103c3faa1604fddc27b3b4602b587f2d733827b1
Change-Id: I0eb7a744e0d43ab15fc490e7e7c870d0f44e1401
2018-03-12 17:35:17 +00:00
Amit Mahajan
312248ff72 Revert "Revert "Move rild from public to vendor.""
This reverts commit 016f0a58a9.

Reason for revert: Was temporarily reverted, merging back in with fix.

Bug: 74486619
Bug: 36427227
Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
2018-03-12 17:12:53 +00:00
Jeffrey Vander Stoep
a948695779 Merge "Revert "Move rild from public to vendor."" into pi-dev
am: cb4e3b77ca

Change-Id: I5c787a6c3bc5fe7b6436c530ef8d6cb9958c1748
2018-03-12 00:08:02 +00:00
TreeHugger Robot
cb4e3b77ca Merge "Revert "Move rild from public to vendor."" into pi-dev 2018-03-12 00:01:17 +00:00
Jeffrey Vander Stoep
016f0a58a9 Revert "Move rild from public to vendor."
This reverts commit eeda6c6106.

Reason for revert: broken presubmit tests

Bug: 74486619
Change-Id: I103c3faa1604fddc27b3b4602b587f2d733827b1
2018-03-11 20:46:50 +00:00
Amit Mahajan
8991acdbfe Merge "Move rild from public to vendor." into pi-dev
am: 910f63f9ee

Change-Id: Ic568444d21e65679f613394660fd655d79f86826
2018-03-10 05:06:24 +00:00
Amit Mahajan
aed57d4e4d Move rild from public to vendor.
Also change the neverallow exceptions to be for hal_telephony_server
instead of rild.

Test: Basic telephony sanity, treehugger
Bug: 36427227
Merged-in: If892b28416d98ca1f9c241c5fcec70fbae35c82e
Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
2018-03-10 00:10:16 +00:00
TreeHugger Robot
910f63f9ee Merge "Move rild from public to vendor." into pi-dev 2018-03-09 22:42:30 +00:00
Amit Mahajan
eeda6c6106 Move rild from public to vendor.
Also change the neverallow exceptions to be for hal_telephony_server
instead of rild.

Test: Basic telephony sanity, treehugger
Bug: 36427227
Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
2018-03-08 12:50:13 -08:00
Ruchi Kandoi
e0e2342e16 Add secure_element_device
Test: eSE initializes at boot
Bug: 64881253
Change-Id: Ib2388b7368c790c402c000adddf1488bee492cce
(cherry picked from commit ea3cf0007e)
2018-03-07 13:54:21 -08:00
Ruchi Kandoi
aebbcd5595 Merge "Add secure_element_device" am: d83fd93f25
am: 4f1f96ad58

Change-Id: I73a210823ab10f8f5f425479f01d2bc9d0ad417a
2018-03-07 21:16:16 +00:00
Ruchi Kandoi
ea3cf0007e Add secure_element_device
Test: eSE initializes at boot
Bug: 64881253
Change-Id: Ib2388b7368c790c402c000adddf1488bee492cce
2018-03-07 16:37:24 +00:00
Kenny Root
98e2df5687 Add ADB system service am: 0b79a17952
am: 5a27a7ad41

Change-Id: Iac4e90efaea8bbf42176dcbccbaac78369ed90c7
2018-03-07 07:54:28 +00:00
Kenny Root
0b79a17952 Add ADB system service
ADB is being separated from USB service since it's not tied to the USB
transport. This duplicates the usb_service's settings to adb_service for
this purpose.

Bug: 63820489
Test: make
Change-Id: Idbcfbe470d7568f9cba51f0c8d4a8ee9503db93d
2018-03-07 13:04:00 +09:00
Tri Vo
af5e6f184b Merge "Add removed webview_zygote_socket to 27 mapping file." am: e091dc9051 am: 01b380f4ed
am: 74b3ad28c4

Change-Id: I00752ae5d9975e07bb19dd404f3e69319f6be733
2018-02-26 19:58:43 +00:00
Tri Vo
adf11f4caa Add removed webview_zygote_socket to 27 mapping file.
Bug: 69390067
Test: manual run of treble_sepolicy_tests
Change-Id: I19252eb743e6527cbe262b1e066a3f67f7186994
2018-02-26 09:09:24 -08:00
Jeff Vander Stoep
dc54573b81 Merge "label /data/vendor{_ce,_de}" am: 3721b0513d am: 7fd715ea82
am: 037f20b9c0

Change-Id: Ie7bcebebf47c7e0ea879ffb84c6dc3ce2e5b7259
2018-02-09 06:09:45 +00:00
Jeff Vander Stoep
d25ccabd24 label /data/vendor{_ce,_de}
Restrictions introduced in vendor init mean that new devices
may not no longer exempt vendor init from writing to system_data_file.
This means we must introduce a new label for /data/vendor which
vendor_init may write to.

Bug: 73087047
Test: build and boot Taimen and Marlin. Complete SUW, enroll fingerprint
    No new denials.

Change-Id: I65f904bb28952d4776aab947515947e14befbe34
2018-02-08 17:21:25 +00:00
Tri Vo
9fbd65200d Add internal types to 27.0[.ignore].cil.
Bug: 69390067
Test: manual run of treble_sepolicy_tests
Change-Id: I1b772a3f7c96875765c75bfc1031f249411c3338
2018-02-07 10:08:29 -08:00
Tri Vo
7cc2a53c22 Add missing types to 27.0[.ignore].cil.
Bug: 69390067
Test: build sepolicy
Test: 27.0.ignore.cil is a subset 26.0.ignore.cil
Change-Id: I6b9a1cfa8b38df4e97e5d63e2938ee9d5a4c83ec
2018-02-06 18:16:54 +00:00
Tri Vo
6cc74c48da Remove reboot_data_file from 27 mapping file.
reboot_data_file was already removed from 26.cil by aosp/505397

Bug: 69390067
Test: build sepolicy
Change-Id: Ieff68cbdaf5b0ddc02d0d3e463765ba3716994ba
2018-02-06 18:16:08 +00:00
Dan Cashman
f26e39728e Commit 27.0 compat mapping file to master.
Bug: 65551293
Bug: 69390067
Test: None. Prebuilt only change.
Change-Id: Ie793eb4a35927cb494281df59ae0a63666bb6e76
2017-12-06 20:30:26 -08:00