Commit graph

6586 commits

Author SHA1 Message Date
Treehugger Robot
4fb66f04d7 Merge "Add sepolicy for app hibernation system service" 2021-01-26 22:23:13 +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
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
Chris Ye
c0e7206c73 Add SePolicy for system_server accessing sysfs uhid.
Add SePolicy to allow Android input manager accessing sysfs uhid folder.

Bug: 161633432
Test: dumpsys input and watch for input device battery status.
Change-Id: I6ed1ab45f1cff409982c36627e12e62667819f37
2021-01-22 17:56:45 +00:00
ChengYou Ho
291890a954 Add sepolicy for weaver aidl HAL service
Bug: 176107318
Change-Id: I9ca1a68e45b462c9b6ac912debb196b3a3ca45ba
2021-01-22 06:34:41 +00:00
Tianjie Xu
d06dfa3320 Merge "Make system server a client of boot control HAL" 2021-01-21 23:18:55 +00:00
Kevin Han
4cead73a86 Add sepolicy for app hibernation system service
Add selinux policy so the app hibernation system service can be accessed
by other processes/apps.

Bug: 175829330
Test: builds
Change-Id: I96ea9dd977ec007bc11560601554547749b4df03
2021-01-21 13:22:27 -08:00
Yurii Zubrytskyi
314e6d9450 Merge "IncFS: update SE policies for the new API" 2021-01-21 18:00:33 +00:00
Yifan Hong
3f43fa8596 Merge "Add health storage AIDL service." 2021-01-20 19:45:15 +00:00
Lev Proleev
2cb8a59de8 Merge "Add sepolicy for NNAPI AIDL HAL service" 2021-01-20 19:37:01 +00:00
Lev Proleev
e4414bf228 Add sepolicy for NNAPI AIDL HAL service
This is a shared part that all NN HAL users otherwise would have to
define themselves.

Bug: 172922059
Test: m
Test: VtsHalNeuralnetworksTest on master (locally)
Change-Id: I3616d0afbb115bc0feaed00488855646633da915
2021-01-20 19:34:06 +00:00
Treehugger Robot
c774ceacdd Merge "Change SELinux policy for speech recognizer." 2021-01-20 18:31:26 +00:00
Treehugger Robot
9a0848a4ba Merge "Amend sepolicy for hdmi control service" 2021-01-20 14:25:29 +00:00
Marvin Ramin
ca36ce6e95 Amend sepolicy for hdmi control service
CTS tests are unable to access HdmiControlManager due to sepolicy.

avc:  denied  { find } for pid=8394 uid=10071 name=hdmi_control scontext=u:r:untrusted_app_27:s0:c71,c256,c512,c768 tcontext=u:object_r:hdmi_control_service:s0 tclass=service_manager permissive=0

Bug: 174345748
Test: patched internal master and verified
Change-Id: I5c0b6597116641869a6011c8d66221b8f1babd7c
2021-01-20 10:01:16 +00:00
Yurii Zubrytskyi
80dfa06984 IncFS: update SE policies for the new API
IncFS in S adds a bunch of new ioctls, and requires the users
to read its features in sysfs directory. This change adds
all the features, maps them into the processes that need to
call into them, and allows any incfs user to query the features

Bug: 170231230
Test: incremental unit tests
Change-Id: Ieea6dca38ae9829230bc17d0c73f50c93c407d35
2021-01-19 12:57:15 -08:00
Treehugger Robot
706d5feee2 Merge "Add sepolicy for new system service: media_communication_service" 2021-01-19 18:02:59 +00:00
Gavin Corkery
bd6a8d0746 Merge "Add sepolicy for RebootReadinessDetector" 2021-01-19 09:54:24 +00:00
Orion Hodson
74b129b77c Merge "Permissions for odrefresh and /data/misc/apexdata/com.android.art" 2021-01-19 09:37:36 +00:00
Sergey Volnov
2a682a00d5 Change SELinux policy for speech recognizer.
Bug: 176578753
Test: manual verification ($ adb shell service list)
Change-Id: I3ebf6f5d45d65578b2eaf7efac073731afd10a58
2021-01-18 18:08:48 +00:00
Randall Huang
84f59c8459 Allow vold to check apex files
avc: denied { getattr } for
path="/vendor/apex/com.android.vndk.current.on_vendor.apex"
dev="overlay" ino=237 scontext=u:r:vold:s0
tcontext=u:object_r:vendor_apex_file:s0 tclass=file
permissive=0

Bug: 176128259
Test: boot
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: I5778c287a5a8a95f812210a4ab545897b2bf09de
2021-01-18 07:23:56 +00:00
Tianjie
c447b9b09c Make system server a client of boot control HAL
To support multi-client resume on reboot, the recovery system
service want to query the active boot slot on the next boot; and
abort the reboot if the active slot is different from clients'
expectation.

Denial:
SELinux : avc:  denied  { find } for interface=android.hardware.boot::IBootControl
sid=u:r:system_server:s0 pid=1700 scontext=u:r:system_server:s0
tcontext=u:object_r:hal_bootctl_hwservice:s0 tclass=hwservice_manager permissive=1

Bug: 173808057
Test: adb shell cmd recovery reboot-and-apply ota reason
Change-Id: I6a303d8dcbae89a2287d96ae3116109e2a43bbd6
2021-01-16 19:18:05 -08:00
Yifan Hong
06e4b8417a Add health storage AIDL service.
Test: adb shell sm idle-maint run
Bug: 177470478
Change-Id: Id7ee5af64e8d21eafd041c9e8fa1382f65a3958b
2021-01-15 18:23:01 -08:00
Treehugger Robot
0941c2022d Merge "Add policy for IKeystoreAuthorization AIDL service." 2021-01-15 19:53:16 +00:00
Hunter Knepshield
bbeebab00d Merge "SEPolicy changes for public BugreportManager API." 2021-01-15 19:12:45 +00:00
Hasini Gunasinghe
1a5c2f4ced Add policy for IKeystoreAuthorization AIDL service.
The interaface now provided by IKeystoreAuthorization AIDL interface was
previously provided by Keystore AIDL interface.

This CL adds policy to allow Keystore2 to register
IKeystoreAuthorization aidl service and to allow service manager to
look up and connect to the service.

Bug: 159475191
Test: Needs to be tested in runtime
Change-Id: I56829a8764e0efe55efdc92b75d7a3d918a20dae
2021-01-15 09:43:22 -08:00
Thiébaud Weksteen
d370bc632b Ignore crash_dump access to symlink on /data
Bug: 177643306
Test: build policy
Change-Id: I36744cee0b85f3d6812b142c5bcff95aa0c036bc
2021-01-15 13:18:48 +01:00
Gavin Corkery
e92af1c283 Add sepolicy for RebootReadinessDetector
Test: Builds
Bug: 161353402
Change-Id: I3778e00ee249f5ab1904737196b282de1d315846
2021-01-15 10:56:26 +00:00
Shashwat Razdan
fbe18136fe Merge "Changes in SELinux Policy for smartspace API" 2021-01-15 01:13:32 +00:00
Shashwat Razdan
c97620be76 Changes in SELinux Policy for smartspace API
Bug: 176851064
Test: manual verification ($ adb shell service list)
Change-Id: I2bfa765a7b04f46b22836d295613e629348afbc6
2021-01-14 20:54:03 +00:00
Hunter Knepshield
18312f49b8 SEPolicy changes for public BugreportManager API.
Allow non-system apps to get an instance through
Context#getSystemService, and then dumpstate also needs permissions to
append to public apps' files.

Most carrier apps are not pre-installed, but we still want to allow them
to request connectivity bug reports, which are well-scoped to contain
limited PII and all info should directly relate to connectivity
(cellular/wifi/networking) debugging.

BugreportManager underneath validates that the calling app has carrier
privileges before actually starting the bug report routine. User consent
is requested for every bugreport requested by carrier apps.

