Commit graph

25958 commits

Author SHA1 Message Date
Jeff Vander Stoep
03fb6ee903 Enforce RTM_GETLINK restrictions on all 3p apps
This restriction was previously targetSdk gated for apps
with targetSdkVersion>=30.

This change is being posted for app-compat analysis and testing.

Bug: 170188668
Test: build
Change-Id: I08c709b2bb9a67157d0daf921e8ac7717a3bdf6f
2020-10-16 11:04:42 +02:00
Jack Yu
dd5c5d7960 Merge "Add sepolicy to allow read/write nfc snoop log data" 2020-10-16 07:56:10 +00:00
Chong Zhang
81f5b9fd25 allow mediatranscoding service to be stack dumped
bug: 170975812
Change-Id: Id73aaf5343efa3c67470e51f63a663a1684e7bf6
2020-10-15 12:54:43 -07:00
Woody Lin
1b2d790bc4 Merge "Add framework_watchdog_config_prop" 2020-10-15 06:44:52 +00:00
Inseob Kim
0dc8a3a0f5 Merge "Reland "Add vendor_property_type to vendor_default_prop"" 2020-10-15 06:17:53 +00:00
Yiming Jing
8fea06a779 Merge "Expand the scope of sepolicy_freeze_test" 2020-10-14 19:33:43 +00:00
Michael Sun
18925c87c0 Merge "Allow Bluetooth to access SystemSuspend control service" 2020-10-14 16:08:27 +00:00
Alan Stokes
b62df60806 Merge "Make shared_relro levelFrom=all." 2020-10-14 12:03:53 +00:00
Inseob Kim
574666cb4f Reland "Add vendor_property_type to vendor_default_prop"
This reverts commit 80d6227114.

Reason for revert: fixed build error

Bug: 131162102
Test: m selinux_policy sepolicy.recovery
Change-Id: Ic974f54acd3471bf7bf8c09d8392f2dd7a248f41
2020-10-14 20:54:05 +09:00
Primiano Tucci
dd1e83aa4f Merge "Create directory for shell<>perfetto interaction" 2020-10-14 08:35:53 +00:00
Primiano Tucci
ce31e4ba0e Merge "Keep AOSP sepolicy up to date with internal master" 2020-10-14 08:33:09 +00:00
Michael Sun
df54a52135 Allow Bluetooth to access SystemSuspend control service
This allows the Bluetooth to communicate with the SystemSuspend to
obtain system wakeup and wakelock information for Bluetooth activity
attribution (BTAA) processing.

BTAA is a process unit within the Bluetooth stack to aggregate
Bluetooth traffics, wakeup, and wakelocks into per-app, per-device, and
activity based statistical information.

Test: Local test verified Bluetooth can acquire suspend_control
Bug: 170315554
Change-Id: I7417132793c1000a8e3136c300cf8c1ba9cc3a14
2020-10-14 00:31:01 +00:00
Yiming Jing
d4103eed2b Expand the scope of sepolicy_freeze_test
The existing freeze test only covers the policy files in system/sepolicy
alone. There's demand from product teams that would like to implement a
freeze test for their sepolicy. Instead of letting them fork the freeze
test, we believe expanding the scope of the exising one is in the best
interest.

$FREEZE_TEST_EXTRA_DIRS and $FREEZE_TEST_EXTRA_PREBUILT_DIRS are added.
These build variables could be appended like $PRODUCT_PUBLIC_POLICY. The
product team are expected to maintain their policy prebuilts.

