Commit graph

2907 commits

Author SHA1 Message Date
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
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
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
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
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
4de238e9b9 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
2018-04-16 06:18:24 +00: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 Vander Stoep
7847680beb Merge "tombstoned: allow unlinking anr files" am: 6b1ce73e1f
am: ce83df5763

Change-Id: I4eaf900d032173006d645572c4b37d366bf3df07
2018-04-14 16:26:56 -07:00
Suren Baghdasaryan
f30758564f Selinux: Give lmkd read access to /proc/meminfo am: 76384b3ee0
am: b3005f7273

Change-Id: I4f74bf0de7d732bc738b7dc83c5578450ba803d9
2018-04-14 16:17:54 -07:00
Jeff Sharkey
ba89007178 Merge "Add exFAT support; unify behind "sdcard_type"." 2018-04-13 23:47:54 +00:00
Treehugger Robot
6b1ce73e1f Merge "tombstoned: allow unlinking anr files" 2018-04-13 23:31:27 +00:00
Suren Baghdasaryan
76384b3ee0 Selinux: Give lmkd read access to /proc/meminfo
Allow lmkd read access to /proc/meminfo for retrieving information
on memory state.

Change-Id: I7cf685813a5a49893c8f9a6ac4b5f6619f3c18aa
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 21:35:52 +00:00
Jeff Vander Stoep
eb8f938fd4 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.
Change-Id: I2c7cf81a837d82c4960c4c666b38cd910885d78d
2018-04-13 14:33:32 -07:00
Chia-I Wu
f60ccadf18 Make persist.sys.sf.native_mode an integer am: 9047a4de89
am: eb5843635b

Change-Id: I6b42246d7ab2a7864adcfb39324a04732c2be686
2018-04-13 13:58:34 -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
Chia-I Wu
9047a4de89 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
2018-04-13 10:55:00 -07:00
Tom Cherry
5d8aba8b33 Allow vendor_init to write to misc_block_device am: db465285cf
am: 4af9448a1d

Change-Id: I1f178435ae86b871b29e9cfa3c3547b28c72b5be
2018-04-13 10:24:34 -07:00
Florian Mayer
5e0690c916 Merge "Make traced_probes mlstrustedsubject." into pi-dev
am: c9523bd47c

Change-Id: I3194c759039d08fe8b1f08f37ddcebab67626327
2018-04-13 10:23:01 -07:00
TreeHugger Robot
c9523bd47c Merge "Make traced_probes mlstrustedsubject." into pi-dev 2018-04-13 17:07:30 +00:00
Tom Cherry
db465285cf 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
Change-Id: I78f80400e5f386cad1327a9209ee1afc8e334e56
2018-04-13 16:39:48 +00: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
Florian Mayer
e3919e95fd 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
2018-04-12 19:05:22 +01:00
Jaekyun Seok
c1384ba0d0 Allow vendor-init-readable for sys.boot_completed and dev.bootcomplete
Bug: 75987246
Test: succeeded builing and tested with taimen
Change-Id: I2d8bc91c305e665ed9c69459e51204117afb3eee
Merged-In: I2d8bc91c305e665ed9c69459e51204117afb3eee
(cherry picked from commit ac2e4cce71)
2018-04-12 05:28:09 +00:00
Jaekyun Seok
252e871dd2 Allow vendor-init-readable for sys.boot_completed and dev.bootcomplete
am: ac2e4cce71

Change-Id: I595507e45f563ae0ecfb07e842f446a34b3e3446
2018-04-11 20:38:58 -07:00
Jaekyun Seok
ac2e4cce71 Allow vendor-init-readable for sys.boot_completed and dev.bootcomplete
Bug: 75987246
Test: succeeded builing and tested with taimen
Change-Id: I2d8bc91c305e665ed9c69459e51204117afb3eee
2018-04-12 08:12:25 +09:00
TreeHugger Robot
2e532d4039 Merge "Widen crash_dump dontaudit." into pi-dev 2018-04-11 21:48:23 +00:00
Joel Galenson
a01e93130d Widen crash_dump dontaudit.
We have seen crash_dump denials for radio_data_file,
shared_relro_file, shell_data_file, and vendor_app_file.  This commit
widens an existing dontaudit to include them as well as others that we
might see.

Bug: 77908066
Test: Boot device.
Change-Id: I9ad2a2dafa8e73b13c08d0cc6886274a7c0e3bac
(cherry picked from commit a3b3bdbb2f)
2018-04-11 11:02:06 -07:00
Joel Galenson
e477c781d4 Hide sys_rawio SELinux denials.
We often see the following denials:

avc: denied { sys_rawio } for comm="update_engine" capability=17 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0 tclass=capability permissive=0
avc: denied { sys_rawio } for comm="boot@1.0-servic" capability=17 scontext=u:r:hal_bootctl_default:s0 tcontext=u:r:hal_bootctl_default:s0 tclass=capability permissive=0

