Commit graph

4035 commits

Author SHA1 Message Date
Tri Vo
1079e6c4a5 Merge "Treble-ize sepolicy for fwk HIDL services." am: 6cf01b3ef2
am: 48c8f21b37

Change-Id: Iee8b7b999a4ca887361e2923136ac9cc9e8a06ca
2019-04-22 17:28:57 -07:00
Tri Vo
6cf01b3ef2 Merge "Treble-ize sepolicy for fwk HIDL services." 2019-04-23 00:05:06 +00:00
Tri Vo
1d34b8cc31 Treble-ize sepolicy for fwk HIDL services.
Bug: 130734497
Test: m selinux_policy; system_server and statds still have permission
to export HIDL services.
Change-Id: I6e87b236bdbdd939fca51fb7255e97635118ed2d
2019-04-22 12:47:53 -07:00
Chong Zhang
45f5738b91 Merge "add mediaswcodec to watchdog and dumpstate" am: 40a71c6f7b
am: 851681366e

Change-Id: I6236774d935a59648ecb0c039df8c15e6991e9ed
2019-04-19 18:14:17 -07:00
Bowgo Tsai
3d2d1de35d Merge "Adding /debug_ramdisk mount point" am: 63f8d4feb7
am: f5d5e2a848

Change-Id: I797d7158dc509cf303bae13f1676b3053e26cd8e
2019-04-19 17:45:32 -07:00
Treehugger Robot
40a71c6f7b Merge "add mediaswcodec to watchdog and dumpstate" 2019-04-20 00:14:07 +00:00
Treehugger Robot
63f8d4feb7 Merge "Adding /debug_ramdisk mount point" 2019-04-19 23:54:53 +00:00
Chong Zhang
ad3621a7b7 add mediaswcodec to watchdog and dumpstate
bug: 130887807
test: adb bugreport and check mediaswcodec stack is there
Change-Id: I4a37e4e06c4905f435e96d8b1497e3617e688478
2019-04-19 12:13:33 -07:00
Sudheer Shanka
bd9411d012 Remove obsolete denials tracking.
am: 5bce022dce

Change-Id: If1bd6e8a94eddd341eb864a2b43071a4abbb529e
2019-04-19 09:17:34 -07:00
Sudheer Shanka
5bce022dce Remove obsolete denials tracking.
Bug: 118185801
Test: manual
Change-Id: Ibc4590d6e7b825124035e8f51574afbe5ae4b750
2019-04-18 17:22:19 -07:00
Bowgo Tsai
2e86fa0e81 Adding /debug_ramdisk mount point
This change allows first-stage init to mount a tmpfs under
/debug_ramdisk to preserve files from the debug ramdisk, for
second-stage init to load sepolicy and property files.

This is to allow adb root on a USER build if the device is unlocked.

Bug: 126493225
Test: boot a device with debug ramdisk, checks related files are loaded
Change-Id: Iad3b84d9bdf5d8e789219126c88701bf969253ef
2019-04-18 23:59:54 +08:00
TreeHugger Robot
625ed86bc9 Merge "Allow system_server to schedule mediaswcodec" into qt-dev 2019-04-18 03:24:14 +00:00
Chong Zhang
e024c222f5 Merge "Allow system_server to schedule mediaswcodec" am: 6e4d217991
am: 24a7570815

Change-Id: Ia103b93ae69656c76eb7da7b309c842641ed7ed6
2019-04-17 14:47:25 -07:00
Ryan Mitchell
c354f10e51 Merge "Allow zygote to scan static overlays on /oem" am: 1054b44b81
am: 5338085676

