Title: [253180] trunk/Source/WebCore/PAL
- Revision
- 253180
- Author
- [email protected]
- Date
- 2019-12-05 15:52:01 -0800 (Thu, 05 Dec 2019)
Log Message
[IPC] Fail PAL::SessionID decoding if the decoded integer is not a valid session ID
https://bugs.webkit.org/show_bug.cgi?id=204917
<rdar://problem/53418119>
Reviewed by Ryosuke Niwa.
Fail PAL::SessionID IPC decoding if the decoded integer is not a valid session ID.
This makes our IPC more robust to bad input and makes sure we don't try to lookup
an invalid sessionID from a HashMap as a result of a bad IPC.
* pal/SessionID.h:
(PAL::SessionID::decode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (253179 => 253180)
--- trunk/Source/WebCore/PAL/ChangeLog 2019-12-05 23:48:40 UTC (rev 253179)
+++ trunk/Source/WebCore/PAL/ChangeLog 2019-12-05 23:52:01 UTC (rev 253180)
@@ -1,3 +1,18 @@
+2019-12-05 Chris Dumez <[email protected]>
+
+ [IPC] Fail PAL::SessionID decoding if the decoded integer is not a valid session ID
+ https://bugs.webkit.org/show_bug.cgi?id=204917
+ <rdar://problem/53418119>
+
+ Reviewed by Ryosuke Niwa.
+
+ Fail PAL::SessionID IPC decoding if the decoded integer is not a valid session ID.
+ This makes our IPC more robust to bad input and makes sure we don't try to lookup
+ an invalid sessionID from a HashMap as a result of a bad IPC.
+
+ * pal/SessionID.h:
+ (PAL::SessionID::decode):
+
2019-12-04 Tim Horton <[email protected]>
Introduce a GPU process
Modified: trunk/Source/WebCore/PAL/pal/SessionID.h (253179 => 253180)
--- trunk/Source/WebCore/PAL/pal/SessionID.h 2019-12-05 23:48:40 UTC (rev 253179)
+++ trunk/Source/WebCore/PAL/pal/SessionID.h 2019-12-05 23:52:01 UTC (rev 253180)
@@ -98,9 +98,8 @@
{
Optional<uint64_t> sessionID;
decoder >> sessionID;
- if (!sessionID)
+ if (!sessionID || !isValidSessionIDValue(*sessionID))
return WTF::nullopt;
- ASSERT(isValidSessionIDValue(*sessionID));
return SessionID { *sessionID };
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes