Commit graph

29247 commits

Author SHA1 Message Date
Emilian Peev
87a3f24857 Merge "Define vendor side property "ro.camerax.extensions.enabled"" 2021-04-14 16:20:16 +00:00
Treehugger Robot
539440d228 Merge "OWNERS: add inseob@google.com" 2021-04-14 15:27:58 +00:00
Yo Chiang
466964d401 Merge "se_compat_cil: Prepend generated files with a header" 2021-04-14 08:30:38 +00:00
Yi-Yo Chiang
b44e506223 se_compat_cil: Prepend generated files with a header
to ensure the file size is greater than 0, as secilc cannot handle
zero-sized cil files.

Fixes: 185256986
Bug: 183362912
Test: Forrest re-run broken test
Change-Id: Ief3039d38728fbeff67c6e39d6b15bddb006e5f8
2021-04-14 07:41:23 +00:00
Jeff Vander Stoep
4b5ed6453a OWNERS: add inseob@google.com
For ownership of system properties and microdroid policy.

Test: n/a
Change-Id: I8b729d0c6b9445b37d94858ae803db7db5eb9ff7
2021-04-14 09:37:35 +02:00
Yo Chiang
86a8275378 Merge "Remove references to BOARD_PLAT_{PUBLIC,PRIVATE}_SEPOLICY_DIR" 2021-04-14 06:55:59 +00:00
Roshan Pius
0b8eafb54b Merge "Uwb: Create a new Uwb system service" 2021-04-14 00:52:10 +00:00
Emilian Peev
a974640390 Define vendor side property "ro.camerax.extensions.enabled"
Add "ro.camerax.extensions.enabled" vendor-specific property.
Allow public apps to read this property.

Bug: 171572972
Test: Camera CTS
Change-Id: Id5fadedff6baaaebe5306100c2a054e537aa61ed
2021-04-13 16:42:10 -07:00
Zimuzo Ezeozue
a62ecbdf51 Merge "Allow appdomain sepolicy search access to /mnt/media_rw" 2021-04-13 22:49:51 +00:00
Alistair Delva
5bbeaa39d8 Merge "Suppress some su capability2 related denials" 2021-04-13 20:03:53 +00:00
Alistair Delva
124c77140d Suppress some su capability2 related denials
The su domain is always permissive. Operations which occur in this
domain should never be logged.

Addresses the following denials:

avc: denied { bpf } for comm="bpf_module_test" capability=39
scontext=u:r:su:s0 tcontext=u:r:su:s0 tclass=capability2 permissive=1

Bug: 185230825
Test: builds
Change-Id: Id8bd355a9636fb5e9d26ef570c2cf7e4273b08b5
2021-04-13 08:24:14 -07:00
Zim
b61bcc87ed Allow appdomain sepolicy search access to /mnt/media_rw
untrusted apps were already granted this policy and we now extend it
to all apps. This allows FileManager apps with the
MANAGE_EXTERNAL_STORAGE permisssion to access USB OTG volumes mounted
on /mnt/media_rw/<vol>.

This permission access in the framework is implemented by granting
those apps the external_storage gid. And at the same time USB volumes
will be mounted on /mnt/media_rw/<vol> with the external_storage gid.
There is no concern of interferring with FUSE on USB volumes because
they are not FUSE mounted.

For sdcards (non-USB) volumes mounted on /mnt/media_rw/<vol>, those
volumes are mounted with the media_rw gid, so even though they are
FUSE mounted on /storage/<vol>, arbitrary apps cannot access the
/mnt/media_rw path since only the FUSE daemon is granted the media_rw
gid.

Test: Manual
Bug: 182732333
Change-Id: I70a3eb1f60f32d051f44253b0db2c7b852d79ba1
2021-04-13 14:56:44 +00:00
Nikita Ioffe
2bac3f308d Merge "Allow adbd to pull apexes from /data/apex/active" 2021-04-13 11:12:14 +00:00
Maciej Żenczykowski
755faacde2 Merge "network_stack - dontaudit getopt on key_socket" 2021-04-13 09:11:32 +00:00
Yo Chiang
ac94a46634 Merge changes I5275e9ce,I2fb9b10b
* changes:
  Change $(ver).compat.cil from prebuilt_etc to se_compat_cil
  Add system_ext_$(ver).compat.cil
2021-04-13 08:29:52 +00:00
Yo Chiang
ec92ea5890 Merge "Add se_compat_cil module" 2021-04-13 08:24:41 +00:00
Nikita Ioffe
17bd4dda4a Allow adbd to pull apexes from /data/apex/active
Test: adb pull /data/apex/active/com.android.apex.cts.shim@v2.apex
Bug: 184886365
Change-Id: Ibaac390a99e65a8b388d3c62761d96ec8f8e0846
2021-04-12 23:34:31 +00:00
David Anderson
29e51c2095 Merge "Allow update_engine to scan /sys/fs and /sys/fs/f2fs." 2021-04-12 21:04:08 +00:00
Yi-Yo Chiang
a22511269f Change $(ver).compat.cil from prebuilt_etc to se_compat_cil
Use the new se_compat_cil module type to install compatibility cil
files.