These are benign, so we are hiding them.

Bug: 37778617
Test: Boot device.
Change-Id: Iac196653933d79aa9cdeef7670076f0efc97b44a
(cherry picked from commit bf4afae140)
2018-04-11 10:53:36 -07:00
Joel Galenson
d1c93612cc Merge "Hide sys_rawio SELinux denials." am: 6cdc9a820d
am: 97e41802db

Change-Id: I07a20906f2c536e573198219e4d3d567ea715144
2018-04-10 16:55:14 -07:00
Treehugger Robot
6cdc9a820d Merge "Hide sys_rawio SELinux denials." 2018-04-10 23:41:21 +00:00
Joel Galenson
fc29b9ba39 Merge "Widen crash_dump dontaudit." am: 354a253077
am: b5f3e88e99

Change-Id: Ia52abf98b65da8309e014ac5fd3c642511e6f189
2018-04-10 16:28:58 -07:00
Treehugger Robot
354a253077 Merge "Widen crash_dump dontaudit." 2018-04-10 23:14:42 +00:00
Joel Galenson
bf4afae140 Hide sys_rawio SELinux denials.
We often see the following denials:

avc: denied { sys_rawio } for comm="update_engine" capability=17 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0 tclass=capability permissive=0
avc: denied { sys_rawio } for comm="boot@1.0-servic" capability=17 scontext=u:r:hal_bootctl_default:s0 tcontext=u:r:hal_bootctl_default:s0 tclass=capability permissive=0

These are benign, so we are hiding them.

Bug: 37778617
Test: Boot device.
Change-Id: Iac196653933d79aa9cdeef7670076f0efc97b44a
2018-04-10 14:23:25 -07: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
Joel Galenson
a3b3bdbb2f Widen crash_dump dontaudit.
We have seen crash_dump denials for radio_data_file,
shared_relro_file, shell_data_file, and vendor_app_file.  This commit
widens an existing dontaudit to include them as well as others that we
might see.

Test: Boot device.
Change-Id: I9ad2a2dafa8e73b13c08d0cc6886274a7c0e3bac
2018-04-10 09:55:11 -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
Treehugger Robot
d4dd2f5710 Merge "hal_health: allow to write kernel logs." 2018-04-09 20:33:12 +00:00
Alan Stokes
06bac37f51 Installd doesn't need to create cgroup files.
cgroupfs doesn't allow files to be created, so this can't be needed.

Also remove redundant neverallow and dontaudit rules. These are now
more broadly handled by domain.te.

Bug: 74182216

Test: Denials remain silenced.

Change-Id: If7eb0e59f567695d987272a2fd36dbc251516e9f

(cherry picked from commit 8e8c109350)
2018-04-09 13:49:13 +01:00
Alan Stokes
d3b70b8d98 Merge "Installd doesn't need to create cgroup files." into pi-dev
am: 956aba8fc4

Change-Id: I18aaf1a24d9651ae16239e4ef50c90481d52ab3a
2018-04-09 01:11:25 -07:00
Alan Stokes
956aba8fc4 Merge "Installd doesn't need to create cgroup files." into pi-dev 2018-04-09 08:03:53 +00:00
Yifan Hong
2a0e2ee0bb Merge "hal_health: allow to write kernel logs." into pi-dev
am: 9370b51a95

Change-Id: I7b8c01edd9eb5008bce130ab067b4c723b1bf9c8
2018-04-06 14:28:43 -07:00
Yifan Hong
9370b51a95 Merge "hal_health: allow to write kernel logs." into pi-dev 2018-04-06 21:03:34 +00:00
Yifan Hong
5ef48cf831 hal_health: allow to write kernel logs.
This is originally allowed in healthd but the permission
was not transfered to health HAL. A typical health HAL
implementation is likely to write battery info to kernel
logs.

Test: device has battery kernel logs with health HAL
      but without healthd

Bug: 77661605

Change-Id: Ib3b5d3fe6bdb3df2a240c85f9d27b863153805d2
2018-04-06 10:24:48 -07:00
Yifan Hong
306b26710f hal_health: allow to write kernel logs.
This is originally allowed in healthd but the permission
was not transfered to health HAL. A typical health HAL
implementation is likely to write battery info to kernel
logs.

Test: device has battery kernel logs with health HAL
      but without healthd

Bug: 77661605

Change-Id: Ib3b5d3fe6bdb3df2a240c85f9d27b863153805d2
2018-04-06 10:23:39 -07:00
Alan Stokes
8e8c109350 Installd doesn't need to create cgroup files.
cgroupfs doesn't allow files to be created, so this can't be needed.

Also remove redundant neverallow and dontaudit rules. These are now
more broadly handled by domain.te.

Bug: 74182216

Test: Denials remain silenced.

Change-Id: If7eb0e59f567695d987272a2fd36dbc251516e9f
2018-04-06 12:12:22 +01:00