Without the dumpstate.te change, the following error will occur:
01-14 20:08:52.394  1755  1755 I auditd  : type=1400 audit(0.0:10): avc: denied { append } for comm="Binder:1755_16" path="/data/user/0/com.carrier.bugreportapp.public/files/bugreports/bugreport-2021-01-14-20-08-51.zip" dev="dm-8" ino=25218 scontext=u:r:dumpstate:s0 tcontext=u:object_r:app_data_file:s0:c7,c257,c512,c768 tclass=file permissive=0
[ 1167.128552] type=1400 audit(1610654932.394:10): avc: denied { append } for comm="Binder:1755_16" path="/data/user/0/com.carrier.bugreportapp.public/files/bugreports/bugreport-2021-01-14-20-08-51.zip" dev="dm-8" ino=25218 scontext=u:r:dumpstate:s0 tcontext=u:object_r:app_data_file:s0:c7,c257,c512,c768 tclass=file permissive=0

Bug: 161393541
Test: atest CtsCarrierApiTestCases:BugreportManagerTest
Change-Id: I443b1f6cd96223ed600c4006bc344c2a8663fdc7
2021-01-14 20:15:34 +00:00
Inseob Kim
150355b1c3 Merge "Revert^2 "Make default_prop only readable from coredomain"" 2021-01-14 09:42:25 +00:00
Inseob Kim
5c011e57a5 Revert^2 "Make default_prop only readable from coredomain"
This reverts commit 32fbfbc016.

Reason for revert: Fixed breakages

Change-Id: I474ee7dd7b82b4f2e02353e8a3fb55e3c410941f
2021-01-14 04:08:16 +00:00
Mitch Phillips
e0bab54ba6 Merge "[MTE] Add memtag sysprop sepolicy." 2021-01-13 18:07:36 +00:00
Hridya Valsaraju
7d457661cc Merge "Allow codec2 to allocate from system-secure heap" 2021-01-13 16:23:52 +00:00
Orion Hodson
8f75f76fbd Permissions for odrefresh and /data/misc/apexdata/com.android.art
odrefresh is the process responsible for checking and creating ART
compilation artifacts that live in the ART APEX data
directory (/data/misc/apexdata/com.android.art).

There are two types of change here:

1) enabling odrefresh to run dex2oat and write updated boot class path
   and system server AOT artifacts into the ART APEX data directory.

2) enabling the zygote and assorted diagnostic tools to use the
   updated AOT artifacts.

odrefresh uses two file contexts: apex_art_data_file and
apex_art_staging_data_file. When odrefresh invokes dex2oat, the
generated files have the apex_art_staging_data_file label (which allows
writing). odrefresh then moves these files from the staging area to
their installation area and gives them the apex_art_data_file label.

Bug: 160683548
Test: adb root && adb shell /apex/com.android.art/bin/odrefresh
Change-Id: I9fa290e0c9c1b7b82be4dacb9f2f8cb8c11e4895
2021-01-13 10:38:22 +00:00
Treehugger Robot
b8e865e1ee Merge "sepolicy: allow init to mount debugfs in userdebug builds" 2021-01-13 04:24:22 +00:00
Hridya Valsaraju
c68de664f9 Allow codec2 to allocate from system-secure heap
Codec2 clients should have the permission to allocate from the
system-secure DMA-BUF heap for secure playback.

avc: denied { ioctl } for path="/dev/dma_heap/system-secure" dev="tmpfs" ino=649
ioctlcmd=0x4800 scontext=u:r:mediaswcodec:s0
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { read } for comm=4E444B204D65646961436F6465635F
name="system-secure" dev="tmpfs" ino=649 scontext=u:r:system_server:s0
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
 avc: denied { open } for comm=4E444B204D65646961436F6465635F
path="/dev/dma_heap/system-secure" dev="tmpfs" ino=649
scontext=u:r:system_server:s0
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
 avc: denied { ioctl } for comm=4E444B204D65646961436F6465635F
path="/dev/dma_heap/system-secure" dev="tmpfs" ino=649 ioctlcmd=0x4800
scontext=u:r:system_server:s0
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { read } for name="system-secure" dev="tmpfs" ino=649
scontext=u:r:mediaswcodec:s0
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { open } for path="/dev/dma_heap/system-secure"
dev="tmpfs" ino=649 scontext=u:r:mediaswcodec:s0
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { read } for
comm=4E444B204D65646961436F6465635F name="system-secure" dev="tmpfs" ino=649
scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1 app=com.android.systemui 0:145):
 avc: denied { open } for