Bug: 183362912
Test: Presubmit; Noop in terms of build artifact.
Change-Id: I5275e9ce524185ce2d228133763456df43834093
2021-04-13 02:58:21 +08:00
Yi-Yo Chiang
41c34d6a70 Add se_compat_cil module
Installs backwards compatibility cil files.

Bug: 183362912
Test: Presubmit
Test: Add a $(ver).compat.cil under SYSTEM_EXT_PRIVATE_SEPOLICY_DIR and
  verify the file is installed under /system_ext/etc/selinux/mapping/
Change-Id: I5e2c6b8dfa8df431edfe96f29daae463b130367f
2021-04-13 02:58:21 +08:00
Yi-Yo Chiang
8be93c00b1 Add system_ext_$(ver).compat.cil
These are the system_ext counterpart of $(ver).compat.cil. They would
contain device specific compat rules that compliment $(ver).compat.cil,
which are the platform specific compat rules.

Bug: 183362912
Test: Add a $(ver).compat.cil under SYSTEM_EXT_PRIVATE_SEPOLICY_DIR and
  verify the file is installed under /system_ext/etc/selinux/mapping/
Change-Id: I2fb9b10bb3bcf112e33f504964fb705e3b63782b
2021-04-13 02:58:21 +08:00
Roshan Pius
2a1610b4e0 Uwb: Create a new Uwb system service
This service will intercept all UwbManager API calls and then perform
necessary permission checks before forwarding the call to the vendor
UWB service. Adding sepolicy permissions for exposing the service that
handles all public API's.

Bug: 183904955
Test: atest android.uwb.cts.UwbManagerTest
Change-Id: Icce4d2f586926421c06e8902a91533002c380b8d
2021-04-12 10:26:24 -07:00
Yi-Yo Chiang
40073d4c7f Remove references to BOARD_PLAT_{PUBLIC,PRIVATE}_SEPOLICY_DIR
These variables are deprecated.

Bug: 183362912
Test: Presubmit; Noop
Change-Id: I80db5342044a06feb1451fbe661989fe4d191e74
2021-04-12 20:01:35 +08:00
Wei Wang
4ea9b0b9df Merge "Rename hint service into performance_hint service" 2021-04-09 23:07:51 +00:00
Wei Wang
7b039717a9 Rename hint service into performance_hint service
Bug: 158791282
Test: Compiles, boots
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I1bd2757f90c040353a176f2dfd0142222753cf8f
2021-04-09 12:35:10 -07:00
Yabin Cui
006c740746 Merge "Add permissions in profcollectd to parse kernel etm data." 2021-04-09 17:15:26 +00:00
Maciej Żenczykowski
e70c300908 network_stack - dontaudit getopt on key_socket
W droid.tethering: type=1400 audit(0.0:10): avc: denied { getopt } for scontext=u:r:network_stack:s0 tcontext=u:r:network_stack:s0 tclass=key_socket permissive=0

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia761911feb875554e5563f44a44dd3702ade41ea
2021-04-09 07:31:09 -07:00
Kalesh Singh
d6924e587e Merge "Revert "gmscore_app: Don't audit memtrack hal denials"" 2021-04-09 02:03:50 +00:00
Kalesh Singh
7de79540fb Revert "gmscore_app: Don't audit memtrack hal denials"
This reverts commit cdf7b0f374.

Reason for revert: libmemtrack now uses a memtrackproxy_service, which allows app access

Change-Id: Id3858a0b813b822fc17f77e14d46525942048066
2021-04-09 00:04:53 +00:00
Yabin Cui
bd4c9e8530 Add permissions in profcollectd to parse kernel etm data.
To parse etm data for kernel and kernel modules, add below permissions
to profcollectd:
1. Get kernel start address and module addresses from /proc/kallsyms
and /proc/modules.
2. Get kernel build id from /sys/kernel/notes.
3. Read kernel module files in vendor dir.

Bug: 166559473
Test: run profcollectd.

Change-Id: I2e0b346379271fadc20e720722f7c9a687335ee2
2021-04-08 16:03:59 -07:00
David Anderson
5a0d5ccdf7 Allow update_engine to scan /sys/fs and /sys/fs/f2fs.
When a bug causes us to leak a file descriptor or resource in the OTA
path, it can cause unremovable device-mapper devices. The companion CL
in this topic attempts to diagnose such problems by performing a quick
scan for things depending on an unremovable block device: mounts, loop
devices, and other device-mapper nodes.

To detect mounts it would normally be enough to scan /proc/mounts, but
with MNT_DETACH the filesystem may still be mounted but not visible to
update_engine. This is exactly what happened in b/184715543.

