[webkit-changes] [WebKit/WebKit] 23af62: [WPE][GTK] IPC socket should use SOCK_CLOEXEC on L...
Michael Catanzaro
noreply at github.com
Thu Jul 11 06:45:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 23af623a3a7e6b6458b1f51cf2af9c2fe77b30e8
https://github.com/WebKit/WebKit/commit/23af623a3a7e6b6458b1f51cf2af9c2fe77b30e8
Author: Michael Catanzaro <mcatanzaro at redhat.com>
Date: 2024-07-11 (Thu, 11 Jul 2024)
Changed paths:
M Source/WTF/wtf/UniStdExtras.h
M Source/WTF/wtf/playstation/UniStdExtrasPlayStation.cpp
M Source/WTF/wtf/unix/UniStdExtrasUnix.cpp
M Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp
Log Message:
-----------
[WPE][GTK] IPC socket should use SOCK_CLOEXEC on Linux
https://bugs.webkit.org/show_bug.cgi?id=275690
Reviewed by Carlos Garcia Campos.
Instead of creating the IPC socket without CLOEXEC and then setting it
afterwards if requested, instead create the socket with CLOEXEC and
unset it afterwards if not requested. This closes the race window where
the socket may leak into a subprocess spawned by another thread (which
seems unlikely, but you never know what applications will do).
In practice, this ensures the server socket will never leak to a
subprocess. The client socket might still get leaked because CLOEXEC has
to get unset at some point for the child process to receive the socket.
* Source/WTF/wtf/UniStdExtras.h:
* Source/WTF/wtf/playstation/UniStdExtrasPlayStation.cpp:
(WTF::unsetCloseOnExec):
* Source/WTF/wtf/unix/UniStdExtrasUnix.cpp:
(WTF::unsetCloseOnExec):
* Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::createPlatformConnection):
Canonical link: https://commits.webkit.org/280858@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list