Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e85a1ea1850262cda430f44560768619cbd3f2be
https://github.com/WebKit/WebKit/commit/e85a1ea1850262cda430f44560768619cbd3f2be
Author: Chris Dumez <[email protected]>
Date: 2026-06-23 (Tue, 23 Jun 2026)
Changed paths:
M LayoutTests/ipc/coreipc.js
A
LayoutTests/ipc/register-broadcast-channel-malformed-client-origin-crash-expected.txt
A
LayoutTests/ipc/register-broadcast-channel-malformed-client-origin-crash.html
M Source/WebKit/NetworkProcess/NetworkBroadcastChannelRegistry.cpp
Log Message:
-----------
NetworkBroadcastChannelRegistry crashes on a BroadcastChannel message with a
null name
https://bugs.webkit.org/show_bug.cgi?id=317629
rdar://180280584
Reviewed by Per Arne Vollan.
NetworkBroadcastChannelRegistry uses the IPC-supplied channel name as a
HashMap<String, ...> key in registerChannel() (via ensure()) and in
unregisterChannel() / postMessage() (via find()). A compromised or
malformed WebProcess could send a null String for the name. Looking up a
null String key dereferences a null StringImpl while hashing the key
(StringHash::hash() calls key.impl()->hash()), crashing the network
process before HashTable::validateKey() ever runs.
Reject a null name with a MESSAGE_CHECK in all three endpoints, matching
the existing origin validation.
Test: ipc/register-broadcast-channel-malformed-client-origin-crash.html
* LayoutTests/ipc/coreipc.js:
(export.ArgumentSerializer):
*
LayoutTests/ipc/register-broadcast-channel-malformed-client-origin-crash-expected.txt:
Added.
*
LayoutTests/ipc/register-broadcast-channel-malformed-client-origin-crash.html:
Added.
* Source/WebKit/NetworkProcess/NetworkBroadcastChannelRegistry.cpp:
(WebKit::NetworkBroadcastChannelRegistry::registerChannel):
(WebKit::NetworkBroadcastChannelRegistry::unregisterChannel):
(WebKit::NetworkBroadcastChannelRegistry::postMessage):
Canonical link: https://commits.webkit.org/315706@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications