Title: [276651] trunk/Source/WebKit
Revision
276651
Author
[email protected]
Date
2021-04-27 11:52:05 -0700 (Tue, 27 Apr 2021)

Log Message

[IPC Hardening] Make sure IPC::Decoder constructors consistently call markInvalid() when decoding fails
https://bugs.webkit.org/show_bug.cgi?id=225110
<rdar://76547775>

Reviewed by Darin Adler.

One of the IPC::Decoder constructors was failing to call markInvalid() after failing to
decoder the message name.

* Platform/IPC/Decoder.cpp:
(IPC::m_destinationID):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (276650 => 276651)


--- trunk/Source/WebKit/ChangeLog	2021-04-27 18:50:26 UTC (rev 276650)
+++ trunk/Source/WebKit/ChangeLog	2021-04-27 18:52:05 UTC (rev 276651)
@@ -1,5 +1,19 @@
 2021-04-27  Chris Dumez  <[email protected]>
 
+        [IPC Hardening] Make sure IPC::Decoder constructors consistently call markInvalid() when decoding fails
+        https://bugs.webkit.org/show_bug.cgi?id=225110
+        <rdar://76547775>
+
+        Reviewed by Darin Adler.
+
+        One of the IPC::Decoder constructors was failing to call markInvalid() after failing to
+        decoder the message name.
+
+        * Platform/IPC/Decoder.cpp:
+        (IPC::m_destinationID):
+
+2021-04-27  Chris Dumez  <[email protected]>
+
         Ask LocalStorage database to free as much memory as possible on memory pressure
         https://bugs.webkit.org/show_bug.cgi?id=225109
 

Modified: trunk/Source/WebKit/Platform/IPC/Decoder.cpp (276650 => 276651)


--- trunk/Source/WebKit/Platform/IPC/Decoder.cpp	2021-04-27 18:50:26 UTC (rev 276650)
+++ trunk/Source/WebKit/Platform/IPC/Decoder.cpp	2021-04-27 18:52:05 UTC (rev 276651)
@@ -117,8 +117,10 @@
     , m_bufferDeallocator([] (const uint8_t*, size_t) { })
     , m_destinationID(destinationID)
 {
-    if (!decode(m_messageName))
+    if (!decode(m_messageName)) {
+        markInvalid();
         return;
+    }
 }
 
 Decoder::~Decoder()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to