comm=4E444B204D65646961436F6465635F path="/dev/dma_heap/system-secure"
dev="tmpfs" ino=649 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { ioctl } for
comm=4E444B204D65646961436F6465635F path="/dev/dma_heap/system-secure"
dev="tmpfs" ino=649 ioctlcmd=0x4800 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:dmabuf_system_secure_heap_device:s0 tclass=chr_file
permissive=1

Bug: 172527615
Test: manual
Change-Id: I465e5fcd660bb548e93d683e9d20cace7421ed2d
2021-01-12 12:45:01 -08:00
Marco Ballesio
a0a35e0dc2 Merge "sepolicy: allow system_server to read /proc/locks" 2021-01-12 20:22:04 +00:00
David Anderson
9c2b5ef747 Merge "Add a kernel transition to snapuserd." 2021-01-12 19:01:01 +00:00
Marco Ballesio
3eabc1d541 sepolicy: allow system_server to read /proc/locks
Access to /proc/locks is necessary to activity manager to determine
wheter a process holds a lock or not prior freezing it.

Test: verified access of /proc/locks while testing other CLs in the same
topic.
Bug: 176928302

Change-Id: I14a65da126ff26c6528edae137d3ee85d3611509
2021-01-12 10:47:58 -08:00
Tomasz Wasilczyk
c848de1480 Merge "Revert "Revert "hal_can_*: use hal_attribute_service""" 2021-01-12 16:45:24 +00:00
Joanne Chung
8327dc1fb1 Merge "Add rule for new system service" 2021-01-12 11:54:53 +00:00
Florian Mayer
685c74b6b6 Merge "Allow heapprofd central mode on user builds." 2021-01-12 11:40:19 +00:00
Alan Stokes
f4ba047517 Merge "Make shared_relro policy private." 2021-01-12 11:19:54 +00:00
Joanne Chung
993aeab1c7 Add rule for new system service
- Update policy for new system service, used for AiAi/Apps to
  present data in their UI.

Bug: 173243538
Bug: 176208267
Test: manual. Can boot to home and get manager successfully.
Change-Id: Ie88c6fa7ed80c0d695daaa7a9c92e11ce0fed229
2021-01-12 18:00:17 +08:00
ChengYou Ho
f4f75d088a Add sepolicy for authsecret AIDL HAL
Bug: 176107318
Change-Id: I49bc68fb5a92bcbc2f1d2c78f0741f8eff97fc06
2021-01-12 06:01:22 +00:00
Tomasz Wasilczyk
d99750d79e Revert "Revert "hal_can_*: use hal_attribute_service""
This reverts commit 061b56b497.

Reason for revert: second submission attempt

Change-Id: I632968c7c0c369ecc07ec829f59b629c39fb71e9
2021-01-11 18:25:51 +00:00
Florian Mayer
a8a3d8b1bf Allow heapprofd central mode on user builds.
This simplifies operation by removing a special case for user builds.

