Commit Graph

22545 Commits

Author SHA1 Message Date
Treehugger Robot
4f362b1c68 Merge "priv_app: Remove rules for update_engine" 2020-01-08 23:21:27 +00:00
Treehugger Robot
c66a329a48 Merge "priv_app.te: Remove auditallows for shell_data_file" 2020-01-08 22:26:38 +00:00
Jon Spivack
c8c6c0060e Merge "Add aidl_lazy_test_server" 2020-01-08 22:26:31 +00:00
Ashwini Oruganti
5d395b253c priv_app: Remove rules for update_engine
We added an auditallow for these permissions on 11/26/2019, and have not
seen any recent logs for this in go/sedenials. No other priv-app should
rely on this now that gmscore is running in its own domain.

Bug: 142672293
Test: TH
Change-Id: I554ace42852023521e94017b1e782b6a09129fdf
2020-01-08 13:54:38 -08:00
Ashwini Oruganti
977fdd98fe priv_app.te: Remove auditallows for shell_data_file
Looking at go/sedenials, we have learnt that other priv-apps rely on
this permission. The auditallow has served its purpose and can now be
removed.

Bug: 142672293
Test: TH
Change-Id: I9ba1cbfa9ae90ae64e78276e5c1a699aa2a7f864
2020-01-08 13:29:59 -08:00
Tri Vo
0c687508d6 Merge "sepolicy: don't construct mappings for ignored types" 2020-01-08 20:53:22 +00:00
Andrei-Valentin Onea
5e4a45f403 Merge "Make platform_compat accessible on release builds." 2020-01-08 18:42:44 +00:00
Tri Vo
8c31ddf22e sepolicy: don't construct mappings for ignored types
Say, foo_type was introduced in 29.0 sepolicy and is in 29.0.ignore.cil.
Also assume (typeattributeset foo_type_29_0 (foo_type bar_type))

Make sure that above mapping is not expanded into 28.0.cil, 27.0.cil, etc.

Test: m selinux_policy
Test: build aosp/1199739
Change-Id: Ib564431ab67f555ea1ae650dc31a68121e9c6d84
2020-01-08 08:53:27 -08:00
Treehugger Robot
3e93ffb62f Merge "vendor_init can set config.disable_cameraservice" 2020-01-08 06:59:48 +00:00
Jon Spivack
ae2df6b5de Add aidl_lazy_test_server
This is a test service for testing dynamic start/stop of AIDL services. In order to test realistic use cases with SELinux enabled, it requires the same permissions as a regular service.

Bug: 147153962
Test: aidl_lazy_test aidl_lazy_test_1 aidl_lazy_test_2
Change-Id: Ifc3b2eaefba9c06c94f9cf24b4474107d4e26563
2020-01-07 15:11:03 -08:00
Ashwini Oruganti
86e110e688 gmscore_app: Enforce all rules for the domain
This change flips the switch and stops running gmscore_app in permissive
mode. Looking at the data in go/sedenials, we don't see any untracked
denial that isn't occurring for the priv_app domain as well. gmscore
should have all the necessary permissions it had was running in the
priv_app domain.

Bug: 142672293
Test: Build, flash, boot.
Change-Id: I0db56671cdfccbd79cd303bc2a819260ef7677fe
2020-01-07 10:53:49 -08:00
Robin Lee
cbfe879fe6 vendor_init can set config.disable_cameraservice
This had been settable by vendors up to and including Q release by
making config_prop avendor_init writeable. We don't allow this any
more. This should be a real vendor settable property now.

Bug: 143755062
Test: adb logcat -b all | grep cameraservice
Test: atest CtsCameraTestCases
Change-Id: Id583e899a906da8a8e8d71391ff2159a9510a630
2020-01-07 06:57:42 +00:00
Adam Shih
d5a0edd75e Grant appdomain access to app_api_service
The original idea was to compartmentalize services for apps to access.
ex. an app that manage display brightness should not have access to
audio service.

However, identifying all services is hard and we often end up granting
app_api_service in practice to avoid unexpected crashes.

Bug: 147198856
Test: Remove device app_api_service related sepolicy and related process
remain functional

Change-Id: I3aafcf1a91847a97c86f1d7992653b806a713bd4
2020-01-07 09:59:34 +08:00
Treehugger Robot
4c37de9b44 Merge "Don't run permissioncontroller_app in permissive mode" 2020-01-06 19:12:46 +00:00
Ashwini Oruganti
7d54f0367f Don't run permissioncontroller_app in permissive mode
Looking at go/sedenials, we're fairly confident that this domain has all
the necessary permissions. This change enforces all the defined rules
for the permissioncontroller_app domain and unsets the permissive mode.
Bug: 142672293
Test: Green builds, no new selinux denials.
Change-Id: Idaaf2f7aa88b2981f9fab2f74350a934fe415d71
2020-01-06 09:41:22 -08:00
Treehugger Robot
50c5d731e0 Merge "Add sepolicy for binderfs" 2020-01-06 16:09:45 +00:00
Jeff Vander Stoep
5357e7672a Temporarily whitelist system_server->storage denials
Make presubmit less flaky.

