Commit graph

14532 commits

Author SHA1 Message Date
Primiano Tucci
4120c8c94d perfetto: Make producer socket MLS-aware am: 5ef6669b04 am: 2337f2950c
am: 8bf6ccb78a

Change-Id: I40e25bbdec238c250308f8a09571e4c4a1bea363
2018-02-21 20:17:09 +00:00
Primiano Tucci
8bf6ccb78a perfetto: Make producer socket MLS-aware am: 5ef6669b04
am: 2337f2950c

Change-Id: I64579d8df8832b2f63310f6eb9cfd7a6c482ac72
2018-02-21 19:57:20 +00:00
Primiano Tucci
2337f2950c perfetto: Make producer socket MLS-aware
am: 5ef6669b04

Change-Id: Ieb70f2672b3956befa8c755c7f1535550f400c02
2018-02-21 19:50:47 +00:00
Primiano Tucci
5ef6669b04 perfetto: Make producer socket MLS-aware
The previous selinux rules obtained via audit2allow didn't really
work with the case of apps connecting to the producer socket,
despite all the allow rules being correctly in place.
This was failing our CTS tests.

The reason for the failure (see denials pasted below) is due to
Multi Level Security (for multi-user), which was still preventing
apps form a different level to connect to the traced producer
socket and write to the shmem buffers they get passed back.
This CL tags the objects being accessed as mlstrusted.
CTS tests pass with this CL.

Denials:
avc: denied { write } for pid=8545 comm="traced_probes" name="traced_producer" dev="tmpfs" ino=23629 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=1
avc: denied { write } for pid=8545 comm="traced_probes" name="traced_producer" dev="tmpfs" ino=23629 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=1
avc: denied { connectto } for pid=8545 comm="traced_probes" path="/dev/socket/traced_producer" scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:traced:s0 tclass=unix_stream_socket permissive=1
avc: denied { connectto } for pid=8545 comm="traced_probes" path="/dev/socket/traced_producer" scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:traced:s0 tclass=unix_stream_socket permissive=1
avc: denied { write } for pid=8545 comm="traced_probes" path=2F6D656D66643A706572666574746F5F73686D656D202864656C6574656429 dev="tmpfs" ino=104483 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_tmpfs:s0 tclass=file permissive=1

Change-Id: I1598bc0b07bf39b8d0420b66caf06a4ca884f383
Bug: 73340039
Test: CtsPerfettoTestCases
2018-02-21 14:37:58 +00:00
Bookatz
1a50b42cbe Merge "Statsd selinux allow shell to interact with statsd" am: fcd48fd593 am: 1de018fbb1
am: 1cbf834a20

Change-Id: I224cc0dccef0ff03491c3a7c5f29c0e2b750ab60
2018-02-16 23:57:29 +00:00
Max Bires
5f93e4738b Merge "Revert "Revert "Ensure only com.android.shell can run in the shell domain.""" am: 01624c82c8 am: a93440bb01
am: 47b7dca420  -s ours

Change-Id: Ia1e7fc19343daf132572f3327a81e755d7467ce8
2018-02-16 23:55:02 +00:00
Primiano Tucci
fb771f476a Merge "selinux: allow Perfetto traced_probes to write into kmesg" am: daeea37e21 am: e786cf9966
am: c41533e48f

Change-Id: Id7ac18cf8d3510821847eb8190f721c348351daf
2018-02-16 23:52:36 +00:00
Bookatz
1cbf834a20 Merge "Statsd selinux allow shell to interact with statsd" am: fcd48fd593
am: 1de018fbb1

Change-Id: Ifef4197e88d486ce96f0f81191e580000c6a4bc7
2018-02-16 23:49:50 +00:00
Bookatz
1de018fbb1 Merge "Statsd selinux allow shell to interact with statsd"
am: fcd48fd593

Change-Id: Ied57114859d2ae5af2b3d50a9695d4dd5806fdf0
2018-02-16 23:42:17 +00:00
Max Bires
47b7dca420 Merge "Revert "Revert "Ensure only com.android.shell can run in the shell domain.""" am: 01624c82c8
am: a93440bb01