Test: atest CtsPerfettoTestCases on user
Test: atest CtsPerfettoTestCases on userdebug
Test: atest perfetto_integrationtests on userdebug
Bug: 153139002
Change-Id: Ibbf3dd5e4f75c2a02d931f73b96fabb8157e0ebf
2021-01-11 17:19:02 +00:00
Mitch Phillips
eaf1404d8a [MTE] Add memtag sysprop sepolicy.
These flags should be writeable to the shell for both root and non-root
users. They should be readable everywhere, as they're read in libc
during initialization (and there's nothing secret to hide). We just
don't want to allow apps to set these properties.

These properties are non-persistent, are for local developer debugging
only.

Bug: 135772972
Bug: 172365548
Test: `adb shell setprop memtag.123 0` in non-root shell succeeds.
Change-Id: If9ad7123829b0be27c29050f10081d2aecdef670
2021-01-11 08:35:58 -08:00
ChengYou Ho
553afe7242 Add sepolicy for oemlock aidl HAL
Bug: 176107318
Change-Id: I26f8926401b15136f0aca79b3d5964ab3b59fbdd
2021-01-11 05:57:17 +00:00
Gavin Corkery
b46e956d97 Merge "Add sepolicy for /metadata/watchdog" 2021-01-08 08:20:45 +00:00
Hyundo Moon
8b0456720a Add sepolicy for new system service: media_communication_service
Bug: 175511943
Test: Manaully (in internal master)
Change-Id: Ic2b6f2634c0e82348482b246cddae42da606591c
2021-01-08 17:18:30 +09:00
Hridya Valsaraju
90eadaac59 sepolicy: allow init to mount debugfs in userdebug builds
This change will help debug builds with keeping debugfs
disabled during run time. Instead, debugfs will be mounted by init
to enable boot time initializations to set up debug data collection
and unmounted after boot. It will be also be mounted by dumpstate
for bug report generation and unmounted after.

It resolves the following avc denial:
avc: denied { mounton } for comm="init" path="/sys/kernel/debug" dev="debugfs"
 ino=1 scontext=u:r:init:s0 tcontext=u:object_r:debugfs:s0 tclass=dir permissive=0

Bug: 176936478
Test: make && boot
Change-Id: I5bc819eb0cc36bdc32565c17a16da8838baf946a
2021-01-07 21:32:24 -08:00
Gavin Corkery
b0aae28b41 Add sepolicy for /metadata/watchdog
See go/rescue-party-reboot for more context.

One integer will be stored in a file in this
directory, which will be read and then deleted at the
next boot. No userdata is stored.

Test: Write and read from file from PackageWatchdog
Bug: 171951174

Change-Id: I18f59bd9ad324a0513b1184b2f4fe78c592640db
2021-01-07 19:42:56 +00:00
Jaegeuk Kim
dc16f6d896 Allow vold to run make_f2fs
type=1400 audit(1901536.380:4): avc: denied { ioctl } for comm="make_f2fs" path="/dev/block/dm-9" dev="tmpfs" ino=30744 ioctlcmd=0x1277 scontext=u:r:vold:s0 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0

Bug: 172378121
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Iff0ae7a8ff3dd1d4fa3fd29a4db218eaac9ba253
2021-01-05 18:06:18 -08:00
Steven Moreland
4008d6242d Merge "hal_audiocontrol: use hal_attribute_service" 2021-01-05 18:12:56 +00:00
Alan Stokes
5b73b80b0d Make shared_relro policy private.
Nothing should be depending on the details.

I haven't removed public/shared_relro.te entirely - there's a reference to shared_relro in public/app.te, and at least one reference to the domain outside of system policy.

Fix: 175867372
Test: Presubmits
Change-Id: I5fd4090f4b445520c4fa767c1835a5bb4e9cb146
2021-01-05 09:48:10 +00:00
Inseob Kim
726dc022db Merge "Revert "Make default_prop only readable from coredomain"" 2021-01-05 08:56:07 +00:00
Jackal Guo
32fbfbc016 Revert "Make default_prop only readable from coredomain"
This reverts commit 082ced1951.

Reason for revert: b/176784961

Change-Id: Ia85667216d63084e9e23aefe1d3bfd7942d51a2a
2021-01-05 08:47:57 +00:00
Treehugger Robot
3acee7da98 Merge "Make default_prop only readable from coredomain" 2021-01-05 05:25:14 +00:00
Nazanin Bakhshi
51872d888d Merge "Revert "hal_can_*: use hal_attribute_service"" 2020-12-29 22:57:03 +00:00
Nazanin Bakhshi
061b56b497 Revert "hal_can_*: use hal_attribute_service"
This reverts commit c8e937efe5.

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?build-cop=true, bug 176180039>

Change-Id: I0aff6ebba8b6a7a45af7229a0506f0426a8ebadf
2020-12-29 22:53:29 +00:00
Peiyong Lin
30b809bd97 Merge "Add SEPolicy rules for game service." 2020-12-29 22:18:24 +00:00
Steven Moreland
8e5c457f2e Merge "hal_can_*: use hal_attribute_service" 2020-12-29 20:43:20 +00:00
Chiachang Wang
bd15e9ac63 Merge "Add new selinux type for radio process" 2020-12-29 00:24:12 +00:00
Peiyong Lin
9449176122 Add SEPolicy rules for game service.
Bug: b/174956354
Test: manual
Change-Id: Ife1aac3435427f89f5701e4ead0763839f01d61b
2020-12-24 18:46:25 -08:00
Chiachang Wang
813c25fc91 Add new selinux type for radio process
ConnectivityService is going to become mainline and can not
access hidden APIs. Telephony and Settings were both accessing
the hidden API ConnectivityManager#getMobileProvisioningUrl.
Moving #getMobileProvisioningUrl method into telephony means
that there is one less access to a hidden API within the overall
framework since the Connectivity stack never needed this value.
Thus, move getMobileProvisioningUrl parsing to telephony surface
and provide the corresponding sepolicy permission for its access.

The exsting radio_data_file is an app data type and may allow
more permission than necessary. Thus create a new type and give
the necessary read access only.

Bug: 175177794
Test: verify that the radio process could read
      /data/misc/radio/provisioning_urls.xml successfully
Change-Id: I191261a57667dc7936c22786d75da971f94710ef
2020-12-24 15:11:15 +08:00
Steven Moreland
7042d472a7 Merge "hal_power_stats: use hal_attribute_service" 2020-12-23 20:18:03 +00:00
Treehugger Robot
9afb3747fe Merge "sepolicy: set expandattribute false for dmabuf_heap_device_type" 2020-12-23 09:16:42 +00:00
Hridya Valsaraju
eab2858649 sepolicy: set expandattribute false for dmabuf_heap_device_type
This is needed to avoid build failure in target bertha_arm64.

Test: make
Bug: 176124106
Change-Id: Id24eaa00dc5d601deb7533ac1d484a76535c8df0
2020-12-23 05:14:31 +00:00
Steven Moreland
bc2624a041 hal_power_stats: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_power_stats_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I710eadc4c4f4642937aa16a25fe559e1cd3c9224
2020-12-23 01:38:03 +00:00
Steven Moreland
c8e937efe5 hal_can_*: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_can_*_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I876b50e4184ef787117d5ca67c7fbd522d82687c
2020-12-23 01:36:02 +00:00
Steven Moreland
42a02d77ed hal_audiocontrol: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_audiocontrol_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I2046e31f5cf04b560b842a03eafbec597443f15f
2020-12-23 01:26:58 +00:00
Kalesh Singh
24ada7dbee Reland: Memtrack HAL stable aidl sepolicy
Bug: 175021432
Test: Check logcat for denials
Change-Id: Id92fc543791072d8682e3a89cbf08370007108bf
2020-12-22 16:08:53 -05:00
Treehugger Robot
831fddd794 Merge "Allow coredomain access to only approved categories of vendor heaps" 2020-12-21 20:34:06 +00:00
Treehugger Robot
0afbe0eb98 Merge "Clean up keymint service policy." 2020-12-17 20:40:08 +00:00
Alan Stokes
c18e79e90c Add shared_relro dontaudit.
Use of StrictMode in framework code running in the app process can
generate a denial:

avc:  denied  { find } for pid=4050 uid=1037 name=network_management
 scontext=u:r:shared_relro:s0:c13,c260,c512,c768
 tcontext=u:object_r:network_management_service:s0
 tclass=service_manager permissive=0

But the code handles the failure properly so we suppress this.

Bug: 174750397
Test: Manual
Change-Id: I7b334db0dde4365ff19a7cf42a5139f35b5e6512
2020-12-17 14:10:07 +00:00
Hridya Valsaraju
8c9cf62edb Allow coredomain access to only approved categories of vendor heaps
One of the advantages of the DMA-BUF heaps framework over
ION is that each heap is a separate char device and hence
it is possible to create separate sepolicy permissions to restrict
access to each heap.
In the case of ION, allocation in every heap had to be done through
/dev/ion which meant that there was no away to restrict allocations in
a specific heap.

This patch intends to restrict coredomain access to only approved
categories of vendor heaps. Currently, the only identified category
as per partner feedback is the system-secure heap which is defined
as a heap that allocates from protected memory.

Test: Build, video playback works on CF with ION disabled and
without sepolicy denials
Bug: 175697666

Change-Id: I923d2931c631d05d569e97f6e49145ef71324f3b
2020-12-16 10:08:54 -08:00
Joel Galenson
1c7eb3c3bd Clean up keymint service policy.
Test: VtsAidlKeyMintTargetTest
Change-Id: Id6e83d63ffb1de7c48dbdf435fd9988e9174cfe2
2020-12-16 08:59:09 -08:00
Janis Danisevskis
de98dd9726 Merge changes Icb1f60b3,I935f2383
* changes:
  Allow keystore to talk to keymint
  Add policy for the security compatibility hal service.
2020-12-16 01:24:33 +00:00
Kalesh Singh
3619437561 Merge "Revert "Memtrack HAL stable aidl sepolicy"" 2020-12-16 00:48:06 +00:00
Kalesh Singh
5db6857fe1 Revert "Memtrack HAL stable aidl sepolicy"
Revert "Add android.hardware.memtrack-unstable-ndk_platform"

Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I0c55ee100c7fd8d09a5b188a39b17c95c8a43c39
2020-12-16 00:19:38 +00:00
Janis Danisevskis
191940036b Add policy for the security compatibility hal service.
This service manager is registered by Keystore 2.0 to lookup legacy
wrapper services.

Keystore 2.0 is now written in rust. We have AIDL binding for rust but
no HIDL binding. Keystore 2.0 has to support legacy HIDL based
interfaces. So we implement the AIDL KeyMint interface in terms of the
legacy HIDL Keymaster <=  V4.1 devices in C++. This wrapper is linked
into the Keystore 2.0 process but it cannot be called directly but must
be treated like a remote binder instead. However, we cannot register
these wrappers directly, because a) we are not a vendor component, and
b) it would conflict with genuine KeyMint devices on newer devices. So
Instead we register Keystore 2.0 itself as a legacy service provider.
Which it can query itself for the legacy wrappers if it does not find
a genuine KeyMint implementation to connect to.

