From 3d043294e07f76a69dd72a9c74c95a08fe6d41bd Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 7 Nov 2016 17:01:34 -0700 Subject: Detect non-oneway calls leaving system_server. To protect system stability, any Binder calls leaving the system_server must carefully be performed using FLAG_ONEWAY (or the 'oneway' verb in AIDL) which prevents the call from blocking indefinitely on the remote process. Allow blocking calls to a handful of known-safe interfaces. Test: builds, boots, runs with minimal logs triggered Bug: 32715088 Change-Id: I7754a829564fdbf610c02303f7c6aae908834b61 --- service/java/com/android/server/wifi/WifiStateMachine.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 8b950003e..42ab9d1f2 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -3449,6 +3449,8 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss if (clientInterface == null) { Log.e(TAG, "Could not get IClientInterface instance from wificond"); return null; + } else { + Binder.allowBlocking(clientInterface.asBinder()); } return clientInterface; @@ -3468,6 +3470,8 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss if (apInterface == null) { Log.e(TAG, "Could not get IApInterface instance from wificond"); return null; + } else { + Binder.allowBlocking(apInterface.asBinder()); } if (!mWifiNative.startHal()) { -- cgit v1.2.3