Commit graph

21532 commits

Author SHA1 Message Date
Martin Stjernholm
f6bd00af8b Split off ART rules for new ART APEX.
Test: Build & boot
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Iab56f6b5bb7a59fbeaad214a64fbd959060574f4
Merged-In: Iab56f6b5bb7a59fbeaad214a64fbd959060574f4
2019-08-30 17:47:31 +01:00
Paul Crowley
e9465fceb6 Merge "Root of /data belongs to init"
am: b935b6c664

Change-Id: I39a36ec663c98ac55be886e886da4afbf34e9cf2
2019-08-29 23:10:42 -07:00
Paul Crowley
b935b6c664 Merge "Root of /data belongs to init" 2019-08-30 05:23:12 +00:00
Paul Crowley
206b6535f1 Root of /data belongs to init
Give /data itself a different label to its contents, to ensure that
only init creates files and directories there.

Bug: 139190159
Test: aosp boots, logs look good
Change-Id: I3ee654a928bdab3f5d435ab6ac24040d9bdd9abe
2019-08-29 15:08:21 -07:00
Victor Hsieh
0a0e46fa4a Merge "sepolicy: dontaudit cap_sys_admin on userdebug/eng"
am: 845e04ba73

Change-Id: I6a0e797dda80e90a1b0983bac49c012c50389d16
2019-08-29 12:01:26 -07:00
Treehugger Robot
845e04ba73 Merge "sepolicy: dontaudit cap_sys_admin on userdebug/eng" 2019-08-29 18:40:40 +00:00
Victor Hsieh
b7f2f0b878 sepolicy: dontaudit cap_sys_admin on userdebug/eng
When fsverity_init tries to access files in /system or /product
partition AFTER adb remount, SELinux denial is generated:

avc: denied { sys_admin } for capability=21
scontext=u:r:fsverity_init:s0 tcontext=u:r:fsverity_init:s0
tclass=capability permissive=0

This is due to some internal access to an xattr inside overlayfs, but it
should not report this.

Before the message can be surpressed, dontaudit it to keep the log clean.

Test: no more error log
Bug: 132323675
Change-Id: I323c9330ee6e6b897d1a4e1e74f6e7e0ef1eaa89
2019-08-29 09:39:31 -07:00
Steven Moreland
b27a746f50 Merge "Remove vintf_service."
am: cacefc6a78

Change-Id: Id30138a0955dc7883d83daa2b655a06efebcaaf7
2019-08-28 19:15:40 -07:00
Treehugger Robot
cacefc6a78 Merge "Remove vintf_service." 2019-08-29 01:58:04 +00:00
Nick Kralevich
3ddd22a6f3 Merge "global_macros: trim back various watch* permissions"
am: 91e7562efd

Change-Id: Ia607147d662a7f92192fff7f369b9c439c2adc3e
2019-08-28 17:47:12 -07:00
Treehugger Robot
91e7562efd Merge "global_macros: trim back various watch* permissions" 2019-08-28 23:58:18 +00:00
Paul Crowley
1fc44958bd Merge "Move layout_version to /data/misc/installd"
am: 7f9c607b4f

Change-Id: I05c2ba0b7f2f44c72bb6c6eba16a4ab385c15939
2019-08-28 13:35:17 -07:00
Steven Moreland
ebc39c37ab Merge "Clarify vendor_service/vintf_service."
am: 961bf003d6

Change-Id: Ibe65d802dff7d54ed1886800568840e0434dd696
2019-08-28 13:27:44 -07:00
Paul Crowley
7f9c607b4f Merge "Move layout_version to /data/misc/installd" 2019-08-28 19:56:15 +00:00
Nick Kralevich
c4ab8edf74 global_macros: trim back various watch* permissions
Commit dddbaaf1e8 ("update sepolicy
for fs notification hooks") updated global macros, and added
watch, watch_mount, watch_sb, watch_with_perm, and watch_reads
to r_file_perms and r_dir_perms.

In retrospect, the commit was overly permissive and some of the
permissions shouldn't be granted by default. In particular:

1) watch_with_perm: This is only used with fanotify and requires
CAP_SYS_ADMIN. fanotify has limited use cases, including virus scanning
and hierarchical storage management. Granting this by default makes it
harder to audit and understand this powerful capability. In particular,
anti-virus file like monitoring is something which inherently conflicts
with Android app privacy guarantees and would need to be carefully
reviewed.

2) watch_mount & watch_sb: Setting a watch on a mount (FAN_MARK_MOUNT)
or superblock (FAN_MARK_FILESYSTEM) should be extremely unusual.
Granting this by default makes it harder to audit and understand.

Both "watch" and "watch_reads" are retained for now.

References:
* https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ac5656d8a4cdd93cd2c74355ed12e5617817e0e7
* dddbaaf1e8

Test: compiles
Change-Id: Ib74e7119853eb991e0e9828645c7f9e076b919c4
2019-08-28 12:36:58 -07:00
Steven Moreland
4bb0a9802a Remove vintf_service.
The only distinction that matters for security is if a service is
served by vendor or not AND which process is allowed to talk to which.

coredomain is allowed to talk to vintf_service OR vendor_service, it's
just that for a non-@VintfStability service user-defined APIs (as
opposed to pingBinder/dump) are restricted.

Bug: 136027762
Test: N/A
Change-Id: If3b047d65ed65e9ee7f9dc69a21b7e23813a7789
2019-08-28 11:32:25 -07:00
Steven Moreland
961bf003d6 Merge "Clarify vendor_service/vintf_service." 2019-08-28 17:50:41 +00:00
Eric Holk
9672823f2a Merge "Give map permission to viewcompiler"
am: ac74f62cd5

Change-Id: I56450ae13fff2e6a4a12af2a30af2629a2278a78
2019-08-28 07:41:59 -07:00
Treehugger Robot
ac74f62cd5 Merge "Give map permission to viewcompiler" 2019-08-28 14:27:36 +00:00
Nick Kralevich
c057561d79 Merge "update sepolicy for fs notification hooks"
am: 7981b230b0

Change-Id: I8f4deb640eb058176342ae71918e2e5b4e8633c3
2019-08-28 03:59:45 -07:00
Treehugger Robot
7981b230b0 Merge "update sepolicy for fs notification hooks" 2019-08-28 10:41:40 +00:00
Steven Moreland
c73b9bbbe0 Merge "System service neverallow, make full_treble_only."
am: 517d7f0db6

Change-Id: I9c0b00384b88dfc11315acea13072d431877b64e
2019-08-27 18:38:35 -07:00
Steven Moreland
517d7f0db6 Merge "System service neverallow, make full_treble_only." 2019-08-28 01:15:21 +00:00
Steven Moreland
82d825df79 Merge "Rename dumpstate service to include '.example'."
am: 2d572464af

Change-Id: I81ce7c04472893d7e77aa974969b484b93c7beaa
2019-08-27 16:26:23 -07:00
Treehugger Robot
2d572464af Merge "Rename dumpstate service to include '.example'." 2019-08-27 22:57:45 +00:00
Steven Moreland
df0a65785c Clarify vendor_service/vintf_service.
These attributes are intended to be used w/ services using the system
copy of libbinder (for vendor, this is libbinder_ndk).

Switching vndservicemanager users using the libbinder copy of vendor to
be able to use the system copy of libbinder for registration is an open
problem.

Bug: 136027762
Test: N/A
Change-Id: I1d70380edcb39ca8ef2cb98c25617701b67ba7e1
2019-08-27 15:37:11 -07:00
Zim
7cfc15c68c Merge "Allow remounting /mnt/user/0 as slave mount"
am: 83b28e267e

Change-Id: Ibf8c5c37b8c56fa6c2775b4a591c31ebef6e4dd2
2019-08-27 15:34:10 -07:00
Nick Kralevich
dddbaaf1e8 update sepolicy for fs notification hooks
Update access_vectors and global_macros to account for the changes in
kernel commit
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ac5656d8a4cdd93cd2c74355ed12e5617817e0e7

This change is needed to allow Android to boot on linux-next

Test: compiles
Change-Id: I35c59fc50fa9c94ab94399ce74d637e49d38129d
2019-08-27 15:31:59 -07:00
Treehugger Robot
83b28e267e Merge "Allow remounting /mnt/user/0 as slave mount" 2019-08-27 22:03:00 +00:00
Steven Moreland
10d260950d Rename dumpstate service to include '.example'.
Since this was an example service providing no real functionality and
accidentally got installed on a device.

Bug: 140115084
Test: install on test device and see that it runs
Change-Id: I553da8e1f4da7d6a9f0c3e7d4a3561f0b22321dc
2019-08-27 11:07:51 -07:00
Paul Crowley
d1ff87530c Move change from ag/7565384 aside
Commit I35d35016680379e3a9363408704ee890a78a9748 is not yet in AOSP
and is causing a merge conflict with my change aosp/1105757.
Move the lines causing the conflict elsewhere.

