Commit graph

2762 commits

Author SHA1 Message Date
Tri Vo
62e6850a2b proc_type attribute for files under /proc.
With this attribute it will be easier to reference /proc files.

Bug: 74182216
Test: policy builds
Change-Id: I5b7da508d821e45f122832261a742a201e8fdf2c
(cherry picked from commit 41bf08e592)
2018-03-20 14:21:36 -07:00
Bowgo Tsai
ab981811f2 Revert "Allow dexopt to follow /odm/lib(64) symlinks."
This reverts commit 88cd813fe2.

Bug: 75287236
Test: boot a device
Change-Id: Id1bc324e7bd0722065d8a410af31fd6b7aaa9d1c
Merged-In: Id1bc324e7bd0722065d8a410af31fd6b7aaa9d1c
(cherry picked from commit 942500b910)
2018-03-20 17:31:35 +08:00
TreeHugger Robot
5fbec4b679 Merge "Allow vendor_init_readable to persist.sys.usb.usbradio.config" into pi-dev 2018-03-20 03:46:42 +00:00
Jaekyun Seok
f1eb382ac7 Allow vendor_init_readable to persist.sys.usb.usbradio.config
persist.sys.usb.usbradio.config can be read in vendor init scripts.

Bug: 75202311
Bug: 74266614
Test: succeeded building and tested on pixels
Change-Id: Ib07a436dd22b4b445fd114cc1d0df7c3e7a21527
2018-03-20 07:39:31 +09:00
TreeHugger Robot
820558a08c Merge "Allow only public-readable to ro.secure and ro.adb.secure" into pi-dev 2018-03-19 22:22:02 +00:00
Bowgo Tsai
e3972606e4 Allow dexopt to follow /odm/lib(64) symlinks.
Several /odm/* symlinks are added in the following change, to fallback
to /vendor/odm/* when there is no /odm partition on the device.

  https://android-review.googlesource.com/#/c/platform/system/sepolicy/+/638159/

This change allows dexopt operations to 'getattr' those symlinks during
OTA.

Bug: 75287236
Test: boot a device
Change-Id: I2710ce5e2c47eb1a3432123ab49f1b6f3dcb4ffe
Merged-In: I2710ce5e2c47eb1a3432123ab49f1b6f3dcb4ffe
(cherry picked from commit 88cd813fe2)
2018-03-19 15:56:18 +08:00
Jaekyun Seok
6f3e73db05 Allow only public-readable to ro.secure and ro.adb.secure
Bug: 74866333
Test: succeeded building and tested with taimen
Change-Id: Id19fec168ab266e386ea4c710a4c5cedfc4df33c
Merged-In: Id19fec168ab266e386ea4c710a4c5cedfc4df33c
(cherry picked from commit 62acbce4a2)
2018-03-19 08:35:39 +09:00
TreeHugger Robot
dddda727c4 Merge "Init: Enable init to relabel symlinks for recovery_block_device." into pi-dev 2018-03-18 05:56:13 +00:00
TreeHugger Robot
0773d17fd3 Merge "Mark some odm properties as vendor-init-settable" into pi-dev 2018-03-16 16:54:29 +00:00
padarshr
ecab401087 Init: Enable init to relabel symlinks for recovery_block_device.
Allow init the ability to relabel recovery block devices. In the case
where we have recovery as a chain partition, due to its presence in
early mount node, init, in first stage itself would require relabel
permissions for the restorecon operation on recovery block device.

Bug: 73642793
Test: On bootup, recovery partition gets the appropriate se-label.
      Perform OTA on non-A/B device with recovery as chain partition,
      now the recovery partition gets upgraded successfully, now that
      it has the correct se-label.

Change-Id: I370c510320e78ab78c9c55573073415b4983d0f6
Merged-In: I370c510320e78ab78c9c55573073415b4983d0f6
(cherry picked from commit bc14ee3cd7)
2018-03-16 15:10:27 +08:00
Bowgo Tsai
98d5c1f52a Mark some odm properties as vendor-init-settable
Bug: 64195575
Test: boot a device

Change-Id: I7f7deb5e2c5c6e0a75cf22eb610a7973b5be0d7e
Merged-In: I7f7deb5e2c5c6e0a75cf22eb610a7973b5be0d7e
(cherry picked from commit a47a1c25af)
2018-03-16 15:02:30 +08:00
Jaekyun Seok
0630c7d966 Allow vendor-init-settable to ro.enable_boot_charger_mode
vendor-init-settable should be allowed to ro.enable_boot_charger_mode so
that SoC vendors can set its default value.

Bug: 74421250
Test: succeeded building and tested with taimen
Change-Id: I2859aab29fefb7882989413a089b0de55142d2f1
Merged-In: I2859aab29fefb7882989413a089b0de55142d2f1
(cherry picked from commit 46bc518c69)
2018-03-14 07:21:02 +09:00
TreeHugger Robot
9579ff4185 Merge "Add ro.hardware.audio.hearing_aid" into pi-dev 2018-03-13 18:21:58 +00:00
Jakub Pawlowski
f91c9b454f Add ro.hardware.audio.hearing_aid
Bug: 69623109
Change-Id: I7d194a3489fc5ff278cef7bebe9bfe6c39d3b2b8
(cherry-picked from 4a40c592404bdc2032067f4a3fac2f33b9246aa0)
2018-03-13 18:20:41 +00:00
Petri Gynther
37d15150d3 Merge "Bluetooth A2DP offload: Binder call to audio HAL" into pi-dev 2018-03-13 02:00:33 +00:00
TreeHugger Robot
37666db3ff Merge "Revert "Revert "Move rild from public to vendor.""" into pi-dev 2018-03-12 20:02:01 +00:00
Sunny Kapdi
863a4efaf3 Bluetooth A2DP offload: Binder call to audio HAL
Add rule to allow Binder call from Bluetooth process to Bluetooth
audio HIDL interface running in audio HAL service process.

Bug: 63932139
Bug: 72242910
Test: Manual; TestTracker/148125
Change-Id: I1981a78bece10b8e516f218d3edde8b77943d130
(cherry picked from commit e8cfac90e8)
2018-03-12 19:21:08 +00:00
Amit Mahajan
312248ff72 Revert "Revert "Move rild from public to vendor.""
This reverts commit 016f0a58a9.

Reason for revert: Was temporarily reverted, merging back in with fix.

Bug: 74486619
Bug: 36427227
Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
2018-03-12 17:12:53 +00:00
Bowgo Tsai
07ddddafd2 Adding /odm support
/odm partition isn't mandatory and the following symlinks will exist on
a device without /odm partition.

  /odm/app ->/vendor/odm/app
  /odm/bin ->/vendor/odm/bin
  /odm/etc ->/vendor/odm/etc
  /odm/firmware ->/vendor/odm/firmware
  /odm/framework ->/vendor/odm/framework
  /odm/lib -> /vendor/odm/lib
  /odm/lib64 -> /vendor/odm/lib64
  /odm/overlay -> /vendor/odm/overlay
  /odm/priv-app -> /vendor/odm/priv-app

This CL allows all domains to access the symlinks, also removes the
Treble compliance neverallows on them because the actual restrictions
should apply to the real path directly.

Bug: 70678783
Test: boot a device
Change-Id: If1522780a13710d8a592272dc688685cbae29f52
(cherry picked from commit dd6efea232)
2018-03-12 09:26:11 -07:00
TreeHugger Robot
cb4e3b77ca Merge "Revert "Move rild from public to vendor."" into pi-dev 2018-03-12 00:01:17 +00:00
Jeffrey Vander Stoep
016f0a58a9 Revert "Move rild from public to vendor."
This reverts commit eeda6c6106.

Reason for revert: broken presubmit tests

Bug: 74486619
Change-Id: I103c3faa1604fddc27b3b4602b587f2d733827b1
2018-03-11 20:46:50 +00:00
TreeHugger Robot
910f63f9ee Merge "Move rild from public to vendor." into pi-dev 2018-03-09 22:42:30 +00:00
TreeHugger Robot
37925fdbc5 Merge "Allow public-readable to persist.rcs.supported" into pi-dev 2018-03-08 22:25:29 +00:00
Amit Mahajan
eeda6c6106 Move rild from public to vendor.
Also change the neverallow exceptions to be for hal_telephony_server
instead of rild.

Test: Basic telephony sanity, treehugger
Bug: 36427227
Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
2018-03-08 12:50:13 -08:00
Jaekyun Seok
9ddba296c8 Allow public-readable to persist.rcs.supported
For now, persist.rcs.supported has only vendor-init-settable, but it
turned out that the property should be read by vendor components in
some devices including 2018 Pixels.

Bug: 74266614
Test: succeeded building and tested on a blueline device with
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true

Change-Id: I926eb4316c178a39693300fe983176acfb9cabec
2018-03-09 00:34:48 +09:00
Ruchi Kandoi
e0e2342e16 Add secure_element_device
Test: eSE initializes at boot
Bug: 64881253
Change-Id: Ib2388b7368c790c402c000adddf1488bee492cce
(cherry picked from commit ea3cf0007e)
2018-03-07 13:54:21 -08:00
Alan Stokes
f2a23efcd9 Allow hal_vibrator access to sysfs_vibrator files. am: 17d008ae73 am: 324e6ef541
am: 0d12c356fd

Change-Id: I245c2914f51f317758148123dc1368c326f562f1
2018-03-01 17:03:54 +00:00
Alan Stokes
17d008ae73 Allow hal_vibrator access to sysfs_vibrator files.
We already grant rw file access, but without dir search it's not much
use.

denied { search } for name="vibrator" dev="sysfs" ino=49606 scontext=u:r:hal_vibrator_default:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=dir permissive=0

Bug: 72643420
Test: Builds, denial gone
Change-Id: I3513c0a14f0ac1e60517009046e2654f1fc45c66
2018-03-01 14:30:52 +00:00
huans
f32e00e0d0 Add shell:fifo_file permission for cameraserver am: a6acef9a9e am: 42756b7628
am: 5083087127

Change-Id: I23c9f800c4faab0d03a9d239bbb2d0a61b6263ab
2018-03-01 02:39:22 +00:00
huans
a6acef9a9e Add shell:fifo_file permission for cameraserver
Bug: 73952536
Test: run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.IdleUidTest#testCameraAccessBecomingInactiveUid
Change-Id: I508352671367dfa106e80108c3a5c0255b5273b2
2018-02-28 16:12:40 -08:00
Jeff Vander Stoep
cb33022b26 Merge "kernel: exempt from vendor_file restrictions" am: 609aa6b83a am: 7a22490cb7
am: 426f78ca04

Change-Id: I4f1983feed32c668d723932c61a6f51692c61f53
2018-02-28 20:59:51 +00:00
Treehugger Robot
609aa6b83a Merge "kernel: exempt from vendor_file restrictions" 2018-02-28 20:30:36 +00:00
Haynes Mathew George
a9d3fd90d8 audio: Enable vndbinder use from hal_audio am: ebc7b434e2 am: 5d3e4f0c3b
am: 142bb78cda

Change-Id: I1e721f2bfb59d2510769b7ddae9c22d5c8ae7dba
2018-02-28 20:01:53 +00:00
Jeff Vander Stoep
1242c940ef kernel: exempt from vendor_file restrictions
The kernel is unusual in that it's both a core process, but vendor
provided. Exempt it from the restriction against accessing files from
on /vendor. Also, rework the neverallow rule so that it disallows
opening/modifying files, but allows reading files passed over IPC.

Bug: 68213100
Test: build (this is a build-time test)
Change-Id: I2f6b2698ec45d2e8480dc1de47bf12b9b53c4446
2018-02-28 18:06:37 +00:00
Haynes Mathew George
ebc7b434e2 audio: Enable vndbinder use from hal_audio
Allow hal audio to use vndbinder

Change-Id: I83fc8d5b873bfc4e36f44e423d5740cb5e9739ee
2018-02-28 08:56:56 -08:00
Jaekyun Seok
e57289cacb Allow vendor-init-settable to persist.sys.zram_enabled am: b47efe346e am: 8ce9b83fed
am: d647799d94

Change-Id: Ic463f569bfe91dde1981168fb81654855ca6dc01
2018-02-28 01:51:47 +00:00
Jaekyun Seok
1037f4637c Merge "Allow vendor-init-settable for ro.radio.noril" am: d5996eca28 am: 2a48370665
am: a84c15fd8d

Change-Id: I19b9fd4b0b629650199d3306ea0d576f716128c9
2018-02-27 23:45:18 +00:00
Jaekyun Seok
b47efe346e Allow vendor-init-settable to persist.sys.zram_enabled
persist.sys.zram_enabled is set in vendor/build.prop in taimen and walleye,
which was added after the initial whitelist.
go/treble-sysprop-compatibility requires whitelisting such a property to
allow it to be overridden by vendor/{default|build}.prop.

Bug: 73905119
Test: succeeded building and test with taimen
Change-Id: I931182aa05eb90c14df6e2c7cc26913f3874fa18
2018-02-27 23:22:32 +00:00
Treehugger Robot
d5996eca28 Merge "Allow vendor-init-settable for ro.radio.noril" 2018-02-27 23:18:41 +00:00
Alan Stokes
6c467309f1 Merge "Allow init to create & write to vibrator/trigger." am: 6ffa76ea78 am: 04b800ed7e
am: 523c49139d

Change-Id: I77376c86b0fc38c5214fb26fa6c13339e3646dc9
2018-02-27 15:52:40 +00:00
Alan Stokes
396c362e59 Suppress noisy performanced denials in permissive mode. am: cf71a5ae60 am: 5df3c8d6fc
am: 4c63cd4c2a

Change-Id: I801c367ef298445f5567f2c0441953872a697e82
2018-02-27 15:52:16 +00:00
Treehugger Robot
6ffa76ea78 Merge "Allow init to create & write to vibrator/trigger." 2018-02-27 15:34:15 +00:00
Alan Stokes
cf71a5ae60 Suppress noisy performanced denials in permissive mode.
The sheer volume of these can cause confusion.

Sample denials (repeated for many processes):
denied { getattr } for path="/proc/1/status" dev="proc" ino=24427 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=file permissive=1
denied { open } for path="/proc/1" dev="proc" ino=18608 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=dir permissive=1
denied { open } for path="/proc/1/status" dev="proc" ino=24427 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=file permissive=1
denied { read } for name="status" dev="proc" ino=24427 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=file permissive=1

Bug: 72643420
Test: Denials no longer present in permissive mode.
Change-Id: Ic07b9b0b59ca2122c4843095b63075ab8fd2c70b
2018-02-27 10:42:12 +00:00
Alan Stokes
5a570606ec Allow init to create & write to vibrator/trigger.
The write is here: https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc#257.

Denials (on a device with the sysfs_vibrator label properly applied):
denied { write } for name="vibrator" dev="sysfs" ino=49613 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=dir
denied { write } for name="trigger" dev="sysfs" ino=49620 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file
denied { open } for path="/sys/devices/<redacted>/vibrator/trigger" dev="sysfs" ino=49620 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file

Bug: b/72643420
Test: Device boots, denials gone

Change-Id: Ib50d9a8533303daccb1330685e3204bea3fbd8a8
2018-02-27 10:17:52 +00:00
Jaekyun Seok
4a62c060e3 Allow vendor-init-settable for ro.radio.noril
ro.radio.noril is used for modem-less products including emulator.

Bug: 73871799
Test: succeeded building and tested with taimen
Change-Id: I2270374a2523889aa4874840594d8267614f93ad
2018-02-26 23:10:10 +00:00
Robert Sesek
869562e9e3 Remove rules for starting the webview_zygote as a child of init.
The webview_zygote is now launched as a child-zygote process from the
main zygote process.

Bug: 63749735
Test: m
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.
Merged-In: I9c948b58a969d35d5a5add4b6ab62b8f990645d1
Change-Id: I153476642cf14883b0dfea0d9f5b3b5e30ac1c08
2018-02-23 10:55:22 -05:00
TreeHugger Robot
d580a23ec1 Merge "Remove rules for starting the webview_zygote as a child of init." 2018-02-23 15:54:32 +00:00
Jeff Vander Stoep
ebdf8f7eac Useful neverallow errors am: 7636d6071a am: 172d7a84f2
am: 64b615351a

Change-Id: Ida581950c8591eb64c232ca752d16c4f8cd34c45
2018-02-23 08:14:10 +00:00
Jeff Vander Stoep
7636d6071a Useful neverallow errors
Neverallow errors include the file name and line number of the
violated rule. However, if multiple neverallow rules are included
within a single macro, then the line number is for the entire macro,
not the individual neverallow rule that is violated. To fix this,
only include one neverallow rule per macro.

This changes nothing on device, nor does it change the results of
compilation, it only makes the printed errors more useful.

Bug: 69139821
Test: build aosp_taimen-userdebug (neverallow rules are build time
    tests)

Change-Id: Id0fc5906431db20e71265c7e9d55fbee4bdf53db
2018-02-23 07:55:14 +00:00
Sandeep Patil
b827155cce Add label for kernel test files and executables am: 34e35e9e95 am: bf01e8e1d9
am: d044177ae8

Change-Id: I2c84e9a6252e5cb2c85ec1e50f9e2583f3fb9027
2018-02-23 00:26:18 +00:00
Sandeep Patil
34e35e9e95 Add label for kernel test files and executables
This required for kernel to do loopback mounts on filesystem
images created by the kernel system call tests in LTP.

Add a corresponding neverallow to stop all domains from accessing
the location at /data/local/tmp/ltp.

Bug: 73220071
Test: Boot sailfish successfully
Test: run vts-kernel -m VtsKernelLtp -t syscalls.fchown04

Change-Id: I73f5f14017e22971fc246a05751ba67be4653bca
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-02-22 12:55:30 -08:00
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
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
Robert Sesek
ca4c4e57b2 Remove rules for starting the webview_zygote as a child of init.
The webview_zygote is now launched as a child-zygote process from the
main zygote process.

Bug: 63749735
Test: m
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.
Change-Id: I9c948b58a969d35d5a5add4b6ab62b8f990645d1
2018-02-16 16:26:42 -05:00
Roshan Pius
eeccc0ddb4 Merge "wificond.te: Remove unnecessary permissions" 2018-02-16 00:31:16 +00: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
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
Christopher Ferris
6766543a16 Allow read-only of new property for malloc hooks.
Bug: 30561479

Test: Booted on walleye and verified that read denials of the property
Test: do not generate warnings.
Change-Id: I61a4a7d3a360a6d27d8986eb8f3f9662272233b1
(cherry picked from commit 2f35f5ca6c)
2018-02-13 13:36:51 -08:00
Christopher Ferris
9c3ef9f713 Merge "Allow read-only of new property for malloc hooks." 2018-02-13 21:21:31 +00:00
TreeHugger Robot
4737e678d5 Merge "Block SDK 28 app from using proc/net/xt_qtaguid" 2018-02-13 16:26:16 +00:00
Christopher Ferris
2f35f5ca6c Allow read-only of new property for malloc hooks.
Bug: 30561479

Test: Booted on walleye and verified that read denials of the property
Test: do not generate warnings.
Change-Id: I61a4a7d3a360a6d27d8986eb8f3f9662272233b1
2018-02-13 04:09:55 +00:00
Tom Cherry
13ad150ceb Prevent vendor_init from using binder or sockets am: a099830e3d am: 40e15ab342
am: 4f0b721c29

Change-Id: I904afb67ec4c38e5c1d214edfd9f34473e92c6ba
2018-02-12 16:54:03 +00:00
Tom Cherry
a099830e3d Prevent vendor_init from using binder or sockets
Bug: 72809699
Test: build
Change-Id: Ifb66ad13557af7d2dc6d3ef823e326a5fba51b24
2018-02-09 19:32:59 +00:00
Chenbo Feng
5ec8f8432b Block SDK 28 app from using proc/net/xt_qtaguid
The file under /proc/net/xt_qtaguid is going away in future release.
Apps should use the provided public api instead of directly reading the
proc file. This change will block apps that based on SDK 28 or above to
directly read that file and we will delete that file after apps move
away from it.

Test: Flashed with master branch on marlin, verified phone boot, can
      browse web, watch youtube video, make phone call and use google
      map for navigation with wifi on and off.
      run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
      run cts -m CtsAppSecurityHostTestCases -t \
      		android.appsecurity.cts.AppSecurityTests

Change-Id: I4c4d6c9ab28b426acef23db53f171de8f20be1dc
2018-02-09 11:15:57 -08:00
Jeff Vander Stoep
dc54573b81 Merge "label /data/vendor{_ce,_de}" am: 3721b0513d am: 7fd715ea82
am: 037f20b9c0

Change-Id: Ie7bcebebf47c7e0ea879ffb84c6dc3ce2e5b7259
2018-02-09 06:09:45 +00:00
Jeff Vander Stoep
d25ccabd24 label /data/vendor{_ce,_de}
Restrictions introduced in vendor init mean that new devices
may not no longer exempt vendor init from writing to system_data_file.
This means we must introduce a new label for /data/vendor which
vendor_init may write to.

Bug: 73087047
Test: build and boot Taimen and Marlin. Complete SUW, enroll fingerprint
    No new denials.

Change-Id: I65f904bb28952d4776aab947515947e14befbe34
2018-02-08 17:21:25 +00:00
Tri Vo
41924f563f Merge "shell: remove from system_executes_vendor_violators." am: 8c8ed1f03d am: 602575ec4a
am: 1e20b40471

Change-Id: I3bfbbaaeb5557d42064d42ee977dd73d73bfe80a
2018-02-07 23:22:19 +00:00
Tri Vo
bfe51254ee shell: remove from system_executes_vendor_violators.
And grant explicit exemption from system_executes_vendor_violators
neverallow rules.

This does not change the policy, but is needed to test the violator
attribute for emptiness.

Bug: 72662597
Test: build sepolicy
Change-Id: Iba79bb42e1381b221fe0dc53470f62f8267a4791
2018-02-07 17:48:28 +00:00
Tri Vo
325aec5c3f Merge changes from topic "27_mapping" am: 4e9b1c6bf6 am: dc357d0c7e
am: 4d4daa3f9e

Change-Id: Ic96937efe156d8338f121981afaf4281e62542cd
2018-02-07 04:35:40 +00:00
Chenbo Feng
6f4adc57ba Merge "Revert "Remove app access to qtaguid ctrl/stats file"" am: 2904db67fb am: 178be15190
am: 8f17032d5d

Change-Id: I5c12f3f6a42c4d9de9870ad58b56b3d755a01133
2018-02-07 03:53:06 +00:00
Tri Vo
4e9b1c6bf6 Merge changes from topic "27_mapping"
* changes:
  Add 27.0 mapping file to system image.
  Add missing types to 27.0[.ignore].cil.
  Temporary fix to avoid expandattribute value conflicts.
  Remove reboot_data_file from 27 mapping file.
2018-02-06 22:35:43 +00:00
Treehugger Robot
2904db67fb Merge "Revert "Remove app access to qtaguid ctrl/stats file"" 2018-02-06 20:34:27 +00:00
Chenbo Feng
8f568afad7 Revert "Remove app access to qtaguid ctrl/stats file"
This reverts commit fad0b04de1.

Reason for revert: This change crashed facebook App on dogfood build.

Bug: 72977484
Change-Id: I4f35b00c11afbd4914f572d3cc0378d740403ed2
2018-02-06 18:57:52 +00:00
Tri Vo
284a18ae52 Temporary fix to avoid expandattribute value conflicts.
Bug: 69390067
Bug: 72757373
Test: build sepolicy
Change-Id: I44aeb547ff7ab7042eddfa780df8cbb7dcec71b4
2018-02-06 18:16:43 +00:00
Jaekyun Seok
d1845580e7 Merge "Add tests for compatible property (1/2)" am: cfbe2a1f55 am: e8913ef5a6
am: 6a17fc5fde

Change-Id: I789bc67326f580eaacd86db760b204a6543cd75e
2018-02-06 03:09:26 +00:00
Treehugger Robot
cfbe2a1f55 Merge "Add tests for compatible property (1/2)" 2018-02-05 22:01:29 +00:00
Treehugger Robot
cbe2d7d714 Merge "lmkd: add live-lock killer daemon" 2018-02-05 21:56:29 +00:00
Carmen Jackson
e3817434ae Merge changes from topic "user-build-traceur" am: 0fe4586bb1 am: 5f15d4edc7
am: a94aaeb0ff

Change-Id: I7c3006caae89234c1f9e77e93f870800f3552bac
2018-02-05 20:53:04 +00:00
Jeff Vander Stoep
1929e5c2c7 Enable Traceur on user builds. am: de04528c3b am: 2dd63f4772
am: f078d25560

Change-Id: I8eb8543b07dfde06db56ea9a2be3d54bebb00805
2018-02-05 20:52:50 +00:00
Jeff Vander Stoep
2dd63f4772 Enable Traceur on user builds.
am: de04528c3b

Change-Id: I26c31c45bc0aeeca00073267662adc59fb090532
2018-02-05 20:41:10 +00:00
Treehugger Robot
0fe4586bb1 Merge changes from topic "user-build-traceur"
* changes:
  Use a whitelisting strategy for tracefs.
  Enable Traceur on user builds.
2018-02-05 20:31:23 +00:00
Mark Salyzyn
d583e5966e lmkd: add live-lock killer daemon
llkd needs the ability to forcibly crash the kernel if
cause is unlikely to result in an orderly shutdown. It
also needs to scan /proc/<pid> for additional process
information.

Test: lmkd_unit_test --gtest_filter=llkd.*
Bug: 33808187
Change-Id: I7f158a13814e79d5ec71fe90dbc7461abb521945
2018-02-05 12:12:51 -08:00
Mark Salyzyn
dea7da52c2 lmkd: add live-lock killer daemon
llkd needs the ability to forcibly crash the kernel if
cause is unlikely to result in an orderly shutdown. It
also needs to scan /proc/<pid> for additional process
information.

Test: lmkd_unit_test --gtest_filter=llkd.*
Bug: 33808187
Change-Id: I7f158a13814e79d5ec71fe90dbc7461abb521945
2018-02-05 20:11:46 +00:00
Jaekyun Seok
64ade65d17 Add tests for compatible property (1/2)
The feature of compatible property has its own neverallow rules and it
is enforced on devices launchig with Android P.

This CL changes hal_nfc to hal_nfc_server in neverallow rules because
sepolicy-analyze doesn't recognize it. Additionally one more neverallow
rule is added to restrict reading nfc_prop.

Bug: 72013705
Bug: 72678352
Test: 'run cts -m CtsSecurityHostTestCases' on walleye with
ro.product.first_api_level=28

Change-Id: I753cc81f7ca0e4ad6a2434b2a047052678f57671
2018-02-06 03:06:21 +09:00
Carmen Jackson
2c8ca45d2d Use a whitelisting strategy for tracefs.
This changes tracefs files to be default-enabled in debug mode, but
default-disabled with specific files enabled in user mode.

Bug: 64762598
Test: Successfully took traces in user mode.

Change-Id: I572ea22253e0c1e42065fbd1d2fd7845de06fceb
2018-02-05 10:03:06 -08:00
Andrew Scull
558e259fd8 Merge "authsecret HAL policies." 2018-02-05 16:23:56 +00:00
Andrew Scull
64f35fa01e authsecret HAL policies.
Bug: 71527305
Test: compile and boot
Change-Id: I91097bd62d99b8dd9eb6f53060badbaf0f4b8b4a
(cherry picked from commit 1aedf4b5f8)
2018-02-05 11:19:46 +00:00
Jeff Vander Stoep
9eb53c1c40 Merge "te_macros: remove print macro" am: 4ca98248ca am: 3f5dd22418
am: eca4e2d48f

Change-Id: Ie67323b905f4240b2c0b4571051bfd15951b3081
2018-02-02 21:09:51 +00:00
Jeff Vander Stoep
de04528c3b Enable Traceur on user builds.
Test: Standard Traceur workflow works successfully with no
selinux denials on a user build.
Bug: 64762598
Change-Id: I0dfe506d463b63d70c5bda03f8706041ea7ab448
2018-02-02 12:46:36 -08:00
Treehugger Robot
4ca98248ca Merge "te_macros: remove print macro" 2018-02-02 20:25:42 +00:00
Jeff Vander Stoep
d28c0569ee te_macros: remove print macro
aosp/605217 adds the following lines:
genfscon tracefs /options/print-tgid u:object_r:debugfs_tracing:s0
genfscon debugfs /tracing/options/print-tgid u:object_r:debugfs_tracing:s0

However, the m4 pre-processing step of selinux policy compilation outputs:
genfscon tracefs /options/-tgid u:object_r:debugfs_tracing:s0
genfscon debugfs /tracing/options/-tgid u:object_r:debugfs_tracing:s0

And as a result of the "print" it prints:
m4: system/sepolicy/private/genfs_contexts: 177:
m4: system/sepolicy/private/genfs_contexts: 203:

Due to the following macro:
https://android.googlesource.com/platform/system/sepolicy/+/oreo-mr1-dev/public/te_macros#580

This change removes the now-deprecated print macro to unblock
aosp/605217.

Bug: 72862003
Test: verify that the m4 output for aosp/605217 is correct.
Change-Id: Ia4ec96e16b98e8df241cceb64e3f3b7bea9a7f3d
2018-02-02 09:21:24 -08:00
Paul Crowley
60676fd89d Merge "Allow vendor_init and e2fs to enable metadata encryption" am: 5d422a305d am: 55b3a9d21e
am: 72750a917f

Change-Id: I3a830a8622c14579b41e4182fcba8db46020e746
2018-02-02 16:56:27 +00:00
Jaekyun Seok
abfe43536e Merge "Add neverallow rules to restrict reading radio_prop" am: 310e8a559b am: c292460c3c
am: 77744c7b8f

Change-Id: Ib9e289140b87db94f39604c73ec22e34791c1d70
2018-02-02 16:54:56 +00:00
Chenbo Feng
19d940cb5c Merge "Remove app access to qtaguid ctrl/stats file" am: 829a88b7ee am: 1e9a1ece9e
am: eba99b0421

Change-Id: I68f1b08dcafeab541d84cd9a48acb425d6acdda8
2018-02-02 16:54:33 +00:00
Yin-Chia Yeh
ca05380a69 Merge "Camera: sepolicy for external camera" am: 15238f7cc9 am: 3ee4158e45
am: 0dd72cb057

Change-Id: I854d004a3feef5e1965730261e28efaf114a94bc
2018-02-02 16:54:02 +00:00
Paul Crowley
d9a4e06ec5 Allow vendor_init and e2fs to enable metadata encryption
Bug: 63927601
Test: Enable metadata encryption in fstab on Taimen, check boot success.

Change-Id: Iddbcd05501d360d2adc4edf8ea7ed89816642d26
2018-02-01 13:25:34 -08:00
Treehugger Robot
310e8a559b Merge "Add neverallow rules to restrict reading radio_prop" 2018-02-01 04:35:49 +00:00
Treehugger Robot
829a88b7ee Merge "Remove app access to qtaguid ctrl/stats file" 2018-02-01 02:00:15 +00:00
Yin-Chia Yeh
15238f7cc9 Merge "Camera: sepolicy for external camera" 2018-01-31 22:35:24 +00:00