Bug: 166455099
Test: manual
Change-Id: I6f350e1e3db2807be4dbfd0ceb34f0d89f94d629
2020-10-13 22:51:56 +00:00
Primiano Tucci
512bdb9c1b Create directory for shell<>perfetto interaction
Users are unable to pass config files directly to
perfetto via `perfetto -c /path/to/config` and have to
resort to awkward quirks like `cat config | perfetto -c -'.
This is because /system/bin/perfetto runs in its own SELinux
domain for reasons explained in the bug.
This causes problem to test infrastructures authors. Instead
of allowing the use of /data/local/tmp which is too ill-scoped
we create a dedicated folder and allow only shell and perfetto
to operate on it.

Bug: 170404111
Test: manual, see aosp/1459023
Change-Id: I6fefe066f93f1f389c6f45bd18214f8e8b07079e
2020-10-13 21:27:27 +00:00
Darryl Johnson
c80aa39c93 Merge "Add device_state_service to SEPolicy." 2020-10-13 20:46:46 +00:00
Primiano Tucci
5d026b3152 Keep AOSP sepolicy up to date with internal master
This re-alignes aosp and internal master to avoid
conflicts when uploading CLs upstream.

Bug: 170126760
Change-Id: I9c087e70998cd529b71dec7428641c4bfef10d31
2020-10-13 18:52:25 +00:00
Darryl L Johnson
d6cc359691 Add device_state_service to SEPolicy.
This is to support the addition of the device state manager service and
its associated binder service.

Test: Manual - Modify policy and verify binder service can be published.
Fixes: 170034199
Change-Id: Id63cb1db3ee80ec699e98443457c113d6be809fe
2020-10-13 07:48:56 -07:00
Marin Shalamanov
bf908d3be5 Rename the sysprop for updating device product info
Test: read the prop from SurfaceFlinger; test on device
Change-Id: Id80954d6ea426b90b6cea5f74aae4d6cc905fcc5
2020-10-12 22:01:54 +02:00
Woody Lin
e005432482 Add framework_watchdog_config_prop
The framework_watchdog_config_prop properties control framework watchdog
configurations to handle watchdog timeout loop. The properties are
written only by vendor_init.

More details and background: go/break-sys-watchdog-loop

Bug: 141948707
Change-Id: I6c0da5fdafba8165e79d0f04e0a82874f605a06d
2020-10-12 16:44:13 +00:00
Alan Stokes
c7229c760f Make shared_relro levelFrom=all.
Also make shared_relro_file mlstrustedobject to ensure these files can
still be read by any app in any user.

Bug: 170622707
Test: Manual: delete the files, check they are re-created and accessible.
Test: Manual: no denials seen
Test: Presubmits
Change-Id: Icce4ee858219e3fd0e307f3edfb3c66005872a45
2020-10-12 14:43:01 +01:00
Florian Mayer
7f663a15e1 Merge "Allow heapprofd to read shell_data_file." 2020-10-12 09:29:34 +00:00
Treehugger Robot
5b238f9799 Merge "Android.mk: Support SYSTEM_EXT* sepolicy" 2020-10-12 03:49:24 +00:00
Treehugger Robot
9a0cff4756 Merge "build: Rename Plat->SystemExt*SepolicyDirs" 2020-10-12 03:49:24 +00:00
Yifan Hong
271ba1c3ff Merge "Revert "Add /boot files as ramdisk_boot_file."" 2020-10-08 22:28:43 +00:00
Yifan Hong
f5f4c1207a Revert "Add /boot files as ramdisk_boot_file."
This reverts commit 2576a2fc30.

Reason for revert: conflict with device-specific sepolicy

Bug: 170411692
Change-Id: Ie5fde9dd91b603f155cee7a9d7ef432a05dc6827
Test: pass
2020-10-08 22:13:44 +00:00
Steven Moreland
eacff783ee Merge changes from topic "b163478173-I"
* changes:
  Rem /vendor app neverallow to get vendor services
  sepolicy: remove hal_light_severice exception
2020-10-08 21:52:21 +00:00
Treehugger Robot
b4a08cb2cc Merge "Add F2FS_IOC_SEC_TRIM_FILE ioctl code" 2020-10-08 18:09:29 +00:00
Yifan Hong
02b3681931 Merge "Add /boot files as ramdisk_boot_file." 2020-10-08 16:30:28 +00:00
Yifan Hong
2576a2fc30 Add /boot files as ramdisk_boot_file.
/boot/etc/build.prop is a file available at first_stage_init to
be moved into /second_stage_resources.

The file is only read by first_stage_init before SELinux is
initialized. No other domains are allowed to read it.

Test: build aosp_hawk
Test: boot and getprop
Bug: 170364317
Change-Id: I0f8e3acc3cbe6d0bae639d2372e1423acfc683c7
2020-10-08 07:55:12 -07:00
Marin Shalamanov
01dbd09c8c Add sysprop for updating device product info
Test: read the prop from SurfaceFlinger; test on device
Change-Id: I4cde2244a9991e7051b3a3d52882ed4430ed046f
2020-10-08 15:49:50 +02:00
Florian Mayer
752e48d4c2 Allow heapprofd to read shell_data_file.
This allows to profile binaries pushed by the user.

Test: run profile of out of tree perfetto on flame userdebug.
Bug: 170208766
Change-Id: I152d6d244cc5065ee2de24f839e4ad467bc22cdc
2020-10-08 12:49:06 +00:00
Adam Shih
b5f770a8b8 Merge "Suppress errors that are not needed" 2020-10-08 01:53:52 +00:00
Treehugger Robot
fb4d45a762 Merge "Create selinux_policy_* for /product and /system_ext" 2020-10-08 00:49:44 +00:00
Steven Moreland
52b0886903 Rem /vendor app neverallow to get vendor services
This CL changes a neverallow for /vendor apps accessing vendor_service.
Originally, /vendor apps ({appdomain -coredomain}) were disallowed from
accessing all AIDL services since they are platform implementation
details that may change over time, and these apps run in a system
context. However, now, vendor services can be stable. So, in order to
give the flexibility needed for vendor framework components installed to
the /vendor partition to access AIDL HALs, opening this up.

Bug: 163478173
Test: build (validates neverallows)
Change-Id: Ic2280021e875671ad99e3f1ba820c6e4408fd645
2020-10-07 22:38:46 +00:00
linpeter
d62ddfef9c sepolicy: remove hal_light_severice exception
Bug: 148154485
test: build pass, HBM switch
Change-Id: I775ee6015b03817ed1394f3b6c306f4b5153190e
Merged-In: I775ee6015b03817ed1394f3b6c306f4b5153190e
(cherry picked from commit 0c09c42f23)
2020-10-07 22:34:35 +00:00
Benjamin Schwartz
92bb74c851 Rename PowerStats HAL service
Bug: 169864180
Test: m
Merged-In: I79ddf26acf398e80c6ff4a96c26b04aef73feac3
Change-Id: Ic458514285f819f44e50e2bee26a08fc6cf54261
2020-10-07 21:56:53 +00:00
Yo Chiang
e939cbdd37 Add F2FS_IOC_SEC_TRIM_FILE ioctl code
`secdiscard` calls ioctl(F2FS_IOC_SEC_TRIM_FILE). Add the ioctl
definition and allow rule.

Bug: 170275781
Bug: 140759142
Bug: 168571434
Test: Build pass
Change-Id: I967e0a3c1216f36174f08d5ace2f7a6bcd4103b6
2020-10-07 17:39:46 +00:00
Lais Andrade
ac2da76606 Add sepolicy for vibrator manager
This will allow SystemServer to add the new vibrator manager service.

Bug: 166586119
Test: manually build and install on test device
Change-Id: I496f46e2f5482aaa7bfba31d6c6b2967486941cc
2020-10-07 13:17:58 +00:00
Justin Yun
0f722695e0 Create selinux_policy_* for /product and /system_ext
Separate selinux_policy_system_ext and selinux_policy_product from
the selinux_policy_nonsystem module. With this CL,
selinux_policy_nonsystem will include the files for /vendor and /odm
partitions only. It will still include selinux_policy_system_ext and
selinux_policy_product as required modules.

Bug: 170282998
Test: build and check boot
Change-Id: Ie2f646a217ec86ede95caec101622bc530d12cfc
2020-10-07 18:28:47 +09:00
Adam Shih
e712c3db12 Suppress errors that are not needed
The purpose of misc_writer is to write misc partition. However,
when it includes libfstab, it will probe files like kernal command
line (proc/cmdline) and metadata, which are permissions it does not
need.

Bug: 170189742
Test: Boot under permissive mode and find the errors gone.
Change-Id: Icda3200660a3bee5cadb6f5e0026fa71941ae5dc
2020-10-07 08:52:51 +00:00
Treehugger Robot
cee3b93a91 Merge "Allow media.transcoding to access package manager native" 2020-10-06 21:28:24 +00:00
Nikita Ioffe
a45bb1a6f6 Merge "Allow apexd to read ro.cold_boot_done prop" 2020-10-06 14:52:20 +00:00
Jooyung Han
9cd0f8e73d Merge "Use file_contexts files for flattened APEXes" 2020-10-06 03:26:14 +00:00
Marco Ballesio
550f926a03 sepolicy: allow tracing access to irq/ipi
irq and ipi tracepoint are required for Traceur's irq category.

Bug: 153486528
Test: manually captured a Traceur trace on user builds, verified that the
tracepoints were present.

Change-Id: I2f42fc293e87e2a3567ab55f7533fe6a5d7852bf
2020-10-05 14:08:28 -07:00
Chong Zhang
ce3c1f3ba1 Allow media.transcoding to access package manager native
This is needed to retrieve package names for dumpsys and metrics.

bug: 154733526
Change-Id: Ibe376a961d29e6ffd10326b625683fdc28a1924e
2020-10-05 12:12:19 -07:00
Treehugger Robot
2c7b055751 Merge "Rename service android.security.keystore2 to android.system.keystore2." 2020-10-05 17:59:48 +00:00
Mohammad Islam
df63b17eec Merge "Allow system_server to rename file from /data/app-staging folder" 2020-10-05 16:01:59 +00:00
Janis Danisevskis
381c8421ae Rename service android.security.keystore2 to android.system.keystore2.
Keystore2 to is now a system/hardware/interfaces service.

Test: N/A
Change-Id: I97f356a94a9da710354c6c282a4f1dbf66b5a3b5
2020-10-05 08:56:08 -07:00
Jakub Pawlowski
63ef2b68ae Merge "Revert "Add vendor_property_type to vendor_default_prop"" 2020-10-05 11:53:47 +00:00
Jakub Pawlowski
80d6227114 Revert "Add vendor_property_type to vendor_default_prop"
This reverts commit d68d0ca0fc.

Reason for revert: broke build

Change-Id: I52905a143a31829d3825a2aa07bbf09b957240f0
2020-10-05 11:52:47 +00:00