Bug: 1105489
Test: treehugger
Cherrypicked-From: 1da93c9f32
Merged-In: I35dca026e40c9e2f89b831395db3958e399bfbb7
Change-Id: I35dca026e40c9e2f89b831395db3958e399bfbb7
2019-08-27 17:55:07 +00:00
Steven Moreland
25871e7f2f System service neverallow, make full_treble_only.
Since non-full-Treble devices aren't guaranteed to have coredomain
applied to all system processes, this is breaking some downstream
non-Treble devices.

Bug: 140076135
Test: N/A
Change-Id: I2942506cb0cfd8096c631281389a16aa48b4da08
2019-08-27 10:47:11 -07:00
Eric Holk
04ee9fb1b2 Give map permission to viewcompiler
On cuttlefish devices, the resource loading code apparently maps the file rather
than just reading it.

Denial log:

viewcompiler: type=1400 audit(0.0:308): avc: denied { map } for
path="/data/app/android.startop.test-Z2JxVhtKPw2wx4o-nmo5NA==/base.apk"
dev="vdb" ino=139269 scontext=u:r:viewcompiler:s0
tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0
app=android.startop.test

Bug: 139018973
Change-Id: I4bbbc44abc3c4315137f76a0be737236cf10f4ef
2019-08-27 10:43:55 -07:00
Paul Lawrence
31e6fa2075 Merge "Fix ext4/metadata/udc problem"
am: 4d40aefa4b

Change-Id: I6d445070b533d3353a714fb043102c0be00cc883
2019-08-27 08:44:48 -07:00
Paul Lawrence
4d40aefa4b Merge "Fix ext4/metadata/udc problem" 2019-08-27 15:21:58 +00:00
Steven Moreland
6c0d9cea39 [automerger skipped] Merge "Remove mediacodec_service."
am: c7b1be7d4c -s ours
am skip reason: change_id I257c8cc3dba657d98f19eb61b36aae147afea393 with SHA1 d181bc2c16 is in history

Change-Id: Ie7e72803cf068c8035c379ecbc2ab969d6a52848
2019-08-26 15:50:43 -07:00
Treehugger Robot
c7b1be7d4c Merge "Remove mediacodec_service." 2019-08-26 21:32:47 +00:00
TreeHugger Robot
f836f1a700 Merge "DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master" into stage-aosp-master 2019-08-24 06:48:47 +00:00
Muhammad Qureshi
5c9ed93f17 Merge "Add file-contexts for statsd apex"
am: accc143126

Change-Id: I97821eb6f220b9c3a43719d3e4f259dd856ad372
2019-08-23 21:26:14 -07:00
Treehugger Robot
accc143126 Merge "Add file-contexts for statsd apex" 2019-08-23 21:53:32 +00:00
TreeHugger Robot
89224c8334 Merge "DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history" into stage-aosp-master 2019-08-23 20:28:00 +00:00
Steven Moreland
2092764024 Merge "Remove mediacodec_service." into stage-aosp-master 2019-08-23 17:33:44 +00:00
Xin Li
65227a4be7 DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I4a36357883efe369754e3ec08541e05f847b28ce
2019-08-23 06:45:27 +00:00
Xin Li
daf5391ecc DO NOT MERGE - Merge build QP1A.190711.001 into stage-aosp-master history
Bug: 139893257
Change-Id: I54c9edcfbefe9e803e6c36e5d52cd8cb54199e29
2019-08-23 06:42:13 +00:00
Jon Spivack
685af5eaab Merge "Allow vndservicemanager to start processes"
am: 018f745b90

Change-Id: I42f16342f807cabebc1e258a353b1cea5b13472e
2019-08-22 18:50:11 -07:00
Jon Spivack
018f745b90 Merge "Allow vndservicemanager to start processes" 2019-08-23 01:29:06 +00:00
Steven Moreland
88fedc2159 Merge "Reland "Re-open /dev/binder access to all.""
am: aa6793febd

Change-Id: I34360631751c98aab0c34fff9bdcdbae02c52297
2019-08-22 16:15:59 -07:00
Steven Moreland
aa6793febd Merge "Reland "Re-open /dev/binder access to all."" 2019-08-22 22:55:04 +00:00
Robert Shih
30e9337e4e Merge "Allow drmserver to communicate with mediametrics"
am: 444b5483a2

Change-Id: I0afe78e401867b03c798ee4653fd08ff9fe7e396
2019-08-22 15:03:44 -07:00
Treehugger Robot
444b5483a2 Merge "Allow drmserver to communicate with mediametrics" 2019-08-22 21:51:24 +00:00