Bug: 171351607
Test: Keystore 2.0 can register this Service and lookup legacy wrapper
      services.
Change-Id: I935f23837721ce126531236f4920dba469a47be4
2020-12-15 08:23:52 -08:00
Alan Stokes
63d875612f Merge "Split user_profile_data_file label." 2020-12-15 14:25:51 +00:00
David Anderson
f4cba7eed5 Add a kernel transition to snapuserd.
The initial launch of snapuserd happens in first-stage init, before
sepolicy is loaded, since snapuserd is needed to mount initial
partitions. After sepolicy is loaded, we immediately re-launch snapuserd
in the correct context. This requires a transition similar to init.

The "allow" lines for the kernel happen in permissive mode, since we
need to relabel critical parts of /dev/block in order to re-launch
snapuserd.

Bug: 173476209
Test: OTA applies with ro.virtual_ab.compression.enabled = true
Change-Id: I80184e737ccb558107a14b384a61f7fec31c9428
2020-12-14 23:48:08 -08:00
Treehugger Robot
772d6b425a Merge "Add policy for the android protected confirmation service." 2020-12-15 05:26:17 +00:00
Treehugger Robot
6d560dee90 Merge "Memtrack HAL stable aidl sepolicy" 2020-12-14 18:36:10 +00:00
Hyunyoung Song
9f198f1c68 Merge "New system service: search_ui_service" 2020-12-14 16:36:02 +00:00
Inseob Kim
082ced1951 Make default_prop only readable from coredomain
default_prop has been readable from coredomain and appdomain. It's too
broad, because default_prop is a context for properties which don't have
matching property_contexts entries.

From now on, only coredomain can read default_prop. It's still broad,
but at least random apps can't read default_prop anymore.

Bug: 170590987
Test: SELinux denial boot test for internal devices
Change-Id: Ieed7e60d7e4448705c70e4f1725b2290e4fbcb4a
2020-12-14 16:58:23 +09:00
Shawn Willden
b41f4985a9 Revert^2 "Move keymint to android.hardware.security."
16d61d0383


Bug: 175345910
Bug: 171429297
Exempt-From-Owner-Approval: re-landing topic with no changes in this CL.
Change-Id: I1352c6b46b007dba3448b3c9cbdf454d7862a176
2020-12-11 20:36:53 +00:00