Commit graph

14923 commits

Author SHA1 Message Date
Logan Chien
52fd4141b8 Merge "Add ro.vndk.lite to property_contexts" into pi-dev 2018-05-16 09:38:57 +00:00
Pavel Maltsev
34f233640a Allow to specify platform sepolicy dir mult. times
For automotive (and I assume for other verticals) it make sense to keep
vertical-specific policies outside of /system/sepolicy as those not used
by the phones. However, there's no way to do it rather than using
BOARD_PLAT_{PUBLIC|PRIVATE}_SEPOLICY_DIR build variables.

Bug: 70637118
Test: lunch bat_land-userdebug && m
Test: verify it builds, boots and logs seems to be reasonable
Test: enable full treble for aosp_car_x86 - verify it builds, boots and
no denials in the logs

Change-Id: Ia5fd847f7a6152ff6cf99bbbc12e1e322f7946ab
2018-05-15 21:54:30 +00:00
Jerry Zhang
6002126f88 Merge "Allow mediaprovider to search /mnt/media_rw" into pi-dev 2018-05-15 21:35:43 +00:00
Jerry Zhang
31c4b4eabf Allow mediaprovider to search /mnt/media_rw
Mtp needs access to this path in order to
change files on an sdcard.

Fixes denial:

05-14 17:40:58.803  3004  3004 W MtpServer: type=1400 audit(0.0:46):
avc: denied { search } for name="media_rw" dev="tmpfs" ino=10113
scontext=u:r:mediaprovider:s0:c512,c768
tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0
b/77925342 app=com.android.providers.media

Bug: 77849654
Test: no denials using mtp with emulated sdcard
Change-Id: I27b5294fa211bb1eff6d011638b5fdc90334bc80
2018-05-15 11:46:52 -07:00
TreeHugger Robot
175f23eca4 Merge "Allow to use sockets from hal server for auto" into pi-dev 2018-05-15 01:18:18 +00:00
TreeHugger Robot
e2c2a85e60 Merge "Allow vendor_init to getattr vold_metadata_file." into pi-dev 2018-05-14 23:42:19 +00:00
Pavel Maltsev
4cafae77a4 Allow to use sockets from hal server for auto
Add an exemption to neverallow rule to use sockets from HAL servers only
for automotive build

Bug: 78901167
Test: assign this attribute to hal_vehicle_default and try to open
socket from HAL implementation
Test: verify that new CTS test will fail for non-automotive build with
this attribute buing used
Test: make cts && cts-tradefed run singleCommand cts --skip-device-info
 --skip-preconditions --abi arm64-v8a --module CtsSecurityHostTestCases
 -t android.security.cts.SELinuxHostTest

Change-Id: I27976443dad4fc5b7425c089512cac65bb54d6d9
2018-05-14 14:36:19 -07:00
Joel Galenson
597be44e96 Allow vendor_init to getattr vold_metadata_file.
This relaxes the neverallow rule blocking vendor_init from doing
anything to vold_metadata_file.  The rules above it still prevent it
from doing anything other than relabelto and getattr.

Bug: 79681561
Test: Boot device and see no denials.
Change-Id: I1beb25bb9f8d69323c9fee53a140c2a084b12124
2018-05-14 13:08:46 -07:00
TreeHugger Robot
ce52208134 Merge "Track cppreopts SELinux denial." into pi-dev 2018-05-14 19:23:42 +00:00
Logan Chien
9f55f3455f Add ro.vndk.lite to property_contexts
Bug: 78605339
Test: aosp_walleye-userdebug builds
Change-Id: I37c84e20f2284d50cbe29bfa1b7597dd2c01fb4b
2018-05-14 14:46:47 +08:00
TreeHugger Robot
d9c7a6068c Merge "Whitelist dalvik.vm.profilebootimage" into pi-dev 2018-05-12 04:08:03 +00:00
Kourosh Derakshan
2054bb4e71 Allow 64bit version of Camera Provider to run
Test: camera operation
Bug: 73173997
Change-Id: I17668a2e4cc56499bc837920e2cdcfd96d608153
2018-05-12 02:06:19 +00:00
Calin Juravle
54fc209a48 Whitelist dalvik.vm.profilebootimage
The property is set on builds which profile the boot image.

Test: m
Bug: 73313191

