Commit graph

28434 commits

Author SHA1 Message Date
David Anderson
8303577f09 Allow snapuserd interaction in recovery and fastbootd.
This is needed to support VABC merges on data wipes and via "fastboot
snapshot-update merge".

Bug: 168258606
Test: fastboot snapshot-update merge
      data wipe during VABC merge
Change-Id: I32770a2e74f2c2710e4964f65c42ae779c1a0b90
2021-02-04 22:48:55 -08:00
Treehugger Robot
96acdc0b22 Merge "Revert^3 "sepolicy: rules for uid/pid cgroups v2 hierarchy"" 2021-02-05 01:59:16 +00:00
Marco Ballesio
aa8bb3a29b Revert^3 "sepolicy: rules for uid/pid cgroups v2 hierarchy"
a54bed6907

Bug: 151660495
Test: verified proper boot in regular mode and proper working of adb in
recovery

Change-Id: Id70d27a6162af6ede94661005d80a2a780057089
2021-02-04 22:33:14 +00:00
Lorenzo Colitti
9b20cadf4a Merge "Add sepolicy for the vpnmanager service." 2021-02-04 10:04:10 +00:00
Inseob Kim
5a69979318 Merge "Remove mutator and use standard variant functions" 2021-02-04 06:19:28 +00:00
Lorenzo Colitti
5ee34a0ed3 Add sepolicy for the vpnmanager service.
The system server code that backs VPN APIs such as VpnService and
VpnManager currently lives in ConnectivityService and is accessed
via IConnectivityManager.

In S, ConnectivityService is being moved to the tethering
mainline module, but the VPN code is not. So add an new
service (vpnmanager, IVpnManager, VpnManagerService) to support
these APIs.

Service implementation at http://r.android.com/1572982 . That CL
cannot be in a topic with this one because it will conflict in
master and sc-dev.

Bug: 173331190
Test: builds, boots, "dumpsys vpnmanager" throws no errors
Change-Id: Ic09c93cc454ec959a3beda2b09efa74b8db30c27
2021-02-04 13:01:09 +09:00
Treehugger Robot
87153827e2 Merge "Allow dumpstate to read DMA-BUF sysfs stats" 2021-02-04 01:13:31 +00:00
Wei Wang
a525bc19a1 Allow vendor_init to set its own nice value
Bug: 173537947
Test: Boot
Change-Id: Ibbd31c6dfb34b87044d95cac3dae5d4696cb964a
2021-02-03 10:39:31 -08:00
Roland Levillain
6e3caf699e Merge "Allow dex2oat to read runtime native flag properties." 2021-02-03 09:54:21 +00:00
Inseob Kim
fa6fe474f0 Remove mutator and use standard variant functions
As image variants are now supported directly by android.Module, this
removes a custom mutator in selinux_contexts and uses image variant
functions in android.Module.

InRecovery and InstallInRecovery may be confusing. But refactoring it is
out of scope for this CL.

Test: compare out/soong/build.ninja before and after
Change-Id: I9ebf665a1d50d24bb4e5568a4fd1af4c4eb02c90
2021-02-03 10:53:18 +09:00
Hridya Valsaraju
6217b6657d Allow dumpstate to read DMA-BUF sysfs stats
These permissions are required for dumpstate to read the DMA-BUF sysfs
stats present at /sys/kernel/dmabuf/buffers

Bug: 167709539
Test: adb shell am bug-report
Change-Id: I1c00843775452b7a7aa39b059e1d77d77aed1e9c
2021-02-02 13:28:18 -08:00
Treehugger Robot
c6c237a7d4 Merge "Fix dumpstate hal_*_server denials" 2021-02-02 18:27:24 +00:00
Roland Levillain
d7227d8816 Allow dex2oat to read runtime native flag properties.
This is in prevision of future `dex2oat` feature / experiments flags
set in namespaces `runtime_native` and `runtime_native_boot`.

