Commit Graph

461 Commits

Author SHA1 Message Date
Lorenzo Colitti
4293069bf3 Merge "Device SELinux policy for secure persistent netd storage" into oc-dr1-dev 2017-07-12 07:57:42 +00:00
TreeHugger Robot
6544bd52b8 Merge "ueventd: remove redundant rules" into oc-dr1-dev 2017-07-12 05:33:36 +00:00
Jeff Vander Stoep
33e9c267ca ueventd: remove redundant rules
Ueventd is now granted write access to all files in /sys
in core policy.

avc:  denied  { write } for  pid=790 comm="ueventd" name="uevent"
dev="sysfs" ino=52014 scontext=u:r:ueventd:s0
tcontext=u:object_r:sysfs_usb_device:s0 tclass=file

Bug: 63147833
Test: build
Change-Id: I61f742a6151fe37ec99654bda6074f055a84a163
2017-07-11 07:55:12 -07:00
Michael Wright
2f3b0f2af3 Allow system_server to load input device configurations
Test: flash and use PointerLocation to observe size
Bug: 62871286
Change-Id: I5588b7b1a4d948446b0e1e9e8d5b32c9aabc1e42
2017-07-11 14:06:08 +00:00
Lorenzo Colitti
77e8a62770 Device SELinux policy for secure persistent netd storage
This is used to persist RFC 7217 stable secrets across device reboots.
For now this is device-specific; in future releases it will be moved
to public sepolicy.

Bug: 17613910
Test: stable_secret is generated on first use and persists across reboots
Test: "adb shell getprop persist.netd.stable_secret" doesn't work after "adb unroot"
Change-Id: I0a609c724799a15b1926e62534c16810d34f2275
2017-07-11 10:27:51 +09:00
Wei Wang
3b189d337f Enable Encoder hint for camera powersaving
- Hook up Encoder hint with CameraHal
- Remove dead code for EAS kernel for decoder hint and camera preview

This CL will enable powerhint for CameraHal to cap Big CPU
Cluster max freq to 1.958 Ghz.

Bug: 38000354
Bug: 62354242
Bug: 63039461
Test: Build and test camera preview on
Change-Id: I13e93915499f6cc83335b72ab2076d90bc9edfcc
2017-07-10 13:13:04 -07:00
Tao Bao
81cec4011b Merge "Grant update_verifier sysfs access." into oc-dr1-dev 2017-07-07 17:28:35 +00:00
TreeHugger Robot
8014ac1c9a Merge changes from topic 'elabel' into oc-dr1-dev
* changes:
  Add copy from /persist/elabel to /data/misc/elabel
  Add permissions for elabel data access
2017-07-07 15:39:47 +00:00
Patrick Tjin
4402ccfb27 Add copy from /persist/elabel to /data/misc/elabel
Bug: 62837579
Test: place test files in /persist/elabel, check that they are copied to /data/misc/elabel on boot
Change-Id: Id29e7c7c01ed54bf4d2f488cfa6dba51046bc5bf
Merged-In: Id29e7c7c01ed54bf4d2f488cfa6dba51046bc5bf
2017-07-07 03:04:46 +00:00
Jeff Vander Stoep
0e1346c32c Add permissions for elabel data access
Allow init to copy elabel data from /persist/elabel to
/data/misc/elabel. Allow settings app to access elabel data
from /data/misc/elabel.

Bug: 62837579
Change-Id: Ie2241abe8c2384a537b001a90830a3f42c566748
Merged-In: Ie2241abe8c2384a537b001a90830a3f42c566748
2017-07-07 03:03:52 +00:00
TreeHugger Robot
271fd0c603 Merge "Wahoo sepolicy changes" into oc-dr1-dev 2017-07-07 02:09:47 +00:00
Siddharth Ray
078daa1c8b Wahoo sepolicy changes
Wahoo's sepolicy is changed merged to add Marlin permissions
based on compliance test needs. Marlin's sepolicy can be
found at device/google/marlin/sepolicy/hal_gnss_default.te

Bug: 37409476
Test: Boots with no avc denials or crashes. GNSS incl. post XTRA
delete runs well with no denials.

