[Webkit-unassigned] [Bug 199367] [GTK][WPE] Explicitly blacklist problematic directories for sandbox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 1 09:40:51 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199367

Carlos Alberto Lopez Perez <clopez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clopez at igalia.com

--- Comment #4 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
Comment on attachment 373240
  --> https://bugs.webkit.org/attachment.cgi?id=373240
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=373240&action=review

> Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1200
> +    /* These are backend specific though the blacklist covers all for consistent support */
> +    const Vector<CString> blacklistedPrefixes = {
> +        "/tmp", /* This doesn't work with flatpak-spawn */
> +        /* The rest of these are re-created by the bwrap sandbox in both cases and don't make sense */
> +        "/sys", "/proc", "/dev",
> +    };
> +
> +    for (const CString& prefix : blacklistedPrefixes) {
> +        if (g_str_has_prefix(path, prefix.data()))
> +            return false;
> +    }

Shouldn't this paths be matched with a trailing "/"?
Otherwise if there is a path named "/system" it looks like is going to match here with "/sys" (for example), isn't it?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190701/5ddadd79/attachment-0001.html>


More information about the webkit-unassigned mailing list