Commit graph

18611 commits

Author SHA1 Message Date
Steven Moreland
b2267841db Merge "private: allow zygote mnt_expand_file:dir getattr;"
am: 180ffccc8f

Change-Id: Id82efff8a08d6bc48c78544879e35ac736f0fe62
2019-03-27 16:18:40 -07:00
Steven Moreland
180ffccc8f Merge "private: allow zygote mnt_expand_file:dir getattr;" 2019-03-27 22:59:49 +00:00
Victor Hsieh
db2334d3aa Merge "Move fs-verity key loading into fsverity_init domain"
am: 3337a33609

Change-Id: I7e4847dbfcce72ec80089a4150fce67782b049aa
2019-03-27 13:40:45 -07:00
Treehugger Robot
3337a33609 Merge "Move fs-verity key loading into fsverity_init domain" 2019-03-27 20:31:19 +00:00
Nick Kralevich
fb9e32b288 Merge "Revert "Temporarily hide denial to fix tests.""
am: 76a1a76b35

Change-Id: Id243cfaf04cafdfaf17837645f73d8640bd49cc4
2019-03-27 10:12:07 -07:00
Treehugger Robot
76a1a76b35 Merge "Revert "Temporarily hide denial to fix tests."" 2019-03-27 16:54:12 +00:00
Victor Hsieh
3d4ee1dba5 Move fs-verity key loading into fsverity_init domain
fsverity_init is a new shell script that uses mini-keyctl for the actual
key loading.  Given the plan to implement keyctl in toybox, we label
mini-keyctl as u:object_r:toolbox_exec:s0.

This gives us two benefits:
 - Better compatibility to keyctl(1), which doesn't have "dadd"
 - Pave the way to specify key's security labels, since keyctl(1)
   doesn't support, and we want to avoid adding incompatible option.

Test: Boot without SELinux denial
Test: After boot, see the key in /product loaded
Bug: 128607724
Change-Id: Iebd7c9b3c7aa99ad56f74f557700fd85ec58e9d0
2019-03-27 16:31:01 +00:00
Nick Kralevich
9097360049 Revert "Temporarily hide denial to fix tests."
This reverts commit 94b5fe4af5.

Reason for revert: Obsoleted by https://android-review.googlesource.com/933916

Bug: 129298168
Change-Id: I6b34cfdf76b5094db17ee06831d8a662ea360956
Test: Build.
2019-03-27 13:56:20 +00:00
Yifan Hong
7f891f414f Merge changes from topic "lpdumpd"
am: 40f1682ba6

Change-Id: I33d21f283f01fbeeda7584b4cee1a91597cc5a71
2019-03-26 14:24:19 -07:00
Nick Kralevich
a95d5e8b03 Merge "Temporarily hide denial to fix tests."
am: a2b90b5efc

Change-Id: If19dd95c24e0612f5a203b5b22ae1a01ce465c6a
2019-03-26 13:38:35 -07:00
Nick Kralevich
83484d2346 Merge "Don't audit audit_access denials to /dev/binder"
am: f3e8dce5d4

Change-Id: I61f195fd4c1dfe8a777617fbc1a776205da28d73
2019-03-26 13:37:29 -07:00
Yifan Hong
40f1682ba6 Merge changes from topic "lpdumpd"
* changes:
  Add rules for lpdump and lpdumpd
  Allow to getattr kmsg_device
2019-03-26 20:35:36 +00:00
Yifan Hong
9d8a33b32b Merge "Add super_block_device_type"
am: b9be03d63a

Change-Id: Ia3a7f3c90cf24dacec8b2189ec4db568625a40b2
2019-03-26 13:19:52 -07:00
Nick Kralevich
a2b90b5efc Merge "Temporarily hide denial to fix tests." 2019-03-26 20:06:49 +00:00
Nick Kralevich
f3e8dce5d4 Merge "Don't audit audit_access denials to /dev/binder" 2019-03-26 19:51:01 +00:00
Yifan Hong
b9be03d63a Merge "Add super_block_device_type" 2019-03-26 19:30:12 +00:00
Joel Galenson
94b5fe4af5 Temporarily hide denial to fix tests.
This shoud be removed once the offending code is fixed.