In Android S, ART is becoming an updatable Mainline module (which will
include `dex2oat`). In the future, we may want to run experiments or
test new features using the Android Experiments framework. Such
experiments/features are enabled via feature flags, implemented as
Android system properties for native code.

To be able to read such properties, we need to give the read
permission to the relevant binaries. At the moment, this can only be
done in the SELinux policy of the Android platform, which cannot be
updated via a Mainline update. To give us the opportunity to conduct
such experiments in `dex2oat` via an ART Mainline Module update after
Android S has shipped (e.g. by having `dex2oat` query a system
property in `persist.device_config.runtime_native.*` ), we need to
have this permission set in the Android S platform now.

Test: mmma system/sepolicy
Change-Id: I0a83e9f0ec19884a99ef9693d55084376bff8762
2021-02-02 15:55:48 +00:00
Kalesh Singh
5bf6faaf94 Fix dumpstate hal_*_server denials
Bug: 178566350
Test: atest CtsSecurityHostTestCases:android.security.cts.SELinuxHostTest#testNoBugreportDenials -- --abi x86_64
Change-Id: I58e050f2e6f978ea5c7e1a89221178f5374d1731
2021-02-01 22:20:44 -05:00
Darryl Johnson
3d4a5081ca Merge "Add app_api_service to device_state service type." 2021-02-01 21:42:07 +00:00
Darryl L Johnson
7aadbf80ed Add app_api_service to device_state service type.
This allow the device_state binder service to be exposed
as a TestApi and a SystemApi to allow usage in CTS and
system applications.

Test: Build, flash, and query device_state service
Bug: 177236115
Bug: 177235528

Change-Id: Ia9f306b8c242e8e754b201f349c274b4ce78dad9
2021-02-01 18:53:09 +00:00
Ryan Savitski
8b26472177 traced_perf: allow RO tracefs access + fix neverallow
We're adding support for counting and/or sampling on the static kernel
tracepoints in traced_perf (via perf_event_open). This requires traslating
a human-readable tracepoint name to its id for the running kernel.
For that, we need to read the "id" files like:
  /sys/kernel/tracing/events/sched/sched_switch/id

While the current implementation should only need "file r_file_perms",
as it constructs the full path to the id file, I've also added the
directory-level rule to allow for a possible change in implementation,
as we might want to enumerate all available events ahead of time, which
would require listing the tracefs events/ dir.

The changed neverallow macro was a copypaste mistake.

Example denials without the change:
  avc: denied { read } for name="id" dev="tracefs" ino=5721
  scontext=u:r:traced_perf:s0 tcontext=u:object_r:debugfs_tracing:s0
  tclass=file permissive=1

  avc: denied { open } for
  path="/sys/kernel/tracing/events/sched/sched_switch/id" dev="tracefs"
  ino=5721 scontext=u:r:traced_perf:s0
  tcontext=u:object_r:debugfs_tracing:s0 tclass=file permissive=1

  avc: denied { getattr } for
  path="/sys/kernel/tracing/events/sched/sched_switch/id" dev="tracefs"
  ino=5721 scontext=u:r:traced_perf:s0
  tcontext=u:object_r:debugfs_tracing:s0 tclass=file permissive=1

Tested: collected a profile sampled on "sched/sched_switch" on
        crosshatch-userdebug.
Bug: 170284829
Bug: 178961752
Change-Id: I75427e848ccfdc200c5f9b679ea18fc78e1669d6
2021-01-31 16:44:00 +00:00
Josh Gao
c01ac10fd7 Merge "Revert "Revert "Let crash_dump read /proc/$PID.""" 2021-01-28 21:15:29 +00:00
Josh Gao
da0d8d82cc Revert "Revert "Let crash_dump read /proc/$PID.""
This reverts commit b400de4d6c.