To scan for such cases, we look for /sys/fs/ext4/<name> or
/sys/fs/f2fs/<name> where <name> is the block device. To make this work,
we grant update_engine r_dir_perms to sysfs and sysfs_f2fs_dir. It
doesn't actually need to read the contents of any files, the presence of
the inode is good enough.

Bug: N/A
Test: manual test
Change-Id: Ib085c9c814180b360e2170135011261bbb7e35b6
2021-04-08 13:50:50 -07:00
Yabin Cui
49806a1067 Merge "Add vendor_kernel_modules type to public." 2021-04-08 17:49:16 +00:00
Satya Tangirala
10c2ed4e47 Merge "Keystore 2.0: sepolicy changes for vold to use keystore2" 2021-04-08 00:48:19 +00:00
Treehugger Robot
c73f064573 Merge "Define ro.board.api_level property" 2021-04-08 00:15:06 +00:00
Kalesh Singh
df4b04571b Merge "Sepolicy for mm_events" 2021-04-07 15:22:40 +00:00
Satya Tangirala
a999004528 Keystore 2.0: sepolicy changes for vold to use keystore2
Vold needs to be able to search for keystore2 and keystore2 maintenance
services, and call methods provided by those services.

Bug: 181910578
Change-Id: I6e336c3bfaabe158b850dc175b6c9a942dd717be
2021-04-07 02:14:33 -07:00
Kalesh Singh
326fc27064 Sepolicy for mm_events
Allow mm_events to periodically arm the mm_events
perfetto trace config if mm_events is enabled.

Bug: 183037386
Test: boot; setprop persist.mm_events.enabled true; No avc denials
Change-Id: Ia9760001e7fb591f18e3e816a63281167a658c74
2021-04-06 22:46:32 -04:00
Hung-ying Tyan
794b7d83ec Merge "Add sepolicy for installd check sdcardfs usage property" 2021-04-07 00:49:28 +00:00
Justin Yun
02e5045a87 Define ro.board.api_level property
ro.board.api_level shows the current vendor api level under GRF.
It can be manually defined by setting BOARD_API_LEVEL. Unless
BOARD_API_LEVEL is defined, the ro.board.api_level property will be
defined automatically based on BOARD_SHIPPING_API_LEVEL and
PLATFORM_SDK_VERSION.

Bug: 176950752
Test: getprop ro.board.api_level
Change-Id: I03eeec8d8206abdd0565423d1b6a507d86d9b168
2021-04-07 09:02:44 +09:00
Yabin Cui
2e2df6b3a7 Add vendor_kernel_modules type to public.
Bug: 166559473
Bug: 183135316
Test: build and boot
Change-Id: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
Merged-In: Idc9f6235a1b69236ce274d9b3173f6d39ee04c82
(cherry picked from commit 3b23f17eae)
2021-04-06 14:28:36 -07:00
Treehugger Robot
8fa9b428c7 Merge "Allow derive_classpath to read /apex." 2021-04-06 19:06:56 +00:00
Wei Wang
a02227bd7a Merge "Add SEpolicy for HintManagerService" 2021-04-06 16:49:26 +00:00
Artur Satayev
4c6d3081fd Allow derive_classpath to read /apex.
Individual apexes may contribute jars to BOOTCLASSPATH and friends.
Configuration for these contributions are in /apex/foo/etc/ files that
derive_classpath service reads and processes.

Bug: 180105615
Test: presubmit && DeviceBootTest
Change-Id: I61379e55f2ad55e1c65956b854e5a9b8872c61df
2021-04-06 15:14:19 +01:00
Jenny Ho
e0efb683a7 Add support for test_harness property
Bug: 180511460
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I796b29528522a615c8b15b0d7e53bb1903f1d965
2021-04-06 10:21:01 +00:00
Wei Wang
4b98ddfee4 Add SEpolicy for HintManagerService
Bug: 158791282
Test: Compiles, boots
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I76ad7858076b47990e5ddf3acb880443d0074e42
2021-04-06 00:01:57 -07:00
Yo Chiang
0b4677c566 Merge "Add rules for calling ReadDefaultFstab()" 2021-04-06 03:37:58 +00:00
Suren Baghdasaryan
c461b3b778 Add lmkd. ro.lmk.thrashing_limit_critical property policies
Add policies to control ro.lmk.thrashing_limit_critical lmkd property.

Bug: 181778155
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I25eeb84e6e073510e2f516fd38b80c67afe26917
2021-04-06 00:40:56 +00:00
Inseob Kim
ad82d6d5db Merge "Add plat_vendor tag to se_build_files for microdroid" 2021-04-06 00:38:10 +00:00
Josh Gao
d6d8a0fa5e Merge "Add neverallow to prevent reading heap dumps." 2021-04-05 23:55:11 +00:00
Josh Gao
f15793fa09 Merge "Make init.svc.adbd globally readable." 2021-04-05 23:47:56 +00:00