Bug: 129298168
Test: Build.
Change-Id: Ie94a626be777a094fb587f72b3987994e085a23e
2019-03-25 17:37:51 -07:00
Tri Vo
786b973c96 Don't audit audit_access denials to /dev/binder
Without VNDK, libcutils has to probe for /dev/binder access before
reaching to ashmemd via binder. Ignore denials generated when probing
/dev/binder.

Bug: 129073672
Test: boot sailfish without denials to /dev/binder
Change-Id: I07ba2e094586df353d54507458e891a3d14c1ca6
2019-03-25 17:23:36 -07:00
Tri Vo
262995e560 Merge "Allow system_suspend access to /sys/power/wake_[un]lock."
am: a109fa645c

Change-Id: Iecf9f5edf236e7d36d9aeb3d4fe739404b65b8c4
2019-03-25 16:51:07 -07:00
Tri Vo
a109fa645c Merge "Allow system_suspend access to /sys/power/wake_[un]lock." 2019-03-25 23:38:09 +00:00
Yifan Hong
e3ee390c6b Add super_block_device_type
This is the type used on super partition block devices.
- On devices launch with DAP, super is already marked
as super_block_device_type.
- On retrofit devices, appropriate block devices must
be marked as super_block_device_type, for example:

    typeattribute system_block_device super_block_device_type;

Bug: 128991918
Test: builds
Change-Id: I7e26d85b577ce08d8dc1574ddc43146d65843d9c
2019-03-25 17:58:10 +00:00
Yifan Hong
18ade868ff Add rules for lpdump and lpdumpd
- lpdump is a binary on the device that talks to lpdumpd
  via binder.

- lpdumpd is a daemon on the device that actually reads
  dynamic partition metadata. Only lpdump can talk to it.

Bug: 126233777
Test: boots (sanity)
Test: lpdump

Change-Id: I0e21f35ac136bcbb0603940364e8117f2d6ac438
2019-03-25 10:14:20 -07:00
Yifan Hong
5d89abde99 Allow to getattr kmsg_device
These denials occur on boot when android_get_control_file also
changes from readlink() to realpath(), because realpath() will
lstat() the given path.

Some other domains (fastbootd, update_engine, etc.) also uses
libcutils to write to kernel log, where android_get_control_file()
is invoked, hence getattr is added to them as well.

04-28 06:15:22.290   618   618 I auditd  : type=1400 audit(0.0:4): avc: denied { getattr } for comm="logd" path="/dev/kmsg" dev="tmpfs" ino=20917 scontext=u:r:logd:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
03-20 19:52:23.431   900   900 I auditd  : type=1400 audit(0.0:7): avc: denied { getattr } for comm="android.hardwar" path="/dev/kmsg" dev="tmpfs" ino=20917 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
...
03-20 22:40:42.316     1     1 W init    : type=1400 audit(0.0:33): avc: denied { getattr } for path="/dev/kmsg" dev="tmpfs" ino=21999 scontext=u:r:init:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0

Test: no denials related to these
Change-Id: I5263dd6b64c06fb092f3461858f57a1a09107429
2019-03-25 10:14:20 -07:00
Przemyslaw Szczepaniak
bfd36c6b47 Merge "Make package_native_serice an (ephemeral_)?app_api_service."
am: 37f5cb2db0

Change-Id: Ic6a9abdc118a8bf70a15cbbf0d187efbd253e200
2019-03-25 08:58:51 -07:00
Przemyslaw Szczepaniak
37f5cb2db0 Merge "Make package_native_serice an (ephemeral_)?app_api_service." 2019-03-25 15:49:57 +00:00
Felka Chang
562d27b55c Merge "Fix mediaserver meets the void fd use denied"
am: db4ac6f02c