Test: treehugger
Change-Id: I2d271297fd0ea723a33d1fef5bcf835b8abe2498
2021-01-28 20:56:17 +00:00
Treehugger Robot
883de3cd2e Merge "Add vendor_public_framework_file type to SEPolicy" 2021-01-28 11:41:00 +00:00
Oliver Woodman
bc41c14ffd Merge "Define SOC sysprop policy" 2021-01-28 09:12:52 +00:00
Tianjie Xu
ca2775667a Merge "Set context for hash algorithm properties." 2021-01-28 03:03:21 +00:00
Bob Badour
e1bce3710e Merge "Fix license_type. Contains Apache" 2021-01-27 19:15:16 +00:00
Andrei-Valentin Onea
ef796f6180 Merge "Add data directory for appcompat" 2021-01-27 18:17:20 +00:00
Marco Ballesio
f054268ab1 Merge "Revert^2 "sepolicy: rules for uid/pid cgroups v2 hierarchy"" 2021-01-27 16:40:02 +00:00
Andrei Onea
850842f77c Add data directory for appcompat
This directory is used to store override config, so that they can
persist across reboot.

Test: atest CompatConfigTest
Bug: 145509340
Change-Id: I5e8f2b3093daeccd6c95dff24a8c6c0ff31235ca
2021-01-27 15:04:31 +00:00
Oliver Woodman
164ba2bd39 Define SOC sysprop policy
BUG: 158284209
Test: atest android.os.cts.BuildTest
Change-Id: I7df7e575072c37ca379b97f60cc6c0850a02bcd1
2021-01-27 13:49:00 +00:00
Treehugger Robot
09c0808984 Merge "Fix sepolicy to netd." 2021-01-27 11:21:23 +00:00
steven_fann
d3e8f6fc84 Fix sepolicy to netd.
Allow netd to get adb port from property service.adb.tcp.port

Bug: b/161861298
Test: atest android.net.cts.Ikev2VpnTest#testStartStopVpnProfileV4

Change-Id: I05ce21683b01cf05a16b9fb30030cf4fc879fb20
2021-01-27 17:34:01 +08:00
Howard Chen
f4f29d36ef Merge "Add permissions required to install the DSU to a SD card" 2021-01-27 08:40:34 +00:00
Howard Chen
4db8cbd552 Add permissions required to install the DSU to a SD card
Bug: 171861574
Test: execute following command on a device with a SD card inserted
       adb shell am start-activity \
        -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
        -a android.os.image.action.START_INSTALL \
        -d file:///storage/emulated/0/Download/system.raw.gz \
        --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
        --el KEY_USERDATA_SIZE 4294967296

Change-Id: I5c1c170ade9c570c7dab7cb7aff5f099db4b3d8c
2021-01-27 06:36:12 +00:00
Marco Ballesio
a54bed6907 Revert^2 "sepolicy: rules for uid/pid cgroups v2 hierarchy"
51c04ac27b

Change-Id: Idc35a84b5faabfb9bdd7a7693f51b11938eb0489
2021-01-27 06:07:48 +00:00
Bob Badour
183cf5b834 Fix license_type. Contains Apache
See: http://go/android-license-checking-v2-lsc

Test: m all

Bug: 151953481
Bug: 151177513
Bug: 67772237
Change-Id: I62bf6566b54074f39d0d3b94eef8df67ebe7d36b
2021-01-26 17:01:32 -08:00
Treehugger Robot
4fb66f04d7 Merge "Add sepolicy for app hibernation system service" 2021-01-26 22:23:13 +00:00
Amy Zhang
7a7c41b3bc Merge "Allow TunerService to find and call TunerResourceManager Service" 2021-01-26 20:59:58 +00:00
Amy Zhang
ec7079b1ed Allow TunerService to find and call TunerResourceManager Service
Test: atest android.media.tv.tuner.cts
Bug: 159067322
Change-Id: I00982a9b7ddc68ea8bf89c7e24b65a00d3d14646
2021-01-26 19:14:33 +00:00
Jerome Gaillard
9d4470e7c2 Merge "Revert "Let crash_dump read /proc/$PID."" 2021-01-26 16:49:53 +00:00
Dorin Drimus
84cd7087d5 Add vendor_public_framework_file type to SEPolicy
And allow access from system apps to vendor libs public only for system.
These files should be marked individually by OEMs. Maintainance
ownership for these libraries is also OEM's responsability.
Similar with vendor_public_libs_file type, this allows for an explicit
labeling of OEM system apps that can access libs from vendor.