(cherry-pick form commit d99f4acf2d)

Merged-In: Ie0cd54f23250df02850c38bb14e92d4b1fa04f16
Change-Id: Ie0cd54f23250df02850c38bb14e92d4b1fa04f16
2018-05-12 01:52:19 +00:00
TreeHugger Robot
4031b265fd Merge "Adding ability for hal keymaster to read vendor SPL" into pi-dev 2018-05-11 22:15:46 +00:00
Max Bires
37fd4bd485 Adding ability for hal keymaster to read vendor SPL
Keymaster hal needs to be able to read the vendor SPL for purposes of
rollback protection.

Bug: 76428542
Test: Keymaster can access the hal_keymaster_default property
Change-Id: Ifa53adb23f6ab79346e9dd9616b34d8b24395a0a
2018-05-11 16:51:58 +00:00
Mark Salyzyn
2cdcdc6ec0 Merge "FrameworksServicesTests: allow access to test.sys.boot.reason property" into pi-dev 2018-05-10 23:06:17 +00:00
Chris Fries
bb5b0a1e8f Merge "Add wait_for_keymaster" into pi-dev 2018-05-10 06:49:59 +00:00
Calin Juravle
dfaf39154f Merge "Allow system server to write profile snapshots in /data/misc/profman" into pi-dev 2018-05-09 21:35:08 +00:00
Paul Crowley
6af7af151b Add wait_for_keymaster
Bug: 79228237
Test: audit2allow finds no relevant denials on boot
Change-Id: Ia80b77ba9a1ec2354127cd0ef68d50ebcf593fb0
2018-05-09 12:57:52 -07:00
Calin Juravle
687d5e46ce Allow system server to write profile snapshots in /data/misc/profman
The goal is to allow creating profile snapshots from the shell command in
order to be able to write CTS tests.

The system server will dump profiles for debuggable in /data/misc/profman
from where they will be pulled and verified by CTS tests.

Test: adb shell cmd package snapshot-profile com.android.vending
Bug: 74081010
Change-Id: I54690305284b92c0e759538303cb98c93ce92dd5
2018-05-09 11:41:39 -07:00
Mark Salyzyn
1b748766e3 FrameworksServicesTests: allow access to test.sys.boot.reason property
com.android.server.power.PowerManagerServiceTest#testGetLastShutdownReasonInternal due to "RuntimeException: failed to set system property"

W/roidJUnitRunner: type=1400 audit(0.0:6): avc: denied { write } for name="property_service" dev="tmpfs" ino=13178 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
W/libc    : Unable to set property "test.sys.boot.reason" to "shutdown,thermal": connection failed; errno=13 (Permission denied)

Had to use precise property definition as com.android.phone accesses
test properties as well.

Test: compile
Bug: 78245377
Change-Id: I2cc810846f8615f2a2fae8e0d4f41de585b7abd7
2018-05-09 11:01:39 -07:00
Joel Galenson
8e6b2d551c Track cppreopts SELinux denial.
This should help fix presubmit tests.

Bug: 79414024
Test: Built policy.
Change-Id: Ic840150767ff6c2799ac3b5ef22ba139108c94dd
(cherry picked from commit 06e09abd25)
2018-05-09 10:36:00 -07:00
android-build-team Robot
351b9a3796 Merge "Allow sdcardfs:file read access on mediaextractor" into pi-dev 2018-05-08 22:25:41 +00:00
android-build-team Robot
adf00fa82e Merge "Whitelist reading property ro.aac_drc_effect_type" into pi-dev 2018-05-07 21:55:21 +00:00
Jean-Michel Trivi
41795cdf6d Whitelist reading property ro.aac_drc_effect_type
Bug: 71430241
Test: build/flash, grep for "avc: denied { read }" for mediacodec, should be empty on walleye
Change-Id: I12e1b11a969d3f979ca0cfbe4ca7db2bc5e46165
2018-05-07 12:28:17 -07:00
Ray Essick
2306cc040a give audioserver access to media.metrics
Let the audioserver record metrics with media.metrics service.
This is for 'audiopolicy' metrics.

Bug: 78595399
Test: record from different apps, see records in 'dumpsys media.metrics'
Change-Id: I63f9d4ad2d2b08eb98a49b8de5f86b6797ba2995
2018-05-07 16:31:44 +00:00
android-build-team Robot
7ea7f12d14 Merge "Allow system server to record its own profile" into pi-dev 2018-05-04 22:43:22 +00:00
Josh Gao
d018b5ce2c Merge changes from topic "tombstoned_empty" into pi-dev
* changes:
  Update sepolicy prebuilts for tombstoned.
  tombstoned: allow linking tombstones.
2018-05-04 21:37:22 +00:00
Calin Juravle
035fcc46cc Allow system server to record its own profile
On userdebug builds we can now profile system server without disabling
selinux. This is the final piece, and allows the system server to save its
own profile.

Test: manual, on a device with system server profiling enabled
Bug: 73313191

(cherry picked from commit 71d8467b75)

Change-Id: I93e7e01bfbd3146a8cfd26a1f6e88b640e9c4e0f
2018-05-04 13:38:49 -07:00
Yao Chen
78e3ed447a Allow lmkd to log to statsd
Bug: 78603347
Test: build and locally tested
Change-Id: I7e4eb8ebb2c1a0b7d684b471141da991a19bc98d
2018-05-03 16:15:38 -07:00
Josh Gao
c754b990a0 Update sepolicy prebuilts for tombstoned.
Bug: http://b/77729983
Test: treehugger
Change-Id: Ic8ce31396e5cad2e9b1f7aab2ace2f6c8e962d6d
2018-05-03 13:14:39 -07:00
android-build-team Robot
fa3934c96d Merge "Allow wpa_supplicant to write to files in /proc/net." into pi-dev 2018-05-03 17:11:37 +00:00
Pavel Maltsev
53c6578ff2 Merge "Allow auto HAL clients to access hw services" into pi-dev 2018-05-03 16:58:58 +00:00
Alan Stokes
2818b902dc Allow wpa_supplicant to write to files in /proc/net.
This is needed for interface configuration - see e.g. nl80211_configure_data_frame_filters.

Bug: 77903086
Test: Device boots, denial not seen, wifi works

(cherry picked from commit 72ed615228)

Change-Id: Ia781e7c56f6e8e77e654cd28ca34de09180e2213
Merged-In: Ia55c4af1fcee75ada0e67a162fdb92ecc0089312
2018-05-03 15:28:48 +00:00
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
Josh Gao
5159b1c9d6 tombstoned: allow linking tombstones.
Bug: http://b/77729983
Test: debuggerd_test
Test: adb shell 'for x in `seq 0 50`; do crasher; done'
Change-Id: I1d86d04047240a85b2e987116efd9be59607b766
(cherry picked from commit a7bf5810da)
2018-05-02 14:44:18 -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
Pavel Maltsev
368ae61fc7 Allow auto HAL clients to access hw services
Bug: 70637118
Test: m && emulator ; also verified on bat_land
Change-Id: I39dd17d20acc8d380f36e207679b8b1eba63a72e
2018-05-02 09:54:40 -07:00
Jaekyun Seok
21b1015db3 Update prebuilts/api/28.0/public/property_contexts
Bug: 78205669
Bug: 78430613
Test: succeeded building
Change-Id: Ie098b839a050058424673f0d8961b7a194a2caab
2018-05-02 09:08:13 +09: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
Dongwon Kang
e993b62c68 Allow sdcardfs:file read access on mediaextractor
Test: pass Multimedia File Compatibility test
Test: time to start playing mid file with GPM: ~10s => ~1.2s
Bug: 76422052, Bug: 67480585, Bug: 30751071
Change-Id: I4e9824b21dab1dafdcca5824367a7fe39a37e2f7
2018-05-01 13:25:24 -07: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
8cbe674345 Sepolicy: Modify postinstall_dexopt
Update prebuilts for API 28.

Bug: 77958490
Test: m
Test: manual
Change-Id: Ic3f8599266ff8fffdff1492a5600a10f6fecbe88
2018-05-01 10:47:35 -07: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
Ian Pedowitz
c170107ae0 Fixing build as SEPolicy changed during merge of P-Finalization
Bug: 77589980
Test: diff -r system/sepolicy/public system/sepolicy/prebuilts/api/28.0/public is empty
Change-Id: I5ecb003e893d87e36e096208e505ad1264c288aa
2018-04-30 18:36:35 -07:00