Commit Graph

5352 Commits

Author SHA1 Message Date
Maciej enczykowski
d316288176 netd: remove freshly added neverallows
am: ef1493d2d5

Change-Id: I707215a238772a38727710d79f9d908698fc4dd8
2020-01-24 19:12:03 -08:00
Maciej Żenczykowski
ef1493d2d5 netd: remove freshly added neverallows
until we gain a better understanding of why this is breaking builds
on for example pixel3_mainline-userdebug

Test: no, but removing neverallows can't break the already broken build...
Bug: 148311635
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib4fa19317034412f9eaa789f39df2548f13178dc
2020-01-25 02:13:01 +00:00
Maciej Żenczykowski
d06a8a6e8a Merge "netd does not require and should not have SYS_ADMIN nor module loading privs"
am: 33a653331a

Change-Id: I01d0ae911a541b4fc0d57fde3d28e9656a6cae30
2020-01-24 16:50:33 -08:00
Maciej Żenczykowski
33a653331a Merge "netd does not require and should not have SYS_ADMIN nor module loading privs" 2020-01-25 00:19:24 +00:00
Valerie Hau
622e779b7a Merge "Whitelisting window_manager_native_boot system property"
am: b9b2acff99

Change-Id: I8a98e5afb20e81327a4293fb5e8038007d5bc8b5
2020-01-24 13:08:52 -08:00
Treehugger Robot
b9b2acff99 Merge "Whitelisting window_manager_native_boot system property" 2020-01-24 19:52:07 +00:00
Maciej Żenczykowski
d4a692fe7e netd does not require and should not have SYS_ADMIN nor module loading privs
This is pulling in:
  dontaudit netd self:capability sys_module;
  dontaudit netd kernel:system module_request;
from:
  https://android-review.googlesource.com/c/device/amlogic/yukawa/+/1217396
  //device/amlogic/yukawa/sepolicy/netd.te

  https://android-review.googlesource.com/c/device/generic/goldfish/+/1217397
  //device/generic/goldfish/sepolicy/common/netd.te

  https://android-review.googlesource.com/c/device/google/bonito-sepolicy/+/1217435
  //device/google/bonito-sepolicy/vendor/qcom/common/netd.te

  https://android-review.googlesource.com/c/device/google/crosshatch-sepolicy/+/1217398
  //device/google/crosshatch-sepolicy/vendor/qcom/common/netd.te

  https://android-review.googlesource.com/c/device/google/wahoo/+/1217436
  //device/google/wahoo/sepolicy/vendor/netd.te

  https://android-review.googlesource.com/c/device/linaro/hikey/+/1217455
  //device/linaro/hikey/sepolicy/netd.te

  https://android-review.googlesource.com/c/device/ti/beagle-x15/+/1217475
  //device/ti/beagle-x15/sepolicy/netd.te

Test: builds
Signed-off-by: Maciej Żenczykowski
Change-Id: Idff03782133691ff43e49cb04544e5d1b1be922f
2020-01-24 13:07:09 +00:00
Lee Shombert
a0a4772d9f Merge "Support for more binder caches"
am: edd4726300

Change-Id: I64df7d5d8d5d382600bc3a7b5c5fa53164482996
2020-01-23 07:49:31 -08:00
Lee Shombert
edd4726300 Merge "Support for more binder caches" 2020-01-23 15:44:39 +00:00
Ryan Savitski
73391bf5ce Merge changes I8630c20e,I4aa482cf
am: a67cd2333e

Change-Id: I28b886cbf2f2fc4f9db450f0f7db02915df4b7b1
2020-01-23 07:17:06 -08:00
Ryan Savitski
845569e2e5 debug builds: allow perf profiling of most domains
As with heapprofd, it's useful to profile the platform itself on debug
builds (compared to just apps on "user" builds).

Bug: 137092007
Change-Id: I8630c20e0da9c67e4927496802a4cd9cacbeb81a
2020-01-22 22:04:02 +00:00
Ryan Savitski
67a82481f8 initial policy for traced_perf daemon (perf profiler)
The steps involved in setting up profiling and stack unwinding are
described in detail at go/perfetto-perf-android.

To summarize the interesting case: the daemon uses cpu-wide
perf_event_open, with userspace stack and register sampling on. For each
sample, it identifies whether the process is profileable, and obtains
the FDs for /proc/[pid]/{maps,mem} using a dedicated RT signal (with the
bionic signal handler handing over the FDs over a dedicated socket). It
then uses libunwindstack to unwind & symbolize the stacks, sending the
results to the central tracing daemon (traced).

This patch covers the app profiling use-cases. Splitting out the
"profile most things on debug builds" into a separate patch for easier
review.

Most of the exceptions in domain.te & coredomain.te come from the
"vendor_file_type" allow-rule. We want a subset of that (effectively all
libraries/executables), but I believe that in practice it's hard to use
just the specific subtypes, and we're better off allowing access to all
vendor_file_type files.

Bug: 137092007
Change-Id: I4aa482cfb3f9fb2fabf02e1dff92e2b5ce121a47
2020-01-22 22:04:01 +00:00
Ivailo Karamanolev
7ad4e6350f Merge "Add rules for Lights AIDL HAL"
am: 0545b44e40

Change-Id: I71e5765f17b519a16193c8d0209b61dcb8f63144
2020-01-22 13:39:26 -08:00
Ivailo Karamanolev
0545b44e40 Merge "Add rules for Lights AIDL HAL" 2020-01-22 21:34:34 +00:00
Ivailo Karamanolev
254d757289 Add rules for Lights AIDL HAL
Test: manual; yukawa and cuttlefish; adb logcat | grep -i avc
Bug: 142230898
Change-Id: I9f576511d1fc77c5f0ad3cf1b96b038b301773d7
2020-01-22 20:33:42 +01:00
Lee Shombert
097f9794f4 Support for more binder caches
Bug: 140788621

This adds keys for several planned binder caches in the system server
and in the bluetooth server.  The actual cache code is not in this
tree.

Test: created a test build that contains the actual cache code and ran
some system tests.  Verified that no protection issues were seen.

Change-Id: Ibaccb0c0ff8b127d14cf769ea4156f7d8b024bc1
2020-01-22 08:21:08 -08:00
Jeffrey Vander Stoep
1a0201f032 Merge "reland: untrusted_app_29: add new targetSdk domain"
am: db60355f94

Change-Id: Ic16d67e3ad755fda51bffaf444f2b8bb2601e04f
2020-01-22 07:04:28 -08:00
Jeffrey Vander Stoep
db60355f94 Merge "reland: untrusted_app_29: add new targetSdk domain" 2020-01-22 14:43:36 +00:00
Martijn Coenen
1460d6d8c2 Merge "Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it."
am: 28304cc43a

Change-Id: I46b9217f996fa670e9df6000d63a7cbcf31ef1c1
2020-01-22 06:37:05 -08:00
Treehugger Robot
28304cc43a Merge "Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it." 2020-01-22 14:31:47 +00:00
Martijn Coenen
e0ab03aee3 Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it.
Bug: 146419093
Test: vold can call the ioctl
Change-Id: I409b702d00bc5ef5f42f9c613d8f89195fefb800
2020-01-22 10:53:33 +01:00
Jeff Vander Stoep
1f7ae8ee3f reland: untrusted_app_29: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=30 including:
- No RTM_GETLINK on netlink route sockets.

Remove some of the repetitive descriptions in each untrusted_app_N.te
file, and instead refer to the description in
public/untrusted_app.te.

Bug: 141455849
Test: CtsSelinuxTargetSdkCurrentTestCases
Test: libcore.java.net.NetworkInterfaceTest#testGetNetworkInterfaces
Change-Id: I89553e48db3bc71f229c71fafeee9005703e5c0b
2020-01-22 09:47:53 +00:00
Alistair Delva
1bd4ac4990 Merge "recovery: Allow BLKPBSZGET on cache_block_device"
am: 3862b2778f

Change-Id: I11c9ac93c84da9755ea27c749bac8862625a665f
2020-01-21 17:42:12 -08:00
Alistair Delva
3862b2778f Merge "recovery: Allow BLKPBSZGET on cache_block_device" 2020-01-22 01:32:51 +00:00
Valerie Hau
7b2a2dff0c Whitelisting window_manager_native_boot system property
Bug: 147096935
Test: build, boot

Change-Id: Iadeefa3cfc9bb17eb19b60dbd18de047fa01b673
2020-01-21 22:54:49 +00:00
Steven Moreland
41e8d29253 Merge "More neverallows for default_android_service."
am: 64c8ddb123

Change-Id: I54336f7f52cbd19b56ea6c6584a921d655d23f71
2020-01-21 14:18:44 -08:00
Steven Moreland
64c8ddb123 Merge "More neverallows for default_android_service." 2020-01-21 21:31:57 +00:00
Ryan Savitski
0aa85a1806 Merge "Add sysprop for init's perf_event_open LSM hook check"
am: c9cc4001e4

Change-Id: I6368382ceb506893015f80eefa63a67417ea9bfb
2020-01-21 12:46:28 -08:00
Haoxiang Li
8f52ce8bea Sepolicy update for Automotive Display Service
am: 741b9cd5ac

Change-Id: I569cc5b9b628cc7ee81ad263748756010404a487
2020-01-21 12:41:11 -08:00
Ryan Savitski
c9cc4001e4 Merge "Add sysprop for init's perf_event_open LSM hook check" 2020-01-21 20:40:50 +00:00
Steven Moreland
a30464c06e More neverallows for default_android_service.
We don't want to accidentally allow this, and a neverallow also means
that the issue will be found during development, instead of review.

Fixes: 148081219
Test: compile policy only
Change-Id: I57990a2a4ab9e5988b09dae2dd6a710ce8f53800
2020-01-21 11:13:22 -08:00
Ryan Savitski
52b3d315a2 Add sysprop for init's perf_event_open LSM hook check
Written exclusively by init. Made it readable by shell for CTS, and for
easier platform debugging.

Bug: 137092007
Change-Id: Ia5b056117502c272bc7169661069d0c8020695e2
2020-01-21 19:03:33 +00:00
Haoxiang Li
741b9cd5ac Sepolicy update for Automotive Display Service
Bug: 140395359
Test: make sepolicy -j
Change-Id: Ib6ddf55210d8a8ee4868359c88e3d177edce9610
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-21 18:43:27 +00:00
Alistair Delva
07e6aa994a recovery: Allow BLKPBSZGET on cache_block_device
The comment in this file acknowledges that this is needed for "Wipe
data/cache", however it does not actually grant the permission for
cache_block_device. Add it. Fixes a denial seen on cuttlefish:

avc:  denied  { ioctl } for  pid=223 comm="mke2fs"
  path="/dev/block/vda3" dev="tmpfs" ino=486 ioctlcmd=0x127b
  scontext=u:r:recovery:s0 tcontext=u:object_r:cache_block_device:s0
  tclass=blk_file permissive=0

Bug: 146898312
Change-Id: I82b9975085c027941c970ca44dbb1a7a370295fa
2020-01-21 16:34:42 +00:00
Santiago Seifert
c5cc25ec03 Revert "untrusted_app_29: add new targetSdk domain"
am: 1d241db7e5

Change-Id: Ic7dbb89c4feca5cfca0449bbe67d6b361186ada9
2020-01-21 04:32:13 -08:00
Santiago Seifert
1d241db7e5 Revert "untrusted_app_29: add new targetSdk domain"
This reverts commit a1aa2210a9.

Reason for revert: Potential culprit for Bug b/148049462 - verifying through Forrest before revert submission

Change-Id: Ibe4fa1dee84defde324deca87d9de24a1cc2911a
2020-01-21 11:35:24 +00:00
Jeff Vander Stoep
cc7cc7b562 untrusted_app_29: add new targetSdk domain
am: a1aa2210a9

Change-Id: I28af036bc87fe7152e91c194f44045e2b71b6af5
2020-01-20 11:05:00 -08:00
Jeff Vander Stoep
a1aa2210a9 untrusted_app_29: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=30 including:
- No bind() on netlink route sockets.
- No RTM_GETLINK on netlink route sockets.

Remove some of the repetitive descriptions in each untrusted_app_N.te
file, and instead refer to the description in
public/untrusted_app.te.