Change-Id: Id51197120d142850fe0d7c97f747818e23c178f8
2017-07-06 12:30:04 -07:00
Tao Bao
13c6400e11 Grant update_verifier sysfs access.
avc: denied { read } for pid=694 comm="update_verifier" name="block" dev="sysfs" ino=27770 scontext=u:r:update_verifier:s0 tcontext=u:object_r:sysfs:s0 tclass=dir
avc: denied { read } for pid=719 comm="update_verifier" name="name" dev="sysfs" ino=51336 scontext=u:r:update_verifier:s0 tcontext=u:object_r:sysfs:s0 tclass=file

update_verifier reads /sys/block/dm-X/dm/name to find the device-mapper
entries for system and vendor partitions.

Also remove the unneeded "block_device:dir r_dir_perms" permission.

Bug: 63146601
Test: As follows.
  a) Set up /data/ota_package/care_map.txt.
  b) Reset the slot boot-successful flag with fastboot set_active.
  c) Boot the device and check update_verifier successfully verifies
     the blocks.
Change-Id: I581136249e93ec2d4bd9ceda316590ee31148643
2017-07-06 12:04:45 -07:00
TreeHugger Robot
f5ed4d3d87 Merge changes I45a49628,Icf764bf3 into oc-dr1-dev
* changes:
  Fix netmgrd crash recovery denials
  sepolicy: Separate system partition sepolicy and hal macros from vendor partition
2017-07-06 16:11:19 +00:00
TreeHugger Robot
e7d2b88004 Merge "sepolicy for mke2fs tools" into oc-dr1-dev 2017-07-06 14:24:05 +00:00
Jayachandran C
06f2fdfb7e Fix netmgrd crash recovery denials
This change fixes the following denials

auditd  : type=1400 audit(0.0:30032): avc: denied { unlink } for
comm="netmgrd" name="netmgr_connect_socket" dev="tmpfs" ino=31621
scontext=u:r:netmgrd:s0 tcontext=u:object_r:netmgrd_socket:s0
tclass=sock_file permissive=0

auditd  : type=1400 audit(0.0:35887): avc: denied { search } for
comm="netmgrd" name="diagchar" dev="sysfs" ino=26926
scontext=u:r:netmgrd:s0 tcontext=u:object_r:sysfs_diag:s0 tclass=dir
permissive=0

Test: Force crashed netmgrd and validated data working

Bug: 63360347
Change-Id: I45a49628b486cb264e07037cfa8397e381f72a00
2017-07-05 18:52:15 -07:00
Sunmeet Gill
28511cb3df sepolicy: Separate system partition sepolicy and hal macros from vendor partition
Test: VoLTE, VT & VoWiFi on Vzw and T-Mobile SIM cards

Bug: 62574674

Change-Id: Icf764bf353bbdfb7831f5ea8528414a271525c63
2017-07-05 16:24:33 -07:00
Sunny Kapdi
f128f5c538 Enable bt wcnss_filter to collect crash dumps
Bug: 37298084
Change-Id: Id67e4faf27ea6d59fdbcc2affcd1f2e6eb2ba3dd
2017-07-01 00:39:26 -07:00
Roopesh Rajashekharaiah Nataraja
739f448717 Add policies to remove System UID from time service
Bug: 62785008
Change-Id: I85cdaa618da7beddce88d4b67bd1b9d08c0a9c00
2017-06-30 23:16:39 +00:00
Wei Wang
454fc3e786 wahoo: time_daemon: use /persist to store offset to RTC
Also cleanup sepolicy files that was using /data/vendor as they are not
needed and /data is not ready by the time we start time_daemon

Bug: 62184939
Test: walleye boot with correct time in airplane mode
Change-Id: Ic7b025a8c795092a1dd4b1ab1d7497d1440c0a4b
2017-06-30 23:15:48 +00:00
Jeff Vander Stoep
aaaafebf1c Allow qseecomd to write to persist_data
Needed for drm.
avc: denied { read } for comm="qseecomd" name="/" dev="sdd3" ino=2
scontext=u:r:tee:s0 tcontext=u:object_r:persist_file:s0 tclass=dir
avc: denied { open } for comm="qseecomd" path="/persist" dev="sdd3"
scontext=u:r:tee:s0 tcontext=u:object_r:persist_file:s0 tclass=dir
avc: denied { write } for comm="qseecomd" name="widevine" dev="sdd3"
ino=97 scontext=u:r:tee:s0 tcontext=u:object_r:persist_data_file:s0
tclass=dir
avc: denied { add_name } for comm="qseecomd" scontext=u:r:tee:s0
tcontext=u:object_r:persist_data_file:s0 tclass=dir permissive=1
avc: denied { create } for comm="qseecomd scontext=u:r:tee:s0
tcontext=u:object_r:persist_data_file:s0 tclass=file permissive=1
avc: denied { write } for comm="qseecomd" scontext=u:r:tee:s0
tcontext=u:object_r:persist_data_file:s0
tclass=file permissive=1:persist_file:s0 tclass=dir permissive=1
avc: denied { open } scontext=u:r:tee:s0
tcontext=u:object_r:persist_file:s0 tclass=dir permissive=1
avc: denied { write } for comm="qseecomd" name="widevine"
scontext=u:r:tee:s0 tcontext=u:object_r:persist_data_file:s0
tclass=dir permissive=1
avc: denied { add_name } for comm="qseecomd" scontext=u:r:tee:s0
tcontext=u:object_r:persist_data_file:s0 tclass=dir permissive=1
avc: denied { create } for comm="qseecomd" scontext=u:r:tee:s0
tcontext=u:object_r:persist_data_file:s0 tclass=file permissive=1
avc: denied { write } scontext=u:r:tee:s0
tcontext=u:object_r:persist_data_file:s0 tclass=file permissive=1

Bug: 63051358
Test: build
Change-Id: I28bd0cd816720a85fc840890a74929939366de6d
2017-06-30 14:07:37 +00:00
Brian Duddie
ee8cd6b127 Allow sensors daemon to create vendor data files
Add an entry to init.hardware.rc to create /data/vendor/sensors at
startup, and sepolicy entries that allow the sensors daemon to create
files in that directory. These will be used to persist runtime
calibration across reboot, but not across factory reset.

denied { getattr } for pid=14080 comm="sensors.qcom"
path="/data/vendor/sensors/cal.txt" dev="sda45" ino=2179116
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=file permissive=1
denied { write } for pid=14113 comm="sensors.qcom" name="vendor"
dev="sda45" ino=2179073 scontext=u:r:sensors:s0
tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=1
denied { add_name } for pid=14113 comm="sensors.qcom" name="sensors"
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=dir permissive=1
denied { create } for pid=14113 comm="sensors.qcom" name="sensors"
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=dir permissive=1
denied { create } for pid=14113 comm="sensors.qcom" name="cal.bin"
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=file permissive=1
denied { write open } for pid=14113 comm="sensors.qcom"
path="/data/vendor/sensors/cal.bin" dev="sda45" ino=2179115
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=file permissive=1
denied { read } for pid=14113 comm="sensors.qcom"
path="/data/vendor/sensors/cal.txt" dev="sda45" ino=2179116
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=file permissive=1
denied { getattr } for pid=14113 comm="sensors.qcom"
path="/data/vendor/sensors/cal.txt" dev="sda45" ino=2179116
scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0
tclass=file permissive=1

Bug: 38425697
Test: confirm folder is created on boot, and calibration files are
created, updated, and read successfully by sensors daemon
Change-Id: Ie23cafe4f43b3335e07cf0d13dde0c5d06b69f80
2017-06-29 16:36:38 -07:00
Ecco Park
53c92f3bb8 Merge "Remove vendor_executes_system_violator attribute" into oc-dr1-dev 2017-06-29 23:18:04 +00:00
Subhani Shaik
c272f35b8b Remove vendor_executes_system_violator attribute
Bug: 62385687
Test: No svc denial error, wifi is working fine.
Change-Id: I47cad9cab9b2e60ccf4b692daae7042b44804b05
2017-06-29 20:26:18 +00:00
Ed Tam
1fe3fbbda7 Merge "Revert "Wahoo sepolicy changes"" into oc-dr1-dev 2017-06-29 09:29:00 +00:00
Ed Tam
7d05a3ba89 Revert "Wahoo sepolicy changes"
This reverts commit eb6f000bff.

