Title: [261523] branches/safari-609-branch/Source/WebKit
Revision
261523
Author
[email protected]
Date
2020-05-11 17:22:05 -0700 (Mon, 11 May 2020)

Log Message

Cherry-pick r261024. rdar://problem/62978260

    [IPC hardening] createMessageDecoder() needs a validity check
    <https://webkit.org/b/211260>
    <rdar://problem/61914087>

    Reviewed by Darin Adler.

    * Platform/IPC/cocoa/ConnectionCocoa.mm:
    (IPC::createMessageDecoder):
    - Add validity check and early return for
      `numDescriptors`.

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

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (261522 => 261523)


--- branches/safari-609-branch/Source/WebKit/ChangeLog	2020-05-12 00:22:03 UTC (rev 261522)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog	2020-05-12 00:22:05 UTC (rev 261523)
@@ -1,5 +1,36 @@
 2020-05-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r261024. rdar://problem/62978260
+
+    [IPC hardening] createMessageDecoder() needs a validity check
+    <https://webkit.org/b/211260>
+    <rdar://problem/61914087>
+    
+    Reviewed by Darin Adler.
+    
+    * Platform/IPC/cocoa/ConnectionCocoa.mm:
+    (IPC::createMessageDecoder):
+    - Add validity check and early return for
+      `numDescriptors`.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-05-01  David Kilzer  <[email protected]>
+
+            [IPC hardening] createMessageDecoder() needs a validity check
+            <https://webkit.org/b/211260>
+            <rdar://problem/61914087>
+
+            Reviewed by Darin Adler.
+
+            * Platform/IPC/cocoa/ConnectionCocoa.mm:
+            (IPC::createMessageDecoder):
+            - Add validity check and early return for
+              `numDescriptors`.
+
+2020-05-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r260832. rdar://problem/62978877
 
     [Mac] Adopt kMTSupportNotification_ShouldPlayHDRVideoChanged notification

Modified: branches/safari-609-branch/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm (261522 => 261523)


--- branches/safari-609-branch/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm	2020-05-12 00:22:03 UTC (rev 261522)
+++ branches/safari-609-branch/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm	2020-05-12 00:22:05 UTC (rev 261523)
@@ -417,6 +417,8 @@
     mach_msg_body_t* body = reinterpret_cast<mach_msg_body_t*>(header + 1);
     mach_msg_size_t numDescriptors = body->msgh_descriptor_count;
     ASSERT(numDescriptors);
+    if (!numDescriptors)
+        return nullptr;
 
     uint8_t* descriptorData = reinterpret_cast<uint8_t*>(body + 1);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to