Terminate the Network / Plugin processes when receiving invalid IPC from them
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Mar 2020 20:19:07 +0000 (20:19 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Mar 2020 20:19:07 +0000 (20:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=208933
<rdar://problem/58026473>

Reviewed by Geoffrey Garen.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveInvalidMessage):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didReceiveInvalidMessage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258277 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp

index b326346..542aeab 100644 (file)
@@ -1,3 +1,16 @@
+2020-03-11  Chris Dumez  <cdumez@apple.com>
+
+        Terminate the Network / Plugin processes when receiving invalid IPC from them
+        https://bugs.webkit.org/show_bug.cgi?id=208933
+        <rdar://problem/58026473>
+
+        Reviewed by Geoffrey Garen.
+
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didReceiveInvalidMessage):
+        * UIProcess/Plugins/PluginProcessProxy.cpp:
+        (WebKit::PluginProcessProxy::didReceiveInvalidMessage):
+
 2020-03-11  Timothy Horton  <timothy_horton@apple.com>
 
         Fix the macCatalyst build after r258250
index 33c796e..3b79fe7 100644 (file)
@@ -315,6 +315,7 @@ void NetworkProcessProxy::didClose(IPC::Connection&)
 void NetworkProcessProxy::didReceiveInvalidMessage(IPC::Connection& connection, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
 {
     logInvalidMessage(connection, messageReceiverName, messageName);
+    terminate();
 }
 
 void NetworkProcessProxy::processAuthenticationChallenge(PAL::SessionID sessionID, Ref<AuthenticationChallengeProxy>&& authenticationChallenge)
index f430004..c4be166 100644 (file)
@@ -217,6 +217,7 @@ void PluginProcessProxy::didClose(IPC::Connection&)
 void PluginProcessProxy::didReceiveInvalidMessage(IPC::Connection& connection, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
 {
     logInvalidMessage(connection, messageReceiverName, messageName);
+    terminate();
 }
 
 void PluginProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier)