Commit graph

28331 commits

Author SHA1 Message Date
Tom Cherry
1950978293 Remove tomcherry from OWNERS
I've left the Android team.

Test: n/a
Change-Id: I51c383e87e07cfd452e64576875864249d04a4ab
2021-01-15 11:03:11 -08:00
Treehugger Robot
ad62911980 Merge "Ignore crash_dump access to symlink on /data" 2021-01-15 15:42:40 +00:00
Thiébaud Weksteen
26d1850b1e Track zygote denials on labeledfs
Bug: 170748799
Test: build policy
Change-Id: I7f244f1e17060251cb1d0896716fee711ec10693
2021-01-15 13:54:11 +01: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
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
Primiano Tucci
9dd873d725 Merge "Allow dumpstate to snapshot traces and attach them to bug reports" 2021-01-14 18:59:40 +00:00
Treehugger Robot
cf7118cc65 Merge "Allow mediacodec to allocate from the DMA-BUF system heap" 2021-01-14 18:02:59 +00:00
Inseob Kim
150355b1c3 Merge "Revert^2 "Make default_prop only readable from coredomain"" 2021-01-14 09:42:25 +00:00
Hridya Valsaraju
0fee0133c6 Allow mediacodec to allocate from the DMA-BUF system heap
mediacodec currently only has permissions to allocate from ION heaps.
The following permission is required for it to allocate from the
DMA-BUF system heap via the the codec2 allocator.

It resolves the following denial in the sdk_gphone_x86_64-userdebug
target:

01-08 22:43:48.712   337   337 I auditd  : type=1400 audit(0.0:6): avc:
denied { getattr } for comm="android.hardwar"
path="/dev/dma_heap/system-uncached" dev="tmpfs" ino=311
scontext=u:r:mediacodec:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=0

Bug: 170887642
Test: make and boot
Change-Id: I5503ed6ffa47a84f614792de866ddafbec0cdcda
2021-01-14 05:13:54 +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
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
Primiano Tucci
2f99809c43 Allow dumpstate to snapshot traces and attach them to bug reports
Feature description: if a background trace is happening at the
time dumpstate is invoked, the tracing daemon will snapshot
the trace into a fixed path (/data/misc/perfetto-traces/bugreport/).
Dumpstate will attach the trace, if present, to the bugreport.
From a SELinux viewpoint this involves the following permissions:
- Allow dumpstate to exec+trans perfetto --save-for-bugreport
  (this will just send an IPC to traced, which will save the trace).
- Allow dumpstate to list, read and unlink the trace file.
- Create a dedicated label for bugreport traces, to prevent that
  dumpstate gets access to other traces not meant for bug reporting.

Note that this does NOT allow dumpstate to serialze arbitary traces.
Traces must be marked as "eligible for bugreport" upfront in the
trace config (which is not under dumpstate control), by
setting bugreport_score > 0.

Design doc: go/perfetto-betterbug

Bug: 170334305
Test: manual:
      1. start a perfetto trace with bugreport_score > 0
      2. adb shell dumpstate
      3. check that the bugreport zip contains the trace

Change-Id: I259c3ee9d5be08d6b22c796b32875d7de703a230
2021-01-12 14:06: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
Alan Stokes
0fff6e504c Merge "Remove ro.vold.level_from_user." 2021-01-12 11:17:50 +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
Ady Abraham
e0fe9d2c8f Merge "Add a sysprop to control frame rate override" 2021-01-12 02:45:01 +00:00
Lalit Maganti
cde87c0008 Merge "sepolicy: allow traced to access statsd socket" 2021-01-11 20:23:56 +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
Lalit Maganti
9165bf73dc sepolicy: allow traced to access statsd socket
This allows us to log metrics from traced to statsd
for failures. This is required for implementation of
go/perfetto-failure-stats.

This matches the CL aosp/1512303 which adds the initial logging to
traced.