Bug: 172526961
Test: build-only change, policy builds
Change-Id: I7d4c8232e0b52e73f373d3347170c87ab2dcce52
2021-01-26 15:59:37 +01:00
Kalesh Singh
d37f2e9d65 Merge "Sepolicy for mm events trace instance" 2021-01-26 14:33:39 +00:00
Jerome Gaillard
b400de4d6c Revert "Let crash_dump read /proc/$PID."
Revert submission 1556807-tombstone_proto

Reason for revert: b/178455196, Broken test: android.seccomp.cts.SeccompHostJUnit4DeviceTest#testAppZygoteSyscalls on git_master on cf_x86_64_phone-userdebug

Reverted Changes:
Ide6811297:tombstoned: switch from goto to RAII.
I8d285c4b4:tombstoned: make it easier to add more types of ou...
Id0f0fa285:tombstoned: support for protobuf fds.
I6be6082ab:Let crash_dump read /proc/$PID.
Id812ca390:Make protobuf vendor_ramdisk_available.
Ieeece6e6d:libdebuggerd: add protobuf implementation.

Change-Id: I4a9d5171e978053150404956ede18656058d1ac1
2021-01-26 12:36:12 +00:00
Alex Agranovich
93fcd51689 Merge "Change SELinux policy for texttospeech manager service." 2021-01-26 12:26:31 +00:00
Josh Gao
a3b3415bdd Merge "Let crash_dump read /proc/$PID." 2021-01-25 22:18:48 +00:00
Winson Chiu
f8ad8c08ea Add domain_verification_service
For upcoming @SystemApi DomainVerificationManager.

Test: manual, accessing new manager from test app works

Change-Id: Ic73733dce3e9152af9c6f08fb7e460fa5a01ebdf
2021-01-25 19:09:50 +00:00
Kalesh Singh
aab7a73868 Sepolicy for mm events trace instance
Allow traced_probes read write access to configure
mm_events trace instance and poll trace_pipe_raw

Bug: 155928119
Test: No denials in logcat
Change-Id: Ib65ab2e7be8daa6b8c412ffea909072583db7002
2021-01-25 12:01:27 -05:00
Randall Huang
29c54ec937 Merge "Allow vold to check apex files" 2021-01-25 09:13:45 +00:00
Seigo Nonaka
1237d422ef Merge "Add /data/fonts/files directory" 2021-01-25 05:47:03 +00:00
Yo Chiang
1e6e1bd7b5 Merge "Revert "Suppress avc denials due to missing kernel config on mixed version boot test"" 2021-01-24 23:37:12 +00:00
Alex Agranovich
39ad3df3eb Change SELinux policy for texttospeech manager service.
Bug: 178112052
Test: Manual verification ($ adb shell service list)
Change-Id: Ibaf5d3f3c0565d9c61d03ffec62d8e222c9f5975
2021-01-24 16:18:28 +02:00
Linzhao Ye
bab989d315 Merge "Add SePolicy for system_server accessing sysfs uhid." 2021-01-23 17:08:47 +00:00
Josh Gao
46a9721673 Let crash_dump read /proc/$PID.
The immediate use is to read the dumped process's selinux label, but
we'll want to add more information that relies on this (e.g. process
uptime via parsing /proc/$PID/stat).

Test: treehugger
Change-Id: I6be6082abd2091366517c17d02154678652058d6
2021-01-22 13:10:55 -08:00