Bug: 145267097
Test: build
Change-Id: I45dd2f03a5db98fa70c950378538d32eb97a44df
2020-01-06 14:28:31 +01:00
Justin Yun
ed0a8ebe50 Revert "Revert "Define sepolicy for ro.product.vndk.version""
This reverts commit f536a60407.

Reason for revert: Resubmit the CL with the fix in vendor_init.te

Bug: 144534640
Test: lunch sdk-userdebug; m sepolicy_tests
Change-Id: I47c589c071324d8f031a0f7ebdfa8188869681e9
2020-01-06 15:12:14 +09:00
Justin Yun
f536a60407 Revert "Define sepolicy for ro.product.vndk.version"
This reverts commit 59e3983d1f.

Reason for revert: postsubmit fails in aosp/master

Change-Id: Icb10402ccdb6cff942a91adef341fe8f867f308a
2020-01-06 05:28:37 +00:00
Justin Yun
59e3983d1f Define sepolicy for ro.product.vndk.version
Define a new property_context vndk_prop for ro.product.vndk.version.
It is set by init process but public to all modules.

Bug: 144534640
Test: check if ro.product.vndk.version is set correctly.
Change-Id: If739d4e25de93d9ed2ee2520408e07a8c87d46fe
2020-01-06 11:08:23 +09:00
Ashwini Oruganti
6570d6d3c7 permissioncontroller_app: add a rule for IProxyService_service
Noticed denials in go/sedenials. This permission is currently granted to
priv_app via app_api_service.

Bug: 142672293
Test: TH
Change-Id: I9834044b2ba13b12694e88ae5cec8eb5c38c658c
2019-12-26 15:34:00 -08:00
Nikita Ioffe
2848fa4d8b Revert "Reland: "Add userspace_reboot_config_prop property type""
This reverts commit 7b53803b53.

Reason for revert: breaks build
Exempt-From-Owner-Approval: revert to fix broken build
Change-Id: Ic26ee0a8b0a54b86034970e2b18edf0b5f4ec46f
2019-12-26 16:14:45 +00:00
Nikita Ioffe
7b53803b53 Reland: "Add userspace_reboot_config_prop property type"
Only difference with
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1198254
is userspace_reboot_config_prop is now system_restricted_prop.

Marking it as system_internal_prop breaks build:
neverallow check failed at out/target/product/generic/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy:11968 from system/sepolicy/public/property.te:230
(neverallow base_typeattr_210 base_typeattr_467 (file (ioctl read write create setattr lock relabelfrom append unlink link rename open watch watch_mount watch_sb watch_with_perm watch_reads)))
<root>
allow at out/target/product/generic/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy:13021
(allow vendor_init base_typeattr_502 (file (read getattr map open)))

Test: flash && adb shell getprop ro.init.userspace_reboot.is_supported
Test: m checkbuild
Bug: 135984674
Change-Id: I6f54dcff8d9b62224f315452e9c320648422b5db
2019-12-24 12:44:36 +00:00
Jon Spivack
a2f0fdfddd Merge "binder_use: Allow servicemanager callbacks" 2019-12-23 20:04:33 +00:00
Jayachandran Chinnakkannu
3bd8767540 Revert "Add userspace_reboot_config_prop property type"
This reverts commit 8b570f0c60.

Reason for revert: b/146792618 multiple build breaks

Change-Id: Ieab05ce56826d2fc84d46940935705abd2e1a55f
2019-12-23 19:01:13 +00:00
Nikita Ioffe
8b570f0c60 Add userspace_reboot_config_prop property type
This type will be used for read-only properties used to configure
userspace reboot behaviour (e.g. whenever device supports it, watchdog
timeout, etc.).

Test: adb shell getprop ro.init.userspace_reboot.is_supported
Bug: 135984674
Change-Id: I387b2f2f6e3ca96c66c8fa3e6719d013d71f76c7
2019-12-23 15:10:40 +00:00
Treehugger Robot
8a40d6e70d Merge "sepolicy: new file_integrity_service" 2019-12-20 22:36:21 +00:00
Alan Stokes
c639fb6607 Merge "Don't audit data_mirror in dumpstate" 2019-12-20 10:16:16 +00:00
Kiyoung Kim
6ee440bd0f Merge "Allow linkerconfig to be executed with logwrap" 2019-12-20 03:30:33 +00:00
Nikita Ioffe
af004c339e Merge "Add ro.init.userspace_reboot.is_supported property" 2019-12-19 23:44:06 +00:00
Jon Spivack
4b9114a0b5 binder_use: Allow servicemanager callbacks
In order for services registered with LazyServiceRegistrar to dynamically stop, servicemanager needs to be able to call into client processes (to notify them and trigger shutdown).

Bug: 143108344
Test: aidl_lazy_test
Change-Id: I402d0bcc5e668bf022162c7ce7393d5b77256479
2019-12-19 23:07:14 +00:00
Victor Hsieh
48a7b5a580 sepolicy: new file_integrity_service
Test: didn't see denials in dmesg during boot or API calls.
Bug: 142573505
Change-Id: Ifa271956bc51bf47d781cd9c9f95afb99c5f940f
2019-12-19 09:25:35 -08:00
Ricky Wai
2e17c0558e Don't audit data_mirror in dumpstate
Bug: 146376151
Test: atest SELinuxHostTest#testNoBugreportDenials
Change-Id: Ia94496bcb8f60cd9a828380164ade65cab62bac2
2019-12-19 16:36:24 +00:00
Anton Hansson
b26066cb10 Merge "Create filegroup for sdkext file contexts" 2019-12-19 14:26:03 +00:00
Anton Hansson
70b3800301 Create filegroup for sdkext file contexts
So that they can be reused in the test apex.

Bug: 137191822
Test: m
Change-Id: Iea23fee906d7c4dc9267bd3220f9d41c86fbb5db
2019-12-19 13:17:00 +00:00
Nikita Ioffe
8351252c69 Add ro.init.userspace_reboot.is_supported property
Devices that support userspace reboot are required to set this property
to true.

Test: builds
Bug: 135984674
Change-Id: I6cbff586e8813cf0a44d2ff8d6a2cf6dbdc295f0
2019-12-19 12:57:42 +00:00
Treehugger Robot
78ec8f6546 Merge "Change Tethering package name" 2019-12-19 12:35:49 +00:00
Treehugger Robot
4bcc37904c Merge "gmscore_app: anr_data_file permissions" 2019-12-19 09:55:36 +00:00
Songchun Fan
753ff93ac9 Merge "[incremental] labels for incfs and directory root" 2019-12-19 05:47:42 +00:00
Songchun Fan
743f9eddf6 [incremental] labels for incfs and directory root
Adding two labels: "incfs" for the incremental filesystem and
"incremental_root_file" for file paths /data/incremental/*.

Doc: go/incremental-selinux

Test: manual
Change-Id: I7d45ed1677e3422119b2861dfc7b541945fcb7a2
2019-12-18 16:59:31 -08:00
Ashwini Oruganti
c9de5b531f gmscore_app: anr_data_file permissions
More historical context in http://b/18504118

This also adds an auditallow to the same rule for priv_app, so we can
delete it once no logs show up in go/sedenials for this rule
triggering.

Bug: 142672293
Test: TH
Change-Id: I5729b89af83090e6e31c012c8acb0f0114c87d3d
2019-12-18 22:15:08 +00:00
Kenny Root
2073d5b685 Add device file for Resume on Reboot
This adds the type and permissions for the default implementation to talk to
its kernel module.

Bug: 63928581
Test: boot Pixel 4 with default implementation

Change-Id: Ie847e4db975b95e90ea64937401e8d8a8ed812cb
2019-12-18 10:39:21 -08:00
Treehugger Robot
4c78a608f9 Merge "Allow gmscore to write to /cache" 2019-12-18 17:56:34 +00:00
Andrei Onea
85dd43db87 Make platform_compat accessible on release builds.
This is required for the Debug UI within the Settings app.

The Platform Compat API prevents callers from overriding the compat
config for non-debuggable apps on user builds, among other restrictions
(see https://r.android.com/1178263 for the full list).

Test: use Setting's debug UI on a user build
Bug: 144552011
Bug: 138280620
Change-Id: Ia11a6523feab5cfac2dd6a04d269c59f28f667b7
2019-12-18 14:47:29 +00:00
markchien
ba38521156 Change Tethering package name
Tethering apex module is renmae from com.android.tethering.aepx to
com.android.tethering. Renmae tethering apex file context accordingly.
Also add filegroup for tethering apex.

Bug: 146471733
Test: build, flash, boot
      atest TetheringTests
      atest CtsTetheringTest

Change-Id: I41ec17604067c684123085841182408c4e315ec2
Merged-In: I41ec17604067c684123085841182408c4e315ec2
2019-12-18 13:06:00 +00:00
Kiyoung Kim
6f73396d4c Allow linkerconfig to be executed with logwrap
As part of extending linkerconfig execution based on mount namespace and
APEX status, linkerconfig will be executed from init with logwrap. To
support this there should be an extra sepolicy to allow linkerconfig to
be executed with logwrap.

Bug: 144664390
Test: m -j passed & cuttlefish booted
Change-Id: Ia8b970a1c396a769eff4b102afbf4d33802923cf
2019-12-18 13:30:28 +09:00
Hall Liu
58798f2aa6 Merge "Add filegroup for telephony file context" 2019-12-18 02:13:23 +00:00
Ashwini Oruganti
cc5cf1c125 Merge "gmscore_app: shell_data_file permissions" 2019-12-18 02:04:02 +00:00
Jeffrey Huang
cfe10227fc Merge "system_server: create StatsManagerService" 2019-12-17 23:22:25 +00:00
Ashwini Oruganti
f31e862cac gmscore_app: shell_data_file permissions
This also adds an auditallow to the same rule for priv_app, so we can
delete it once no logs show up in go/sedenials for this rule
triggerring.

Bug: 142672293
Test: TH
Change-Id: I554e0cb00a53fd254c450c20e6c632e58472c3c8
2019-12-17 15:09:30 -08:00