Commit Graph

22527 Commits

Author SHA1 Message Date
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
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
Ashwini Oruganti
fe746ae453 Allow gmscore to write to /cache
Bug: 142672293
Test: TH
Change-Id: If3c2a5c91ffb497330531ad8a57ac5840d602d34
2019-12-17 14:55:01 -08:00
Suren Baghdasaryan
a8ca12d1c0 Merge "allow system_server to access files under /sys/kernel/ion/" 2019-12-17 22:21:17 +00:00
Suren Baghdasaryan
4da970f372 allow system_server to access files under /sys/kernel/ion/
In order for system_server to report ION allocations in dumpsys meminfo
report it needs access to ION sysfs nodes.

Bug: 138148041
Test: dumpsys meminfo
Change-Id: I8b1efebe8f4b06a3975e96ddd6a8cbcacdb52fb2
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-17 18:36:25 +00:00
Songchun Fan
024bc59798 [incremental] allow system server to read /proc/filesystems
Also allow binder service "incremental_service" to be found by service
manager.

Test: boots
BUG: 136132412
Change-Id: I3584a9b69a7e1909f096e3c4579c1834bdfba22e
2019-12-17 09:57:42 -08:00
Treehugger Robot
f1f79242f3 Merge "Allow application to find tethering service" 2019-12-17 10:45:45 +00:00
Songchun Fan
6914e5d1fa Merge "[incremental] allow service manager to find incremental_service" 2019-12-17 00:12:17 +00:00
Songchun Fan
d2b6c685b7 [incremental] allow service manager to find incremental_service
Test: boots
BUG: 136132412
Change-Id: I8728be360d4b37c6bc846a60bfef33af495ba289
2019-12-16 20:55:21 +00:00
Chris Weir
1b6f5af52c Merge "Move usb_serial_device to device.te" 2019-12-16 20:34:29 +00:00
Jeffrey Huang
215dd2aa9b system_server: create StatsManagerService
Refactor to split the logic within statscompanion_service
The goal of the refactor is to simplify the binder calls to statsd

This service will talk to statsd.

At the end of the refactor, this service should be the only
service that talks to statsd.

Bug: 146074223
Test: Manual by creating the service with empty implementation
Change-Id: Ib9c2e10ec195d41062f1001e5a82b374696de939
2019-12-16 11:50:16 -08:00
Ashwini Oruganti
384858e0ec Allow gmscore_app to write to /data/ota_package for OTA packages
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: I57f887e96d721ca69a7228df0a75515596776778
2019-12-16 10:00:07 -08:00
markchien
9cc39d9acf Allow application to find tethering service
Mark tethering_service as app_api_service to allow applications to find
tethering service. Apps should able to use tethering service to
know tethering state if they have ACCESS_NETWORK_STATE permission, but
they may need privileged permission if they want to change tethering.

Bug: 144320246
Test: -build, flash, boot
      -ON/OFF hotspot

Change-Id: Ie414618766144c4a4ad89c5cf03398a472638e71
2019-12-16 21:32:04 +08:00
Jeff Vander Stoep
607bc67cc9 Prevent apps from causing presubmit failures
Apps can cause selinux denials by accessing CE storage
and/or external storage. In either case, the selinux denial is
not the cause of the failure, but just a symptom that
storage isn't ready. Many apps handle the failure appropriately.

These denials are not helpful, are not the cause of a problem,
spam the logs, and cause presubmit flakes. Suppress them.

Bug: 145267097
Test: build
Change-Id: If87b9683e5694fced96a81747b1baf85ef6b2124
2019-12-16 11:19:05 +01:00
Treehugger Robot
a75fa8058c Merge "Create new system property type for Factory OTA could write system property" 2019-12-15 19:26:39 +00:00
chrisweir
ccaaae4289 Move usb_serial_device to device.te
As suggested by nnk@, I have moved the definition for usb_serial_device
to system/sepolicy/public/device.te from
/system/sepolicy/public/hal_can.te.

See suggestion in aosp/1166865

Test: Manually bring up SLCAN device on test hardware with this change
in place

Change-Id: I0a11556a7eae0be2c9e4b090b051969566c2343e
2019-12-13 17:01:27 -08:00
Treehugger Robot
9b624df22c Merge "priv_app.te: Remove auditallow for privapp_data_file" 2019-12-14 00:44:36 +00:00
Ashwini Oruganti
b975142b1a priv_app.te: Remove auditallow for privapp_data_file
Looking at go/sedenials, we have learnt a lot of other priv-apps rely on
this permission. The auditallow has served its purpose and can now be
removed.

Bug: 142672293
Test: Treehugger
Change-Id: Iba81773b223d2bddbd32a0594c5aa01829252847
2019-12-13 13:57:10 -08:00
Ashwini Oruganti
60c6d4e0a3 priv_app.te: Remove auditallow for statsd
From go/sedenials, we see that com.android.vending needs this
permission. The auditallow was in place to see if any priv-apps other
than GMS core need this, and now we know.

Bug: 142672293
Test: Treehugger
Change-Id: Iad6caeb648bc23e85571b758a35649924cdeec69
2019-12-13 13:33:02 -08:00