Change-Id: Ia8d762f9183968acc4f27b53d2b929e01222b54c
2018-02-16 23:38:29 +00:00
Primiano Tucci
c41533e48f Merge "selinux: allow Perfetto traced_probes to write into kmesg" am: daeea37e21
am: e786cf9966

Change-Id: I01edf449451eb9e8c608fff6f86c529e69a42602
2018-02-16 23:36:53 +00:00
Treehugger Robot
fcd48fd593 Merge "Statsd selinux allow shell to interact with statsd" 2018-02-16 23:36:52 +00:00
Max Bires
a93440bb01 Merge "Revert "Revert "Ensure only com.android.shell can run in the shell domain."""
am: 01624c82c8

Change-Id: I27b0fe6965851c05d73fb12ebcd6e8c714f1531e
2018-02-16 23:22:25 +00:00
Primiano Tucci
e786cf9966 Merge "selinux: allow Perfetto traced_probes to write into kmesg"
am: daeea37e21

Change-Id: Ife0b32672aa8bccdaa5b6c93e0155a1bde4dbc2f
2018-02-16 23:20:52 +00:00
Treehugger Robot
01624c82c8 Merge "Revert "Revert "Ensure only com.android.shell can run in the shell domain.""" 2018-02-16 22:06:47 +00:00
Primiano Tucci
daeea37e21 Merge "selinux: allow Perfetto traced_probes to write into kmesg" 2018-02-16 21:56:35 +00:00
Bookatz
18b8b8fc46 Statsd selinux allow shell to interact with statsd
To upload configs and download output, this line
is needed.

Bug: 72961153
Test: The statsd cts test passes
Change-Id: I0943cc841881dd5d15e24ba444b146087a81bf96
2018-02-16 13:28:04 -08:00
Max Bires
1a703fedc7 Revert "Revert "Ensure only com.android.shell can run in the shell domain.""
This reverts commit bf0c2a59f8.

Bug:68126425
Test: No apps affected by not being able to run in shell domain
Change-Id: I8b93eecd023fbb392a98253d721dad75f79b61f4
Merged-In: I8b93eecd023fbb392a98253d721dad75f79b61f4
2018-02-16 10:46:09 -08:00
Max Bires
2d0b211245 Merge "Revert "Revert "Ensure only com.android.shell can run in the shell domain.""" 2018-02-16 18:13:40 +00:00
Robert Sesek
15995f56ef Merge "SELinux changes to accomodate starting the webview_zygote as a child of the zygote." am: 50fa7be796 am: 0089f2849d
am: 0300a07387  -s ours

Change-Id: I64d255ccc2bc5d9c3a945e3458bb6afabb0edca2
2018-02-16 17:00:17 +00:00
Robert Sesek
0300a07387 Merge "SELinux changes to accomodate starting the webview_zygote as a child of the zygote." am: 50fa7be796
am: 0089f2849d

Change-Id: I366e68c19a1344c6c4ec0584f2eda42bae3e9e6e
2018-02-16 16:52:15 +00:00
Robert Sesek
0089f2849d Merge "SELinux changes to accomodate starting the webview_zygote as a child of the zygote."
am: 50fa7be796

Change-Id: Iab1959aeeb566eaabbaefeb97c8e8899d07abd8a
2018-02-16 16:44:41 +00:00
Treehugger Robot
50fa7be796 Merge "SELinux changes to accomodate starting the webview_zygote as a child of the zygote." 2018-02-16 16:38:52 +00:00
Primiano Tucci
d807d58825 selinux: allow Perfetto traced_probes to write into kmesg
This is to allow to leave audit trails in dmesg to cross-correlate
kernel panics with perfetto ftrace activity.

Bug: 73340039
Change-Id: I575a537553adc75378783c37c84350581250614d
2018-02-16 16:38:29 +00:00
Joel Galenson
0c272518c6 Dontaudit denials caused by race with labeling. am: f7ec413844 am: 67057bd934
am: 9680dcdebc

