Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 263f9383d189c980600d59b16e3df5a350a2f3d3
https://github.com/WebKit/WebKit/commit/263f9383d189c980600d59b16e3df5a350a2f3d3
Author: Chris Dumez <[email protected]>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M Source/JavaScriptCore/inspector/remote/RemoteInspector.h
M Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
M Source/WTF/wtf/text/CStringView.h
M Source/WebCore/Modules/webtransport/WebTransport.cpp
M Source/WebCore/Modules/webtransport/WebTransportSession.h
M Source/WebCore/Modules/webtransport/WorkerWebTransportSession.cpp
M Source/WebCore/Modules/webtransport/WorkerWebTransportSession.h
M Source/WebCore/Scripts/generate-log-declarations.py
M Source/WebCore/loader/EmptyClients.cpp
M Source/WebCore/platform/LogMessages.in
M Source/WebCore/platform/graphics/gbm/DRMDevice.h
M Source/WebCore/platform/graphics/gbm/GBMDevice.cpp
M Source/WebCore/platform/graphics/gbm/GBMDevice.h
M Source/WebCore/platform/graphics/vulkan/VulkanTypes.cpp
M Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
M Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp
M Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h
M
Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.messages.in
M
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm
M Source/WebKit/Platform/LogMessages.in
M Source/WebKit/Scripts/generate-derived-log-sources.py
M Source/WebKit/Scripts/webkit/opaque_ipc_types.tracking.in
M Source/WebKit/Shared/API/glib/WebKitUserMessage.cpp
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
M Source/WebKit/Shared/WebProcessCreationParameters.h
M Source/WebKit/Shared/WebProcessCreationParameters.serialization.in
M Source/WebKit/Shared/gbm/DRMDevice.serialization.in
M Source/WebKit/Shared/glib/CoreIPCGTlsCertificate.cpp
M Source/WebKit/Shared/glib/CoreIPCGTlsCertificate.h
M Source/WebKit/Shared/glib/CoreIPCGTlsCertificate.serialization.in
M Source/WebKit/Shared/glib/CoreIPCGVariant.cpp
M Source/WebKit/Shared/glib/CoreIPCGVariant.h
M Source/WebKit/Shared/glib/CoreIPCGVariant.serialization.in
M Source/WebKit/Shared/glib/UserMessage.h
M Source/WebKit/Shared/glib/UserMessage.serialization.in
M Source/WebKit/UIProcess/API/glib/WebKitInitialize.cpp
M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
M Source/WebKit/UIProcess/glib/DRMMainDevice.cpp
M Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
M
Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtension.cpp
M Source/WebKit/WebProcess/Network/WebTransportSession.cpp
M Source/WebKit/WebProcess/Network/WebTransportSession.h
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
M Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
Log Message:
-----------
Stop sending untyped CString over IPC
https://bugs.webkit.org/show_bug.cgi?id=324690
Reviewed by Patrick Griffis.
Every IPC-visible CString becomes a UTF8CString and the WTF::CString
argument coder is deleted, so an untyped CString can no longer cross a
process boundary.
Nine fields are declared in serialization.in and messages.in files: the
WebTransport close reason, the WPE implementation library name and the
remote inspector address in WebProcessCreationParameters, the GLib
UserMessage name, the CoreIPCGTlsCertificate PKCS#11 URI, the
CoreIPCGVariant type string, and the two DRMDevice node paths. All are
already UTF-8 at both ends; the close reason is passed through
trimToValidUTF8Length1024() before it is sent.
The other 41 are the arguments of the forwardable log messages in the two
LogMessages.in files, which RELEASE_LOG_*_FORWARDABLE hands to LogStream.
Those take a CStringView on the sending side, so nothing is allocated when
no log client is installed and the argument goes straight to os_log(). The
IPC message and the receiver keep an owning UTF8CString: over streaming
IPC a decoded span points into shared memory that the sending process can
still write, so a view there would reintroduce the TOCTOU fixed in
315201@main. generate-log-declarations.py grows a string_mode parameter to
express that difference between the two sides.
Deleting the coder also removes its std::span<const char> entry from
opaque_ipc_types.tracking.in.
* Source/JavaScriptCore/inspector/remote/RemoteInspector.h:
* Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp:
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::setInspectorServerAddress):
(Inspector::RemoteInspector::inspectorServerAddress):
* Source/WTF/wtf/text/CStringView.h:
* Source/WebCore/Modules/webtransport/WebTransport.cpp:
(WebCore::trimToValidUTF8Length1024):
* Source/WebCore/Modules/webtransport/WebTransportSession.h:
* Source/WebCore/Modules/webtransport/WorkerWebTransportSession.cpp:
(WebCore::WorkerWebTransportSession::terminate):
* Source/WebCore/Modules/webtransport/WorkerWebTransportSession.h:
* Source/WebCore/Scripts/generate-log-declarations.py:
(get_arguments_string):
* Source/WebCore/loader/EmptyClients.cpp:
* Source/WebCore/platform/LogMessages.in:
* Source/WebCore/platform/graphics/gbm/DRMDevice.h:
* Source/WebCore/platform/graphics/gbm/GBMDevice.cpp:
(WebCore::GBMDevice::create):
* Source/WebCore/platform/graphics/gbm/GBMDevice.h:
* Source/WebCore/platform/graphics/vulkan/VulkanTypes.cpp:
(WebCore::Vulkan::drmFileDescriptorForGBMDisplay):
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::doReleaseLogging):
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp:
(WebKit::NetworkTransportSession::terminate):
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h:
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.messages.in:
*
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm:
(WebKit::NetworkTransportSession::terminate):
* Source/WebKit/Platform/LogMessages.in:
* Source/WebKit/Scripts/generate-derived-log-sources.py:
(generate_messages_file):
(generate_log_client_declarations_file):
(generate_message_receiver_declarations_file):
(generate_message_receiver_implementations_file):
* Source/WebKit/Scripts/webkit/opaque_ipc_types.tracking.in:
* Source/WebKit/Shared/API/glib/WebKitUserMessage.cpp:
(webkitUserMessageSetProperty):
(webkit_user_message_get_name):
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:
* Source/WebKit/Shared/WebProcessCreationParameters.h:
* Source/WebKit/Shared/WebProcessCreationParameters.serialization.in:
* Source/WebKit/Shared/gbm/DRMDevice.serialization.in:
* Source/WebKit/Shared/glib/CoreIPCGTlsCertificate.cpp:
(WebKit::CoreIPCGTlsCertificate::CoreIPCGTlsCertificate):
(WebKit::CoreIPCGTlsCertificate::operator GRefPtr<GTlsCertificate> const):
* Source/WebKit/Shared/glib/CoreIPCGTlsCertificate.h:
(WebKit::CoreIPCGTlsCertificate::privateKeyPKCS11Uri const):
* Source/WebKit/Shared/glib/CoreIPCGTlsCertificate.serialization.in:
* Source/WebKit/Shared/glib/CoreIPCGVariant.cpp:
(WebKit::CoreIPCGVariant::CoreIPCGVariant):
(WebKit::CoreIPCGVariant::operator GRefPtr<GVariant> const):
* Source/WebKit/Shared/glib/CoreIPCGVariant.h:
(WebKit::CoreIPCGVariant::typeString const):
* Source/WebKit/Shared/glib/CoreIPCGVariant.serialization.in:
* Source/WebKit/Shared/glib/UserMessage.h:
(WebKit::UserMessage::UserMessage):
* Source/WebKit/Shared/glib/UserMessage.serialization.in:
* Source/WebKit/UIProcess/API/glib/WebKitInitialize.cpp:
(WebKit::initializeRemoteInspectorServer):
* Source/WebKit/UIProcess/glib/DRMMainDevice.cpp:
(WebKit::drmFirstDeviceWithRenderNode):
(WebKit::drmPrimaryNodeDeviceForRenderNodeDevice):
(WebKit::drmRenderNodeDeviceFromPrimaryNodeDevice):
(WebKit::drmPrimaryNodeDevice):
(WebKit::drmRenderNodeDevice):
(WebKit::drmMainDevice):
*
Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtension.cpp:
(webkit_web_process_extension_send_message_to_context):
* Source/WebKit/WebProcess/Network/WebTransportSession.cpp:
(WebKit::WebTransportSession::terminate):
* Source/WebKit/WebProcess/Network/WebTransportSession.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
Canonical link: https://commits.webkit.org/321563@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications