Changeset 250231 in webkit


Ignore:
Timestamp:
Sep 23, 2019 6:59:49 AM (5 years ago)
Author:
Patrick Griffis
Message:

[GTK][WPE] Don't use prgname in dbus-proxy socket path
https://bugs.webkit.org/show_bug.cgi?id=201979

The path length for the socket is limited to 108 bytes so it is easy for a long
prgname to cause it to get truncated and fail. Since we only allow the socket
path into the sandbox the unique directory isn't necessary.

Reviewed by Michael Catanzaro.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::XDGDBusProxyLauncher::setAddress):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r250217 r250231  
     12019-09-23  Patrick Griffis  <pgriffis@igalia.com>
     2
     3        [GTK][WPE] Don't use prgname in dbus-proxy socket path
     4        https://bugs.webkit.org/show_bug.cgi?id=201979
     5
     6        The path length for the socket is limited to 108 bytes so it is easy for a long
     7        prgname to cause it to get truncated and fail. Since we only allow the socket
     8        path into the sandbox the unique directory isn't necessary.
     9
     10        Reviewed by Michael Catanzaro.
     11
     12        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
     13        (WebKit::XDGDBusProxyLauncher::setAddress):
     14
    1152019-09-23  Michael Catanzaro  <mcatanzaro@igalia.com>
    216
  • trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp

    r249487 r250231  
    3131#include <wtf/glib/GUniquePtr.h>
    3232
     33#if PLATFORM(GTK)
     34#define BASE_DIRECTORY "webkitgtk"
     35#elif PLATFORM(WPE)
     36#define BASE_DIRECTORY "wpe"
     37#endif
     38
    3339#if __has_include(<sys/memfd.h>)
    3440
     
    130136            return;
    131137
    132         GUniquePtr<char> appRunDir(g_build_filename(g_get_user_runtime_dir(), g_get_prgname(), nullptr));
     138        GUniquePtr<char> appRunDir(g_build_filename(g_get_user_runtime_dir(), BASE_DIRECTORY, nullptr));
    133139        m_proxyPath = makeProxyPath(appRunDir.get()).get();
    134140
Note: See TracChangeset for help on using the changeset viewer.