Change-Id: I8bacd8b10c3bd94824cf860a1290e92caafbd4f0
2018-02-16 01:03:25 +00:00
Joel Galenson
9680dcdebc Dontaudit denials caused by race with labeling. am: f7ec413844
am: 67057bd934

Change-Id: I030ce633ea9561c2697e4357d159fbaeadd7f378
2018-02-16 00:50:33 +00:00
Joel Galenson
67057bd934 Dontaudit denials caused by race with labeling.
am: f7ec413844

Change-Id: Id2726bec03d7d06f48adf2f5d17b1382321b01d0
2018-02-16 00:46:05 +00:00
Roshan Pius
eeccc0ddb4 Merge "wificond.te: Remove unnecessary permissions" 2018-02-16 00:31:16 +00:00
Max Bires
77d41f78e7 Revert "Revert "Ensure only com.android.shell can run in the shell domain.""
This reverts commit bf0c2a59f8.

Bug:68126425
Test: No apps affected by not being able to run in shell domain
Change-Id: I8b93eecd023fbb392a98253d721dad75f79b61f4
2018-02-15 14:44:21 -08:00
Roshan Pius
8fa0be5c96 wificond.te: Remove unnecessary permissions
Since wificond is no longer writing supplicant/hostapd conf files, we
don't need these permissions anymore.

Bug: 36645291
Test: Device boots up & connects to networks.
Change-Id: I625dfdc2c0349e128b81e01097ccb439f73beb4d
2018-02-15 08:51:15 -08:00
Joel Galenson
f7ec413844 Dontaudit denials caused by race with labeling.
These denials seem to be caused by a race with the process that labels
the files.  While we work on fixing them, hide the denials.

Bug: 68864350
Bug: 70180742
Test: Built policy.
Change-Id: I58a32e38e6384ca55e865e9575dcfe7c46b2ed3c
2018-02-14 17:07:13 -08:00
Robert Sesek
febdfa4edf SELinux changes to accomodate starting the webview_zygote as a child of the zygote.
In this architecture, the system_server instructs the zygote to fork a
child-zygote to be the webview_zygote. The system_server tells this new
zygote to listen for fork requests on a random abstract unix socket of
its choosing.

A follow-up CL will remove the rules for starting webview_zygote via
init.

Bug: 63749735
Test: m
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.
Merged-In: I864743943c11c18de386010ecd4b616721cb9954
Change-Id: I1c352e47b66eca3a3fa641daa6ecc3e7a889b54e
2018-02-14 19:00:48 -05:00
Robert Sesek
bacb19b9ad SELinux changes to accomodate starting the webview_zygote as a child of the zygote.
In this architecture, the system_server instructs the zygote to fork a
child-zygote to be the webview_zygote. The system_server tells this new
zygote to listen for fork requests on a random abstract unix socket of
its choosing.

A follow-up CL will remove the rules for starting webview_zygote via
init.

Bug: 63749735
Test: m
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.
Change-Id: I864743943c11c18de386010ecd4b616721cb9954
2018-02-14 18:50:17 -05:00
Pavel Grafov
5b368c4208 Merge "Allow wpa_supplicant to read security logging property." am: 946b4b76f0 am: b96ce93b84
am: 8525e584c4  -s ours

Change-Id: I5c77037cdd5c2ef5209b92ad439042f9fc798f3f
2018-02-14 19:19:11 +00:00
Pavel Grafov
8525e584c4 Merge "Allow wpa_supplicant to read security logging property." am: 946b4b76f0
am: b96ce93b84

Change-Id: Id23bddbfc9e52b2cbfaa7721328cd0da2b71a2b4
2018-02-14 19:12:57 +00:00
Pavel Grafov
b96ce93b84 Merge "Allow wpa_supplicant to read security logging property."
am: 946b4b76f0

Change-Id: I3594f29614dff49aa76e96178398a848203e77b7
2018-02-14 19:07:36 +00:00
Treehugger Robot
946b4b76f0 Merge "Allow wpa_supplicant to read security logging property." 2018-02-14 18:47:26 +00:00
Joel Galenson
218cf6f6b0 Merge "Track crash_dump selinux denial." am: 5791086651 am: a378180ff6
am: 30869fe7b8

Change-Id: Id2837d3eba0882898e2ec30945edd59b2f17c24b
2018-02-14 18:09:46 +00:00
Joel Galenson
30869fe7b8 Merge "Track crash_dump selinux denial." am: 5791086651
am: a378180ff6

Change-Id: I57ba8e00b9ecc47d7bccfe06a4cc82d6589754ce
2018-02-14 18:04:10 +00:00
Joel Galenson
a378180ff6 Merge "Track crash_dump selinux denial."
am: 5791086651

Change-Id: Iae0d899bd5d34aaf7d4ffe681ed7fe34ff1d0d04
2018-02-14 17:58:19 +00:00
Treehugger Robot
5791086651 Merge "Track crash_dump selinux denial." 2018-02-14 17:53:00 +00:00
Pavel Grafov
54c9dafb5e Allow wpa_supplicant to read security logging property.
This is needed to allow it to log audit events, e.g. cert
validation failure.

Bug: 70886042
Test: manual, attempt connecting to EAP-TLS wifi with bad cert.
Merged-In: Ia1b0f3c6e02697fdb5018082d5c851f116013fb1
Change-Id: Ia1b0f3c6e02697fdb5018082d5c851f116013fb1
2018-02-14 17:07:35 +00:00
Jeff Vander Stoep
76533682ea Use SELINUX_IGNORE_NEVERALLOWS flag to disable all tests am: 3d4965b2e1 am: 41dc9508ff
am: ffb82f2ff4

Change-Id: I4c9edbf783c3cb60f02f80b49801cdaa17bb9861
2018-02-14 17:04:56 +00:00
Jeff Vander Stoep
ffb82f2ff4 Use SELINUX_IGNORE_NEVERALLOWS flag to disable all tests am: 3d4965b2e1
am: 41dc9508ff

Change-Id: I7c27fb20346bb00ce629ace2b7d844f595000b26
2018-02-14 16:59:19 +00:00
Jeff Vander Stoep
41dc9508ff Use SELINUX_IGNORE_NEVERALLOWS flag to disable all tests
am: 3d4965b2e1

Change-Id: I68869a4fac63fb447aadec850ba9d73060c3443c
2018-02-14 16:53:46 +00:00
Pavel Grafov
fb22704002 Allow wpa_supplicant to read security logging property.
This is needed to allow it to log audit events, e.g. cert
validation failure.

Bug: 70886042
Test: manual, attempt connecting to EAP-TLS wifi with bad cert.
Change-Id: Ia1b0f3c6e02697fdb5018082d5c851f116013fb1
2018-02-14 13:45:00 +00:00
Jeff Vander Stoep
3d4965b2e1 Use SELINUX_IGNORE_NEVERALLOWS flag to disable all tests
The intent of this flag is to disable tests during early device
bringup so that vendor drops can occur without build breakages.
When SELINUX_IGNORE_NEVERALLOWS=true also disable labeling tests
sepolicy_tests, and treble_sepolicy_tests.

Bug: 73322735
Test: build, verify known tests failures do not cause build breakage.
Change-Id: I3e7165938d4e34c066bfa0a20e68b7e02dae4a24
2018-02-14 05:11:59 +00:00
Christopher Ferris
ed27f020ed Merge "Allow read-only of new property for malloc hooks." am: 72527282ef am: 587349ea59
am: f5574d1bf7

Change-Id: I8c70a9fbeffe2236255f67cc0218c7c51e97d074
2018-02-14 01:16:39 +00:00
Christopher Ferris
f5574d1bf7 Merge "Allow read-only of new property for malloc hooks." am: 72527282ef
am: 587349ea59

Change-Id: I78c821f69203937273240cfa3e3ffdd722b89a06
2018-02-14 01:10:33 +00:00
Christopher Ferris
587349ea59 Merge "Allow read-only of new property for malloc hooks."
am: 72527282ef

Change-Id: I82b742a07554cc8795e5797c1811c4c13cfd3e33
2018-02-14 01:03:09 +00:00