Commit Graph

2464 Commits

Author SHA1 Message Date
Tom Cherry
7a4e80089a Remove qmuxd from init scripts and sepolicy
This daemon doesn't exist on the device and causes init errors during
boot.

init: /vendor/etc/init/hw/init.walleye.rc: 745: Unable to decode GID
for 'qcom_diag': getpwnam failed: No such file or directory

init: Could not start service 'vendor.qmuxd' as part of class 'main':
Cannot find '/vendor/bin/qmuxd': No such file or directory

Test: tree-hugger passes
Merged-In: Ib2bc1739cac088af3e9ef2e0482f2536dad8fb8c
Change-Id: Ib2bc1739cac088af3e9ef2e0482f2536dad8fb8c
2018-06-18 18:00:28 +00:00
Treehugger Robot
3125af3c16 Merge "Temporarily whitelisting system domains writing vendor props" 2018-06-06 03:54:11 +00:00
Steven Moreland
217cd8b6d3 camera hal is hal_graphics_allocator_client
Before it had permissions to use hal_graphics_allocator_hwservice,
but it didn't declare itself to be an allocator_client.

Bug: 80319537
Test: boot + sanity
Change-Id: I93a23cd3db270491e82b378507f3cb55063561e8
2018-05-31 10:30:15 -07:00
Treehugger Robot
fba16b82c5 Merge "Bluetooth HFP: Use WBS by default (4/5)" 2018-05-30 00:44:06 +00:00
Jiyong Park
f392990328 Temporarily whitelisting system domains writing vendor props
system properties must not be used as a communication channel in between
system and vendor processes. However, there has been no enforcement on
this: system process could write system properties that are owned and
read by vendor processes and vice versa. Such communication should be
done over hwbinder and should be formally specified in HIDL.

Until we finish migrating the existing use cases of sysprops to HIDL,
whitelisting them in system_writes_vendor_properties_violators so that
the violators are clearly tracked.

These violators are allowed only for P, but not for Q.

Bug: 78598545
Test: m -j selinux_policy
Merged-In: I60b12f1232c77ad997c8c87e6d91baa14c626e94
Change-Id: I60b12f1232c77ad997c8c87e6d91baa14c626e94
(cherry picked from commit 3ee4e77674)
2018-05-24 19:07:35 +09:00
Joel Galenson
058a820975 Track hal_bluetooth_default SELinux denial.
This should help fix presubmit tests.

Bug: 79920182
Test: Built policy.
Change-Id: Ie28b6b09f0c762dc55432c078dffcdda67dbbdd7
2018-05-17 08:01:08 -07:00
Joel Galenson
703a55c3a9 Track per_proxy SELinux denial.
This should help fix presubmit tests.

Bug: 79541095
Test: Built policy.
Change-Id: Ide4401527cce5473288092a6c44fc446e9c1fc27
2018-05-11 07:37:15 -07:00
android-build-prod (mdb)
1f51445c1c Merge "Try to fix thermal-engine dac_override denial." 2018-05-02 16:36:41 +00:00
Joel Galenson
200ded4ed8 Try to fix thermal-engine dac_override denial.
We saw a similar denial on Marlin where thermal_engine was trying to
access /dev/diag.  This ports that fix to Wahoo to try to fix its
denial.

Bug: 78019417
Test: Build policy.
Change-Id: I3702e705ea4f99a58f4b96008d236d33ecd8045c
2018-05-01 10:20:12 -07:00
Stanley Tng
a4ac62adff Disable Hearing Aid Profile for all platforms except Pixel
Enable the Hearing Aid Profile for Pixel 2's and Pixel's.
Note: Cherry-picked from internal branch.

Bug: 78142728
Test: Manual Pairing on various Pixel phones
Change-Id: I1323387592bbedf69b4fc9185b121d616c96fd9e
(cherry picked from commit accc78a8c0)
2018-04-30 08:46:11 -07:00
Joel Galenson
1ce9621f42 Hide denials caused by race with labeling.
These denials seem to be caused by a race with the process that labels
the files.

Bug: 77635294
Test: Build policy.
Merged-In: Ieed9c2be18a092e92ec90fc8a07fa17c8ec19308
Change-Id: Ieed9c2be18a092e92ec90fc8a07fa17c8ec19308
(cherry picked from commit 2c67552cfd)
2018-04-27 12:38:16 -07:00
Joel Galenson
2e41f0e3f0 Allow access to sysfs_timestamp_switch.
We've seen these processes trying to access this file, so allow it.

Note that this is likely why they needed the sysfs_diag permission we
granted earlier.

Bug: 77908806
Test: Build
Change-Id: I60a2dae5a0635156070397242f13695678f1d00e
2018-04-24 10:17:17 -07:00
Joel Galenson
25bc4d84ef Handle radio diag-related denials.
This allows the behavior on userdebug and eng builds and hides it on
user builds.

Bug: 77908806
Test: Build policy.
Merged-In: I0d858a94bb1bab6069107209494536a62019788f
Change-Id: I3ba64a7b7350ae29883f1bd90ea86057c13d4835
2018-04-23 16:07:48 -07:00
Tom Cherry
cd3291ca3b vendor_init permissions for unencrypted_data_file are now global
So they can be removed from this device specific policy.

Bug: 77850279
Test: walleye + more restrictions continues to have FBE work
Change-Id: Ib77abd81ae886b40f5a078c379d352a53d865e31
(cherry picked from commit 659079a862)
2018-04-18 11:03:40 -07:00
Alan Stokes
de6c33eb92 Merge "Add /sys/kernel/memory_state_time to sysfs_power." 2018-04-18 09:32:18 +00:00
Hansong Zhang
db892b3ef6 Bluetooth HFP: Use WBS by default (4/5)
Bug: 72624793
Test: compilation
Change-Id: I78ef8705d9fd38db10a4d8f2bc0eac58bcf61d0a
2018-04-17 16:11:27 -07:00
Alan Stokes
7a7f93ca3f Add /sys/kernel/memory_state_time to sysfs_power.
This allows system_server to access it for determining battery stats
(see KernelMemoryBandwidthStats.java).

batterystats-wo: type=1400 audit(0.0:429): avc: denied { read } for name="show_stat" dev="sysfs" ino=48071 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Bug: 72643420
Bug: 73947096

Test: Policy still builds.

Merged-In: I2a31178f3fb2b5761050896579650a062ea026d2

(cherry picked from commit a60f2873a5)

Change-Id: I611b02d94c6d9cbe65de4cf0463c0522bf501601
2018-04-17 16:52:14 +01:00
Treehugger Robot
a52fb4e311 Merge "Allow some denials we have seen." 2018-04-17 15:45:26 +00:00
Joel Galenson
e97c886ed9 Add bug_map entries for bugs we've seen.
This adds numerous bug_map entries to try to annotate all denials
we've seen.

Bug: 78117980
Test: Build
Change-Id: I78923ebeb8837e09920941450d40504da3924022
2018-04-16 10:34:15 -07:00
Treehugger Robot
63b4c05de1 Merge "Handle some diag-related denials." 2018-04-13 20:44:04 +00:00
Joel Galenson
f5a3496e1c Allow some denials we have seen.
This addresses the following denials:

avc: denied { module_request } for comm="dnsmasq" kmod="netdev-bt-pan" scontext=u:r:dnsmasq:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
avc: denied { module_request } for comm="allocator@2.0-s" kmod="crypto-heh(aes)" scontext=u:r:hal_graphics_allocator_default:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
avc: denied { module_request } for comm="android.hardwar" kmod="crypto-hmac(sha256)" scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
avc: denied { sigkill } for comm="netmgrd" scontext=u:r:netmgrd:s0 tcontext=u:r:netutils_wrapper:s0 tclass=process permissive=0
avc: denied { sys_module } for comm="android.fg" capability=16 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=capability permissive=0
avc: denied { search } for comm="cnss-daemon" name="net" dev="sysfs" scontext=u:r:wcnss_service:s0 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0

Test: Build.
Merged-In: I7e201147271a32ea8420406af221aa7678374d78
Change-Id: I7e201147271a32ea8420406af221aa7678374d78
2018-04-13 13:43:25 -07:00
Joel Galenson
82ee41e471 Suppress hal_wifi_default module loading denials.
This suppresses the following denials:

avc: denied { module_request } for comm="android.hardwar" kmod="netdev-wlan0" scontext=u:r:hal_wifi_default:s0 tcontext=u:r:kernel:s0 tclass=system
avc: denied { sys_module } for comm="android.hardwar" capability=16 scontext=u:r:hal_wifi_default:s0 tcontext=u:r:hal_wifi_default:s0 tclass=capability

Test: Boot device.
Change-Id: I2eb4789892172cb119f50084cfe9718d8ead647d
2018-04-12 11:03:49 -07:00
Treehugger Robot
85b730d225 Merge "Track spurious hal_imrsc selinux denial" 2018-04-12 09:38:26 +00:00
Treehugger Robot
ea7df4a1e2 Merge "hal_tetheroffload: move hwservice mapping to core policy" 2018-04-12 00:34:22 +00:00
Jeff Vander Stoep
bc39aadff8 hal_tetheroffload: move hwservice mapping to core policy
Addresses:
avc: denied { find } for
interface=android.hardware.tetheroffload.config::IOffloadConfig
scontext=u:r:system_server:s0
tcontext=u:object_r:default_android_hwservice:s0
tclass=hwservice_manager

Bug: 77855688
Test: build/boot Sailfish, turn on tethering, no selinux denial
Change-Id: I97cae0928b5311a4da41d19cbd5c863c3137a49f
(cherry picked from commit 8424d3b945)
2018-04-11 15:03:55 -07:00
Jeff Vander Stoep
d2bd37c7e4 Track spurious hal_imrsc selinux denial
Caused by changes in b/77725358.

Track:
avc: denied { read } for comm="ims_rtp_daemon"
name="u:object_r:default_prop:s0" scontext=u:r:hal_imsrtp:s0
context=u:object_r:default_prop:s0 tclass=file

Bug: 77725358
Test: build/boot Taimen
Change-Id: Ic6234905e1694cab4bb8ef385f3dbe5455ef35b6
(cherry picked from commit e2be8c24de)
2018-04-11 12:25:08 -07:00
Joel Galenson
fac73dd84c Handle some diag-related denials.
This allows the behavior on userdebug and eng builds and hides it on
user builds.

Test: Boot device.
Merged-In: I936f08283bcd03ef88c55b3849f54d2dab5a5d64
Change-Id: I2b9df0f941b25c7813bf2410e94e14f24a7915a6
2018-04-10 15:47:50 -07:00
Max Bires
2127a72275 Adding rw access to diag_device for hal_gnss_qti
denied { read write } for pid=751 comm="Loc_hal" name="diag" dev="tmpfs"
ino=10674 scontext=u:r:hal_gnss_qti:s0
tcontext=u:object_r:diag_device:s0 tclass=chr_file

Test: on userdebug/eng builds, hal_gnss_qti can access diag_device
without generating denials

Change-Id: I571e4a4a470f3550c22a7af3145468baa4e0a155
(cherry picked from commit 365c33bb37)
2018-04-10 13:06:28 -07:00
Treehugger Robot
5224e1053a Merge "Track vendor_init SELinux denial." 2018-04-05 23:12:04 +00:00
Joel Galenson
1c81d19b81 Track vendor_init SELinux denial.
This should help fix presubmit tests.

Bug: 77635294
Test: Built policy.
Change-Id: I884ee75106c055aa7eb7af9f373d18e828a9f4e9
2018-04-05 10:40:13 -07:00
Dan Willemsen
50386448a9 Stop (re)setting empty and space
These are set by the core build system, and are becoming readonly.

Bug: 76424357
Test: lunch aosp_taimen-userdebug; m nothing
Test: build-aosp_taimen.ninja is the same
Change-Id: Iaa1dc4844d7926d711a6dea680011141ab684e56
2018-04-04 20:30:50 -07:00
Ruchi Kandoi
fd4dc5ab02 Merge "Add support for NFC 1.1" 2018-04-05 00:20:31 +00:00
Ruchi Kandoi
dad01f0e89 Add support for NFC 1.1
Supresses the following denials:
denied  { add } for interface=vendor.nxp.nxpnfc::INxpNfc pid=5675 scontext=u:r:hal_nfc_default:s0
tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0

denied  { find } for interface=vendor.nxp.nxpese::INxpEse pid=5675 scontext=u:r:hal_nfc_default:s0
tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0

Test: Enable/Disable NFC, Tag reading
Bug: 75980364
Merged-In: I337810ff89d61f796cb213cd931a7b665870029e
Change-Id: I337810ff89d61f796cb213cd931a7b665870029e
(cherry picked from commit 847e28f86e)
2018-04-04 21:31:28 +00:00
Tri Vo
ece77653a5 wahoo: Mark proc_* types with proc_type attribute.
Bug: 74182216
Test: build policy
Change-Id: I6e541d0111639a213b80d755adc546f653531103
2018-03-27 23:52:57 +00:00
Treehugger Robot
22558eda35 Merge "Add sysfs_type attr to sysfs_irq" 2018-03-23 01:39:04 +00:00
Jeff Vander Stoep
4abb3d0413 Add sysfs_type attr to sysfs_irq
Tests in aosp/646548 assert that genfs_contexts labeled filesystems
use the correct attributes such as files in /sys having sysfs_type.

Bug: 74182216
Test: build with aosp/646548 - these are build-time tests.
Change-Id: If82fe17632f0c28e481eb7e831730c6ba22d3877
2018-03-22 15:59:02 -07:00
Alan Stokes
e7ddfb0c49 Add alanstokes as an owner.
Test: n/a
Change-Id: Ib329b002231068ce0222530e656167806570c37b
2018-03-19 23:41:50 +00:00
Treehugger Robot
a5773e0f43 Merge changes from topic "bugreport-zero-denials"
* changes:
  Remove regex and label the whole directory.
  Remove unnecessary permissions.
  Grant hal_bootctl permissions for new type.
  Ensure taking a bugreport generates no denials.
2018-03-13 17:54:03 +00:00
Ruchi Kandoi
3e541a14ae Remove system and vendor image dependency
libnfc-nci.conf shouldn't be a part of vendor image, since it is
accessed by libnfc-nci and Nfc application, both are part of system
image.

Test: Nfc enable/disable
Bug: 72080121
Merged-In: I686ba234c7d2aa923070c3fa980c56b73b18e574
Change-Id: I686ba234c7d2aa923070c3fa980c56b73b18e574
2018-03-09 23:40:56 +00:00
Joel Galenson
5f7e132635 Remove regex and label the whole directory.
This is cleaner, as it allows us to remove a regex and label the
entire directory, and it will hopefully improve performance.

Bug: 74209458
Bug: 74366296
Test: Boot device, verify file labels, and test wifi and camera.
Test: Locally flashed OTA by following go/manual-ab-ota.
Test: Locally tested updated_verifier by following b/74366296#comment8.
Merged-In: I003dc949cf109cc63d75cee9515ef72cb9d0f055
Change-Id: I85f07b2fc8bfb472f25a66e32d3c7d746886535e
(cherry picked from commit 8a70f7ef1d)
2018-03-08 15:33:45 -08:00
Joel Galenson
da8c69cd71 Remove unnecessary permissions.
Remove sysfs file permissions and use the generic type for
directories.