Change-Id: I664a09751a0e694c1e65e5b65890e3033c6fb6c9
2019-03-24 16:27:52 -07:00
Treehugger Robot
db4ac6f02c Merge "Fix mediaserver meets the void fd use denied" 2019-03-24 23:25:19 +00:00
Joe Onorato
33c67b19ea Merge "Allow incidentd to communicate with clients over pipes."
am: d7148b99cb

Change-Id: I02ab3712e7612199fc1c7f98ceeba01a5bc9287e
2019-03-24 15:51:14 -07:00
Joe Onorato
d7148b99cb Merge "Allow incidentd to communicate with clients over pipes." 2019-03-24 22:41:01 +00:00
Andreas Gampe
ffc3809446 Sepolicy: Allow otapreopt access to vendor overlay files
am: 30186cf611

Change-Id: I34f1754c0f445a51183a692e0be981041b646f86
2019-03-24 13:06:19 -07:00
Andreas Gampe
1581017719 Sepolicy: Allow otapreopt to mount logical partitions
am: 1a5db599ce

Change-Id: I7f5e8f87ef8441450c9ea6b543e14e14053db95a
2019-03-24 13:06:11 -07:00
Joe Onorato
9cc5c09be5 Allow incidentd to communicate with clients over pipes.
Previously we dumped the data into dropbox.  This improves a couple
things:
  - We write into dropbox via the fd, so dropbox doesn't pull from the
    incidentd directory anymore.
  - There is a new API to for priv apps to explicitly read incident
    reports. That gives incidentd finer grained control over who can
    read it (specifically, it only allows apps to access the incident
    reports they requested, or were requested for them via statsd,
    instead of getting DUMP and reading whatever they want from
    dropbox).

Test: bit incident_test:* GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: I9a323e372c4ff95d91419a61e8a20ea5a3a860a5
2019-03-22 17:04:49 -07:00
Andreas Gampe
30186cf611 Sepolicy: Allow otapreopt access to vendor overlay files
A handful of APKs are vendor overlay files. Allow access.

Test: m
Change-Id: I791fa37a3bcb07729386047f0cda178753af9de5
2019-03-22 12:13:53 -07:00
Andreas Gampe
1a5db599ce Sepolicy: Allow otapreopt to mount logical partitions
Logical partitions are handled through libdm. Allow access to
device-mapper.

Bug: 128867786
Test: m
Change-Id: I6979487b91d24b7309c876f2bdc26a827e2fcd1e
2019-03-22 12:13:05 -07:00
Felka Chang
1eb2669218 Fix mediaserver meets the void fd use denied
scenario: droid.apps.docs: type=1400 audit(0.0:77): avc: denied {
use } for path="/mnt/appfuse/10028_6/9" dev="fuse" ino=9
scontext=u:r:mediaserver:s0 tcontext=u:r:vold:s0 tclass=fd permissive=0

root cause: DocumentsUI provides ArchiveProvider to browse the entries
in archive files by using StorageManager.openProxyFileDescriptor.
i.e. the file descriptor comes from the archive entries is belong to
the void fd.  The file descriptor is used by mediaserver but
mediaserver doesn't have the permission to use the file descriptor.

Fixes: 120491318
Test: build, flash, manual test
Change-Id: Ibaf9a625c7b68c3f1977fcaddd6c7d5419352f93
2019-03-22 22:41:49 +08:00
David Brazdil
072160c09d Merge "dexoptanalyzer: Allow writing into installd's pipe"
am: c848dee19c

Change-Id: Ic390c1e7554e651d1fb502fa6805fb1317a14d3a
2019-03-22 07:02:12 -07:00
David Brazdil
c848dee19c Merge "dexoptanalyzer: Allow writing into installd's pipe" 2019-03-22 13:48:58 +00:00
Florian Mayer
79c7567a83 Merge "Give heapprofd dac_read_search on userdebug."
am: 3b641a60a2

Change-Id: If317ddada510cec4089404c320a2ecd49c483634
2019-03-22 03:46:43 -07:00
Florian Mayer
3b641a60a2 Merge "Give heapprofd dac_read_search on userdebug." 2019-03-22 10:37:05 +00:00
Roger Wang
be1ab9430c Merge "Allow dumpstate to dump wlan hal log on userbuild"
am: d125ab8f21

Change-Id: Ie67325330bc4cb10e4ab38e607652f4bd7a990a9
2019-03-22 00:25:17 -07:00
Treehugger Robot
d125ab8f21 Merge "Allow dumpstate to dump wlan hal log on userbuild" 2019-03-22 07:15:13 +00:00
Alan Stokes
7d3b6a2901 Clarify priv_app.te.
am: 5c378a5374

Change-Id: I6b2d750f9c6f7c898d395782943ccbfce3eba3c2
2019-03-21 21:17:28 -07:00
Alan Stokes
5c378a5374 Clarify priv_app.te.
No semantic changes. Just trying to make this easier to understand:
- Separate out common bundles of services from individual services
  (the naming doesn't make this obvious).
- Comment the common ones.
- Put related binder_call and service_manager:find rules together.

Test: Builds
Change-Id: Iba4a85a464da032e35450abff0febcdcf433df48
2019-03-21 23:52:30 +00:00
Florian Mayer
e922aa38bf Give heapprofd dac_read_search on userdebug.
This is needed because some oat dex files are generated without world
readable permissions. See the bug for details.

We are still constrained by the SELinux rules above.

Bug: 129048073

Change-Id: I84e34f83ceb299ff16b29a78f16c620fc0aa5d68
2019-03-21 17:22:09 +00:00
Wei Wang
c74a2067f1 Merge "Allow lmkd to setched kernel threads"
am: 75e7d2886c

Change-Id: I2d746f40a294ff330861da1f97ecbd313cb15558
2019-03-21 03:47:03 -07:00
Treehugger Robot
75e7d2886c Merge "Allow lmkd to setched kernel threads" 2019-03-21 10:39:36 +00:00
Roger Wang
49f2954275 Allow dumpstate to dump wlan hal log on userbuild
To check issue on userbuild, wlan hal log
is helpful.

Bug: 122265104
Test: Manully, log collected on user build
Change-Id: I5aa96aa796ca7dfb92e97df3e7be054ff79f6e3d
2019-03-21 12:27:44 +08:00
Wei Wang
eff6ddf668 Allow lmkd to setched kernel threads
psi monitor sched_setscheduler(kworker->task, SCHED_FIFO, &param) was added into pa/1282597

Bug: 127637796
Test: build
Change-Id: I8f2470fc40bc8d02a7fbbbe186afe580c5f53aa4
2019-03-20 23:06:32 +00:00
Steven Moreland
c46e31c961 private: allow zygote mnt_expand_file:dir getattr;
zygote is using this permission to preload Java libraries.

Bug: 128529256
Test: boot
Change-Id: If7e56409ae0171f5a04eadb2c297c865f9d4ffaf
2019-03-20 16:26:43 +00:00
David Brazdil
246efa2a24 dexoptanalyzer: Allow writing into installd's pipe
Dexoptanalyzer is getting a new mode to instruct installd on which dex
files it needs to open for itself and dex2oat from class loader context.
The file list is communicated by a pipe from a forked dexoptanalyzer
process to the installd parent. Give dexoptanalyzer permission to write
to installd's pipes.

Bug; 126674985
Test: atest installd_dexopt_test
Change-Id: Ic415e2dc543099d26681103c9d368c941d21b49a
2019-03-20 15:37:12 +00:00