Reason for revert: Causing runtime restarts

Bug: 63123125
Change-Id: I3f4752c7ff29f52957f28b0f0c84de2c11a06f40
2017-06-29 08:49:47 +00:00
TreeHugger Robot
730070f3d2 Merge "declare ipacm as the tetheroffload HAL" into oc-dr1-dev 2017-06-29 04:26:10 +00:00
Jeff Vander Stoep
5c5eb9de3a declare ipacm as the tetheroffload HAL
Also add tetheroffload HALs to the manifest.

Bug: 29337859
Bug: 32163131

Test: adb shell getenforce
Enforcing
adb shell dumpsys connectivity tethering
Tethering:
  ...
  Log:
    ...
    06-28 11:46:58.841 - SET master tether settings: ON
    06-28 11:46:58.857 - [OffloadController] tethering offload started
And logs show some signs of happiness:
    06-28 11:46:58.853   816   947 I IPAHALService: IPACM was provided two FDs (18, 19)
    06-28 11:46:58.853  1200  1571 I zygote64: Looking for service android.hardware.tetheroffload.control@1.0::IOffloadControl/default
Change-Id: I40e23c1863901330dfe59e2ea196314c5c7bb52a
(cherry picked from commit c6ecb207d7032bf43e9b39941ff7e47dd127e361)
2017-06-29 04:25:14 +00:00
Siddharth Ray
eb6f000bff Wahoo sepolicy changes
Wahoo's sepolicy is changed to mirror Marlin's. Marlin's sepolicy can be
found at device/google/marlin/sepolicy/hal_gnss_default.te

BUG: 37409476
Change-Id: Id6f49defd70923c56da2dfd68f55cf3dfc2e62fc
2017-06-29 01:58:58 +00:00
Thierry Strudel
638cc16535 Merge "Allow init_ese to run grep" into oc-dr1-dev 2017-06-28 17:58:28 +00:00
TreeHugger Robot
eb3cbfb47b Merge "Clean up denials" into oc-dr1-dev 2017-06-28 17:26:46 +00:00
Jeffrey Vander Stoep
8f87ef72a2 Merge "Suppress mediaprover access to certain cache dirs" into oc-dr1-dev 2017-06-28 04:12:32 +00:00
Paul Crowley
98bc1a88ac Allow init_ese to run grep
Bug: 62586642
Test: selinux denial on grep no longer seen.
Change-Id: I61847f5a5f460fc8efef5a772eae3a0559634b40
(cherry picked from commit 1478bd41b4)
2017-06-27 15:39:13 -07:00
Jeff Vander Stoep
a63fd3aadb Clean up denials
avc: denied { search } for name="/" scontext=u:r:kernel:s0
tcontext=u:object_r:persist_file:s0 tclass=dir
avc: denied { search } for name="ipc_logging" dev="debugfs"
scontext=u:r:kernel:s0 tcontext=u:object_r:debugfs_ipc:s0
tclass=dir
avc: denied { sys_module } scontext=u:r:netd:s0
tcontext=u:r:netd:s0 tclass=capability

Bug: 35197529
Test: build, verify denials no longer occur.
Change-Id: Ibe18ca05f2d80343624d08116b83b5287239c01a
2017-06-27 14:30:18 -07:00
Eino-Ville Talvala
2d5372cfb9 Merge "Allow network access to google_camera_app domain" into oc-dr1-dev 2017-06-27 21:24:54 +00:00
Jie Song
486dc6acd7 Merge "Add folder and SELinux rules for subsystem ramdump" into oc-dr1-dev 2017-06-27 18:19:22 +00:00
Eino-Ville Talvala
153afe88d3 Allow network access to google_camera_app domain
Test: New features in app that use the network function as expected
Bug: 63058578
Bug: 62848290
Change-Id: I129a57e2837f180e722bef4a3a05756acb150c0f
2017-06-27 10:14:01 -07:00
Jie Song
cbaa3b6884 Add folder and SELinux rules for subsystem ramdump
1. Move subsystem ramdump to ssrdump
2. Fix denials on sysfs