This solves the following denied message from logcat:
avc: denied { write } for name="statsdw" scontext=u:r:traced:s0
tcontext=u:object_r:statsdw_socket:s0

Bug: 177215620
Change-Id: I4cc613c3a8f4d75c4a5c232b996f8a6cffd3ba9d
2021-01-11 14:36:11 +00:00
ChengYou Ho
553afe7242 Add sepolicy for oemlock aidl HAL
Bug: 176107318
Change-Id: I26f8926401b15136f0aca79b3d5964ab3b59fbdd
2021-01-11 05:57:17 +00:00
Ady Abraham
41e369e70f Add a sysprop to control frame rate override
Adding 'ro.surface_flinger.enable_frame_rate_override' to control
whether frame rate override feature should be enabled or not.

Bug: 170502573
Bug: 176940141
Change-Id: Ida0e13f9a7c420f5f363d1feeacf882d8b76a8fa
Test: atest FrameRateOverrideHostTest
2021-01-09 02:33:48 +00:00
Gavin Corkery
b46e956d97 Merge "Add sepolicy for /metadata/watchdog" 2021-01-08 08:20:45 +00: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
Chun-Wei Wang
e88e8a679e Merge "Relabel /data/rollback files as enabling rollback (4/n)" 2021-01-08 04:46:23 +00:00
Bob Badour
9b6eeb3307 Merge "Revert^2 "Export soong license data to make."" 2021-01-07 22:42:08 +00: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
Shubang Lu
ba4e6b89aa Merge "SE policy for tuner service." 2021-01-07 18:34:36 +00:00
Nicolas Geoffray
f5891d67aa Merge "Add boot animation progress system property." 2021-01-07 09:23:35 +00:00
Bob Badour
4eeb6a2eac Revert^2 "Export soong license data to make."
56f419d6c8

Change-Id: I5eebdea9dc8b6f3be1cda23225733df0d78cbbdc
2021-01-06 20:50:49 -08:00
JW Wang
65480a460f Relabel /data/rollback files as enabling rollback (4/n)
We will link files under /data/apex/active and /data/app to
/data/rollback when enabling rollbacks to avoid copy.

When creating hard links, we have to enusre source and target have the
same label to avoid subtle bugs.

We will assign apk_data_file to *.apk files and
staging_data_file to *.apex files under /data/rollback.

Also allow system_server to link /data/apex/active files.

Bug: 168562373
Test: m
Change-Id: I4be38cc8c84494c4ddfa03e37f2af3958bff5dfb
2021-01-07 11:11:54 +08:00
Bob Badour
1135fd71cd Merge "Revert "Export soong license data to make."" 2021-01-06 19:17:44 +00:00
Jaegeuk Kim
dc00a31fe5 Merge "Allow vold to run make_f2fs" 2021-01-06 19:12:35 +00:00
Jerome Gaillard
56f419d6c8 Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I9af3727fba03f6b40cd6d77c7e259ef4c9b7f29d
2021-01-06 19:00:05 +00:00
Bob Badour
c182ed7f74 Merge "Export soong license data to make." 2021-01-06 18:08:06 +00:00
Inseob Kim
72351ce767 Merge "Support building mixed versions of sepolicy" 2021-01-06 05:07:05 +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
Inseob Kim
8ada8a7c1b Support building mixed versions of sepolicy
Now newer system policy and older vendor policy can be built together by
setting following variables:

- BOARD_SEPOLICY_VERS
- BOARD_REQD_MASK_POLICY (copy of older system/sepolicy/reqd_mask)
- BOARD_PLAT_VENDOR_POLICY (copy of older system/sepolicy/vendor)
- BOARD_(SYSTEM_EXT|PRODUCT)_(PUBLIC|PRIVATE)_PREBUILT_DIRS (copy of
  older system_ext and product policies)

Bug: 168159977
Test: try normal build and mixed build
Test: boot and check selinux denials
Change-Id: Ie239580433ffd293fa6891cd665fb5ef83c0a14f
2021-01-06 10:46:15 +09:00