Bug:74213358
Test: Flash OTA.
Merged-In: I27a27972f01a273b4eb65d72dd8f2827c1a374af
Change-Id: I27a27972f01a273b4eb65d72dd8f2827c1a374af
2018-03-07 16:28:02 -08:00
Joel Galenson
b41bcb753f Grant hal_bootctl permissions for new type.
Bug: 74213358
Test: Built policy.
Merged-In: Icf523468e06b65095755594a8de68f42c789751c
Change-Id: Icf523468e06b65095755594a8de68f42c789751c
2018-03-07 16:27:48 -08:00
Joel Galenson
981ecdbd82 Ensure taking a bugreport generates no denials.
This commit adds new SELinux permissions and neverallow rules so that
taking a bugreport does not produce any denials.

Bug: 73256908
Test: Captured bugreports on Sailfish and Walleye and verified
that there were no denials.

Merged-In: I84ed2be7438a4202d37ff91cb3846f491de29d70
Change-Id: If7151a5b5aaf4d1084ac2ed617c1867bc214281c
2018-03-07 16:27:37 -08:00
Treehugger Robot
372ca940fa Merge "Remove vendor_firmware_file type" 2018-03-01 01:43:36 +00:00
Jeff Vander Stoep
9df9ad04d4 Remove vendor_firmware_file type
It's causing surfaceflinger denials and does not exist on other
devices. Grant kernel read access to vendor/firmware's new type.

denied { search } for comm="surfaceflinger" name="firmware"
scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:vendor_firmware_file:s0
tclass=dir

denied { read } for comm="surfaceflinger" name="a530_pm4.fw"
scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:vendor_file:s0
tclass=file permissive=0

Test: boot Taimen without denials.
Bug: 68213100
Change-Id: I8b070a0aae59e12391c881cec8a46b6b4dbe1c67
2018-02-28 15:45:28 -08:00
Jeffrey Vander Stoep
1f81b8e744 Merge "Revert "Remove vendor_firmware_file type"" 2018-02-28 23:39:29 +00:00
Jeffrey Vander Stoep
a49507adc5 Revert "Remove vendor_firmware_file type"
This reverts commit d96b55b88a.

Reason for revert: b/74022074

Bug: 74022074
Change-Id: I84c5345c1a205257e088eccd01d3d93fd30a37c1
2018-02-28 23:35:19 +00:00
Treehugger Robot
d5a9eb456e Merge "Remove vendor_firmware_file type" 2018-02-28 20:30:36 +00:00
Jeff Vander Stoep
d96b55b88a Remove vendor_firmware_file type
It's causing surfaceflinger denials and does not exist on other
devices. Grant kernel read access to vendor/firmware's new type.

denied { search } for comm="surfaceflinger" name="firmware"
scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:vendor_firmware_file:s0
tclass=dir

Test: boot Taimen without denials.
Bug: 68213100
Change-Id: Ib5e1187a09ba59907c29e3de51f7189d25d42b49
2018-02-28 10:29:11 -08:00
Edwin Wong
807b727fd9 Put move_widevine_data.sh in /system/bin.
Add dependency to install move_widevine_data.sh to /system/bin.

The script is only needed for existing devices that
are running Widevine DRM and are upgrading to Pi or later
Android releases.

Test: Upgrade from O-MR1 to Pi, Netflix & Play Movies
  can play back offline content downloaded in O-MR1

Test: adb shell to verify script is in /system/bin

Test: adb shell to verify widevine data is moved to
  /data/vendor/mediadrm

Test: use audit2allow to verify no avc:denied for widevine drm service

bug: 73656300
Change-Id: Ie42a8229c4d20f71725ba7e8f5c2b267976ed294
2018-02-27 09:37:06 -08:00