Bug: 62257616
Test: Modem ramdump in new folder
Change-Id: I5c77ec42a0967140d04b616ede9b02e6272f3442
2017-06-26 21:27:54 -07:00
Jin Qian
478d626e14 sepolicy for mke2fs tools
Move policy from global file to device specific file

Bug: 62908056
Change-Id: I72557ca5120df8cdea59e843cd20f9cf676b5e01
Merged-In: I20f0cc40276ef434fae1e4390c10765a4c9fd909
2017-06-26 17:57:13 -07:00
Jeff Vander Stoep
fcf1b20839 Suppress mediaprover access to certain cache dirs
avc: denied { getattr } for comm="sAsyncHandlerTh"
path="/data/cache/recovery" dev="sda13" ino=7086082
scontext=u:r:mediaprovider:s0:c512,c768
tcontext=u:object_r:cache_recovery_file:s0 tclass=dir
avc: denied { getattr } for path="/data/cache/backup"
scontext=u:r:mediaprovider:s0:c512,c768
tcontext=u:object_r:cache_private_backup_file:s0 tclass=dir

Bug: 63038506
Bug: 35197529
Test: build police
Change-Id: I51624c255e622bf712d41ca1bbf190ec3e4fefae
2017-06-26 16:58:51 -07:00
TreeHugger Robot
dfc34ea32b Merge "bootanim: suppress selinux denial" into oc-dr1-dev 2017-06-26 20:24:05 +00:00
Jeff Vander Stoep
3ecc3b2913 bootanim: suppress selinux denial
Reading time from /data/system/time is not used on Wahoo.

denied { read } for pid=619 comm="BootAnimation::" name="system"
scontext=u:r:bootanim:s0 tcontext=u:object_r:system_data_file:s0
tclass=dir

Bug: 62954877
Test: build policy
Change-Id: I0d5bc69797f7a11ca4e612c00228e87dd48942c7
2017-06-26 09:58:22 -07:00
Thierry Strudel
4dac4ed66f Merge "Move file labeling to genfs_contexts." into oc-dr1-dev 2017-06-26 06:16:57 +00:00
TreeHugger Robot
86c23203fc Merge "Removing keystore policy due to bug resolution" into oc-dr1-dev 2017-06-24 18:15:43 +00:00
TreeHugger Robot
3d5523ed0f Merge "Add sys.slpi.firmware.version property." into oc-dr1-dev 2017-06-23 23:32:13 +00:00
TreeHugger Robot
b2be8cb917 Merge "Allow init to relabel ab_block lnk_files" into oc-dr1-dev 2017-06-23 20:14:23 +00:00
Erik Staats
44f0902691 Add sys.slpi.firmware.version property.
Bug: 38240024
Test: Verified value of sys.spli.firmware.version property.  See details in
testing done comment in
https://googleplex-android-review.git.corp.google.com/2442584 .
Change-Id: Ief04cbfac4efd71c8ff22057fc286645fbadf44d
2017-06-23 10:49:48 -07:00
Jeff Vander Stoep
63013293d8 Allow init to relabel ab_block lnk_files
avc: denied { relabelto } for name="dtbo_a" dev="tmpfs"
scontext=u:r:init:s0 tcontext=u:object_r:ab_block_device:s0
tclass=lnk_file permissive=0
avc: denied { relabelto } for name="boot_a" dev="tmpfs"
scontext=u:r:init:s0 tcontext=u:object_r:boot_block_device:s0
tclass=lnk_file permissive=0

Bug: 35197529
Test: build and flash. Verify link files have correct label.
Change-Id: I2e718e8e06af70d73b0c5076ffc99d5fa7013fd9
2017-06-23 08:09:20 -07:00
TreeHugger Robot
32f9c6131d Merge "Suppress netutils_wrapper module denials" into oc-dr1-dev 2017-06-23 00:43:24 +00:00
TreeHugger Robot
30038f8184 Merge "Narrow down tftp_server's access to /persist" into oc-dr1-dev 2017-06-23 00:43:08 +00:00