Change-Id: Ief3ee638819d69d6badf759d005433f73689abc6
2019-04-17 14:44:48 -07:00
Chong Zhang
6fd8d82f31 Allow system_server to schedule mediaswcodec
bug: 130669553
Change-Id: I49d4ef473181d2270d90a9350c5e05b8b7db76bb
(cherry-picked from https://android-review.googlesource.com/c/platform/system/sepolicy/+/946836)
2019-04-17 20:51:51 +00:00
Treehugger Robot
6e4d217991 Merge "Allow system_server to schedule mediaswcodec" 2019-04-17 20:09:36 +00:00
Treehugger Robot
1054b44b81 Merge "Allow zygote to scan static overlays on /oem" 2019-04-17 19:12:26 +00:00
Chong Zhang
042f844e54 Allow system_server to schedule mediaswcodec
bug: 130669553
Change-Id: I49d4ef473181d2270d90a9350c5e05b8b7db76bb
2019-04-17 09:51:51 -07:00
Ryan Mitchell
ef1a64e231 Allow zygote to scan static overlays on /oem
During preloading resources, zygote scans the overlay directories of
supported partitions looking for android RROs to apply statically. Zygote
currently is allowed to read overlays in /oem/overlay, but zygote does
not have the search permission to be able to scan /oem.

Without this patch, this denial is logged:
04-04 14:57:40.136   876   876 I auditd  : type=1400 audit(0.0:9):
avc: denied { search } for comm="main" name="oem" dev="dm-3" ino=46
scontext=u:r:zygote:s0 tcontext=u:object_r:oemfs:s0 tclass=dir
permissive=0

Bug: 121033532
Test: booting without denials and stat oem succeeds
Change-Id: I661f3e0aff7ec3513870d08ddc122fc359b8f995
2019-04-17 16:06:34 +00:00
Nick Kralevich
6b34e64ecb Remove isV2App
This selector is no longer used.

Bug: 123605817
Bug: 111314398
Test: compiles and boots

(cherry picked from commit 795add585c)

Change-Id: I673ce4b6898d58602e553e7cf194bb5eac8361e0
2019-04-17 00:10:26 -07:00
Nick Kralevich
819d644855 Remove isV2App am: 795add585c
am: 7c4351486a

Change-Id: Ib066e7229ac942dfd3466e411a23e55d8ac7b6e7
2019-04-16 23:24:40 -07:00
Nick Kralevich
795add585c Remove isV2App
This selector is no longer used.

Bug: 123605817
Bug: 111314398
Test: compiles and boots
Change-Id: I61bb6b9f17ba4534569bd4a1c0489023cdaf698d
2019-04-16 16:01:08 -07:00
TreeHugger Robot
f9085929fb Merge "Allow bootstrap bionic only to init, ueventd, and apexd" into qt-dev 2019-04-15 16:39:14 +00:00
Chenbo Feng
d7c74f9f7f Merge "Move pf_key socket creation permission to netd" am: 3cba24a81a
am: e2954cb101

Change-Id: I17fbef0cb1d7688c2d27c7d9096239ff6d61bb32
2019-04-12 16:39:56 -07:00
Treehugger Robot
3cba24a81a Merge "Move pf_key socket creation permission to netd" 2019-04-12 22:35:52 +00:00
Tri Vo
c0b2e059f2 Merge "Deprecate /mnt/sdcard -> /storage/self/primary symlink." am: bf7ae04865
am: de8d7a0da4

Change-Id: I86207a187cea992a18e971b239861ee21c97ffb9
2019-04-12 09:45:14 -07:00
Treehugger Robot
bf7ae04865 Merge "Deprecate /mnt/sdcard -> /storage/self/primary symlink." 2019-04-12 16:18:57 +00:00
Torne (Richard Coles)
180b243c2e Allow webview_zygote to read the /data/user/0 symlink.
ART follows the /data/user/0 symlink while loading cache files, leading
to:

avc: denied { getattr } for comm="webview_zygote" path="/data/user/0"
dev="sda35" ino=1310726 scontext=u:r:webview_zygote:s0
tcontext=u:object_r:system_data_file:s0 tclass=lnk_file permissive=0

Allow this access, the same as app and app_zygote do.

Bug: 123246126
Test: DeviceBootTest.SELinuxUncheckedDenialBootTest
Change-Id: I90faa524e15a17b116a6087a779214f2c2142cc2
(cherry picked from commit d40f7fd9d5)
2019-04-12 11:35:43 -04:00
Torne (Richard Coles)
0de8d0086e Merge "Allow webview_zygote to read the /data/user/0 symlink." am: addc1c234c
am: b685b3e854

Change-Id: I069f5040f5f59454653850297cbea3181b8522b7
2019-04-12 06:19:29 -07:00
Jeff Vander Stoep
afd4f37b48 Merge "Revert "audit use of net.dns. property"" am: 0d86ec526d
am: 867d6732aa

Change-Id: Ifb777166dabb4269daa204ae448f03c7b2cd1bf8
2019-04-12 05:21:38 -07:00
Jiyong Park
3ccbb08f74 Allow bootstrap bionic only to init, ueventd, and apexd am: a0f998e6de
am: e2236b3158

Change-Id: I91c1cb98e140a93b61693612a62c17c41cf8ef2d
2019-04-12 05:08:31 -07:00
Treehugger Robot
addc1c234c Merge "Allow webview_zygote to read the /data/user/0 symlink." 2019-04-12 05:37:33 +00:00
Maciej Żenczykowski
add6473632 sepolicy: proper labelling of /sys/devices/virtual/net/...
While we're at it also label /sys/module/tcp_cubic/parameters correctly.

Before:
  [40/54] BinderTest#InterfaceSetMtu: FAILED (4ms)

  STACKTRACE:
  system/netd/tests/binder_test.cpp:2724: Failure
  Value of: status.isOk()
  Actual: false
  Expected: true
  Remote I/O error
  system/netd/tests/binder_test.cpp:2580: Failure
  Expected equality of these values:
  mtu
  Which is: 1200
  mtuSize
  Which is: 1500

  Summary
  -------
  libbpf_android_test: Passed: 9, Failed: 0, Ignored: 0
  libnetdbpf_test: Passed: 11, Failed: 0, Ignored: 0
  netd_integration_test: Passed: 53, Failed: 1, Ignored: 0
  netd_unit_test: Passed: 179, Failed: 0, Ignored: 0
  netdutils_test: Passed: 68, Failed: 0, Ignored: 0
  resolv_integration_test: Passed: 67, Failed: 0, Ignored: 0
  resolv_unit_test: Passed: 67, Failed: 0, Ignored: 0

  1 test failed
  -------------
  BinderTest#InterfaceSetMtu

Test: failing test now passes

Bug: 130318253
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2f7e9824ccce9d1597a18400a9ddd74b53ded857
Merged-In: I2f7e9824ccce9d1597a18400a9ddd74b53ded857
(cherry picked from commit f4aeb81eec)
2019-04-11 21:32:02 -07:00
Tri Vo
8eff3e23d8 Deprecate /mnt/sdcard -> /storage/self/primary symlink.
"This symlink was suppose to have been removed in the Gingerbread
time frame, but lives on."
https://android.googlesource.com/platform/system/core/+/d2f0a2c%5E!/

Apps targeting R+ must NOT use that symlink.

For older apps we allow core init.rc to create
/mnt/sdcard -> /storage/self/primary symlink.

Bug: 129497117
Test: boot device, /mnt/sdcard still around.
Change-Id: I6ecd1928c0f598792d9badbf6616e3acc0450b0d
2019-04-12 03:15:52 +00:00
Chenbo Feng
8a5539b5f0 Move pf_key socket creation permission to netd
Allow netd to trigger the kernel synchronize rcu with open and close
pf_key socket. This action was previously done by system_server but now
it need to be done by netd instead because there might be race issue
when netd is operating on a map that is cleaned up by system server.

Bug: 126620214
Test: android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: Id5ca86aa4610e37a2752709ed9cfd4536ea3bfaf
2019-04-12 02:24:46 +00:00
Maciej enczykowski
48b07a919f sepolicy: proper labelling of /sys/devices/virtual/net/...
am: f4aeb81eec

Change-Id: I06ede4700de19cb381c824307660e7addefd97fa
2019-04-11 19:03:02 -07:00
Treehugger Robot
0d86ec526d Merge "Revert "audit use of net.dns. property"" 2019-04-12 01:16:29 +00:00
Chalard Jean
628ebcda14 Merge "Let dumpstate get netd stack traces." 2019-04-12 00:57:27 +00:00
Maciej Żenczykowski
f4aeb81eec sepolicy: proper labelling of /sys/devices/virtual/net/...
While we're at it also label /sys/module/tcp_cubic/parameters correctly.

Before:
  [40/54] BinderTest#InterfaceSetMtu: FAILED (4ms)

  STACKTRACE:
  system/netd/tests/binder_test.cpp:2724: Failure
  Value of: status.isOk()
  Actual: false
  Expected: true
  Remote I/O error
  system/netd/tests/binder_test.cpp:2580: Failure
  Expected equality of these values:
  mtu
  Which is: 1200
  mtuSize
  Which is: 1500

  Summary
  -------
  libbpf_android_test: Passed: 9, Failed: 0, Ignored: 0
  libnetdbpf_test: Passed: 11, Failed: 0, Ignored: 0
  netd_integration_test: Passed: 53, Failed: 1, Ignored: 0
  netd_unit_test: Passed: 179, Failed: 0, Ignored: 0
  netdutils_test: Passed: 68, Failed: 0, Ignored: 0
  resolv_integration_test: Passed: 67, Failed: 0, Ignored: 0
  resolv_unit_test: Passed: 67, Failed: 0, Ignored: 0

  1 test failed
  -------------
  BinderTest#InterfaceSetMtu

Test: failing test now passes

Bug: 130318253
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2f7e9824ccce9d1597a18400a9ddd74b53ded857
2019-04-11 22:25:00 +00:00
Torne (Richard Coles)
d40f7fd9d5 Allow webview_zygote to read the /data/user/0 symlink.
ART follows the /data/user/0 symlink while loading cache files, leading
to:

avc: denied { getattr } for comm="webview_zygote" path="/data/user/0"
dev="sda35" ino=1310726 scontext=u:r:webview_zygote:s0
tcontext=u:object_r:system_data_file:s0 tclass=lnk_file permissive=0

Allow this access, the same as app and app_zygote do.

Bug: 123246126
Test: DeviceBootTest.SELinuxUncheckedDenialBootTest
Change-Id: I90faa524e15a17b116a6087a779214f2c2142cc2
2019-04-11 16:18:32 -04:00
Jeff Vander Stoep
d5bf5c0e31 Revert "audit use of net.dns. property"
This is just causing unnecessary log spam. Remove.

This reverts commit ecb00a109c.
Test: build
2019-04-11 19:25:59 +00:00
Chalard Jean
d3dc487f50 Merge "Let dumpstate get netd stack traces." into qt-dev
am: 99a6d5317e

Change-Id: Ie7d09f196ce53b550570d254637434c96decc908
2019-04-11 02:30:08 -07:00
TreeHugger Robot
99a6d5317e Merge "Let dumpstate get netd stack traces." into qt-dev 2019-04-11 08:42:15 +00:00
Jiyong Park
972d4b6473 Allow bootstrap bionic only to init, ueventd, and apexd
The bootstrap bionic (/system/lib/bootstrap/*) are only to the early
processes that are executed before the bionic libraries become available
via the runtime APEX. Allowing them to other processes is not needed and
sometimes causes a problem like b/123183824.

Bug: 123183824
Test: device boots to the UI
Test: atest CtsJniTestCases:android.jni.cts.JniStaticTest#test_linker_namespaces
Merged-In: Id7bba2e8ed1c9faf6aa85dbbdd89add04826b160
Change-Id: Id7bba2e8ed1c9faf6aa85dbbdd89add04826b160
(cherry picked from commit a0f998e6de)
2019-04-11 13:04:19 +09:00
Jiyong Park
a0f998e6de Allow bootstrap bionic only to init, ueventd, and apexd
The bootstrap bionic (/system/lib/bootstrap/*) are only to the early
processes that are executed before the bionic libraries become available
via the runtime APEX. Allowing them to other processes is not needed and
sometimes causes a problem like b/123183824.

Bug: 123183824
Test: device boots to the UI
Test: atest CtsJniTestCases:android.jni.cts.JniStaticTest#test_linker_namespaces
Change-Id: Id7bba2e8ed1c9faf6aa85dbbdd89add04826b160
2019-04-11 09:51:38 +09:00
Treehugger Robot
9596d6d4c7 Merge "Re-label /data/pkg_staging files as staging." 2019-04-10 16:30:21 +00:00
Treehugger Robot
e8bdbdeeab Merge "ephemeral_app: restore /dev/ashmem open permissions" 2019-04-10 16:02:01 +00:00
Dario Freni
e7aaa0c273 Re-label /data/pkg_staging files as staging.
While the directory is not present anymore in Q, it has been shipped on
Q Beta 2 and the absence of such label might cause issues to devices
with pending installs which receive an OTA > Beta 2.

Bug: 130184133
Test: m
Merged-In: Ie3e77eebd2e7fd7b3a6a940d189cbc2bb386dc0e
Change-Id: Ie3e77eebd2e7fd7b3a6a940d189cbc2bb386dc0e
2019-04-10 15:53:01 +00:00
Nick Kralevich
c7a3140398 Add policy for /system/bin/auditctl
/system/bin/auditctl is executed by init to set the kernel audit
throttling rate limit. Grant the rules necessary for this to happen.

Test: compiles and boots
Test: Perform an operation which generates lots of SELinux denials,
      and count how many occur before and after the time period.
Bug: 118815957

(cherry picked from commit 622ab8a2ba)

Change-Id: Ie5b4852fa217462557fce192c764305893968454
2019-04-09 20:55:30 -07:00
Nick Kralevich
0422f98b8e Merge "Add policy for /system/bin/auditctl" am: 4d8333709c
am: 5b3e855302

Change-Id: I99c62891461088702e16898102d227025ea75f12
2019-04-09 20:25:42 -07:00