Bug: 141455849
Test: CtsSelinuxTargetSdkCurrentTestCases
Change-Id: Iad4d142c0c13615b4710d378bc1feca4d125b6cc
2020-01-20 15:31:52 +01:00
Maciej Żenczykowski
56ec6f5cfc Merge "add dontaudit dnsmasq kernel:system module_request"
am: a712b3dbd3

Change-Id: I689aba6fa33734aa1ec4ff110b20391dfb625984
2020-01-19 11:20:33 -08:00
Maciej Żenczykowski
4a865b3089 add dontaudit dnsmasq kernel:system module_request
This was originally added due to:
  avc: denied { module_request } for comm="dnsmasq" kmod="netdev-bt-pan" scontext=u:r:dnsmasq:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
in wahoo specific selinux policy in commit cd761300c1cc67cb2be3e001b95317e8a865c5fe 'Allow some denials we have seen.'

This is most likely simply triggered by a race condition on attempting
to access a non existent network device 'bt-pan'.

While we've never seen this anywhere else, it could potentially happen
on any device so we might as well make this global...

Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I00f61a5fc2bfce604badf3b96f6ed808157eb78c
2020-01-18 18:22:12 -08:00
Sunil Ravi
8fc3504ac8 Merge "sepolicy(wifi): Allow keystore-wificond communication"
am: 2bde15c66b

Change-Id: I31d86ac7ae59e15ef639e5f276c595a576c5eef3
2020-01-17 17:04:30 -08:00
Sunil Ravi
2bde15c66b Merge "sepolicy(wifi): Allow keystore-wificond communication" 2020-01-18 00:57:02 +00:00
Hai Zhang
587e49e0be Merge "Add policies for permission APEX data directory."
am: 4f0bf97b41

Change-Id: I0b0829f6209582b84e02a9c499a74dbd1c428106
2020-01-17 15:52:43 -08:00
Treehugger Robot
4f0bf97b41 Merge "Add policies for permission APEX data directory." 2020-01-17 23:45:54 +00:00
Sunil Ravi
d8843d1c2e sepolicy(wifi): Allow keystore-wificond communication
Denial log:
1. 10-30 11:02:50.279  wifi  1119  1119 W HwBinder:1119_1:
type=1400 audit(0.0:113): avc: denied { transfer } for
scontext=u:r:wificond:s0 tcontext=u:r:keystore:s0
tclass=binder permissive=0

2. 01-15 16:24:04.214 W/keystore( 1007): type=1400
audit(0.0:109): avc: denied { call } for
scontext=u:r:keystore:s0 tcontext=u:r:wificond:s0
tclass=binder permissive=0

3. 01-16 12:11:19.704 W/keystore( 1021): type=1400
audit(0.0:163): avc: denied { transfer } for
scontext=u:r:keystore:s0 tcontext=u:r:wificond:s0
tclass=binder permissive=0

Bug: 143638513
Bug: 145310496
Test: Installed CA and wifi certificates and connects
to enterprise network.
No selinux denial seen from wificond and keystore.

Change-Id: I9727add13844b1ff1875e493b777e3a294e00ffa
2020-01-17 21:14:25 +00:00
Jing Ji
0542be7d19 Merge "Add rules for an unix domain socket for system_server"
am: d1b9526ea0

Change-Id: I0ceb427b6db004764b234db6939d5a40735c4390
2020-01-17 12:50:03 -08:00
Jing Ji
d1b9526ea0 Merge "Add rules for an unix domain socket for system_server" 2020-01-17 18:53:19 +00:00
Automerger Merge Worker
0dd7c6d30d Merge "Rename the binder cache key for hasSystemFeature()" am: 2af7e0a1fb
Change-Id: Ibf149b061871b27f7f7b0eb2cd3eb2f2443ead49
2020-01-17 15:35:45 +00:00
Lee Shombert
2af7e0a1fb Merge "Rename the binder cache key for hasSystemFeature()" 2020-01-17 15:24:59 +00:00
Automerger Merge Worker
ab605560e5 Use vndk_prop for old vndk properties am: 291d6b379d
Change-Id: I051e06e9b8f0a49bf8cf8b58e1f18f13ce4853a6
2020-01-17 03:26:47 +00:00