From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4M1LOP4cb2B+DgEAgWs5BA (envelope-from ) for ; Thu, 08 Apr 2021 17:10:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OMg2Mv4cb2B7EAAAB5/wlQ (envelope-from ) for ; Thu, 08 Apr 2021 15:10:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 399ECC4D9 for ; Thu, 8 Apr 2021 17:10:54 +0200 (CEST) Received: from localhost ([::1]:36624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUWJ3-0000cd-CY for larch@yhetil.org; Thu, 08 Apr 2021 11:10:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUWIE-0000Kq-WC for bug-guix@gnu.org; Thu, 08 Apr 2021 11:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUWIE-0002K9-OH for bug-guix@gnu.org; Thu, 08 Apr 2021 11:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUWIE-0005m8-JO for bug-guix@gnu.org; Thu, 08 Apr 2021 11:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47628: webkitgtk-2.32.0 fails to launch without /usr/bin Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 08 Apr 2021 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47628 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner , Guillaume Le Vaillant Received: via spool by 47628-submit@debbugs.gnu.org id=B47628.161789456522131 (code B ref 47628); Thu, 08 Apr 2021 15:10:02 +0000 Received: (at 47628) by debbugs.gnu.org; 8 Apr 2021 15:09:25 +0000 Received: from localhost ([127.0.0.1]:47982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUWHc-0005km-Lz for submit@debbugs.gnu.org; Thu, 08 Apr 2021 11:09:25 -0400 Received: from world.peace.net ([64.112.178.59]:51176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUWHY-0005kO-4O; Thu, 08 Apr 2021 11:09:21 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUWHQ-0000Wj-MN; Thu, 08 Apr 2021 11:09:12 -0400 From: Mark H Weaver In-Reply-To: <87blaoonha.fsf@netris.org> References: <87tuojni9a.fsf@netris.org> <87r1jnnhfi.fsf@netris.org> <87lf9upmwb.fsf@yamatai> <87h7kgoo2z.fsf@netris.org> <87blaoonha.fsf@netris.org> Date: Thu, 08 Apr 2021 11:07:31 -0400 Message-ID: <878s5solv5.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47628@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617894654; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=vpdCsHfRAEozNBy8GsjgCGI8JA3XbhrHDvLM+NL1BSo=; b=PtfMN/+hzhmcde9uG+QNBbzVMr75sVJuAAH6T54XNAUMnhp9ARYQ2Wqq9gpkMaC0rpzMwu jGAUTwlBkc68PVV9y2ZjsMKs9m023gH8hbwx6aWz7NvEtqHAJS7cn6GVlPyglRZmfhEu15 EZl9A5tAn07c93NSY5BYR5m4nc+lVHeUY7lhqRMGw2AZvnES1D784n/MoDOnnY9BY4swjz bOmpi1GBfr6bqaq9YUNO97q5ltsAmnJDmSatAfZ7d4rab8vJKEeXnbyyvYcsxwo3JVcdzt DeZ06X0y9SHXSogUPEMGNB3TUcJQ0gFafSxHjr3iKTl08FJNRg8vTlQRHWfoqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617894654; a=rsa-sha256; cv=none; b=FkcPSpeuyAw2NA5wSAotCLthci5YACwEoN0+1aw8jJFhHpvDa+lR6ewS1wQhj9/tx4g3eS IcbcsQJEvK1aiA5u7eDkpjR8N8h5TPxj9DLlg9DVSMg/lSNI/+KdqmwVL8geaG6dPW1Xnm 9dbKISH0hPdH8KplLWCwnbr6nF3RjmKMTHUZOhWBUMLH3HdUFNBp1pdvO8bcZ1Cy4cMF5n 0nr1js2KWHGt3D2DYBdM23E+gAySctBzhrZE/4nOGEwH6jaXCi3FXQb9d02UqnpgdgVe+n bhV2juO1mNVEujTjAwDJd7g31bo3ZrNY7Tmz3gKKR1o8EBWaDYHWIiVHycNkZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 399ECC4D9 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: PjNR14SjBdza I suspect that the relevant bit that needs to be changed is line 779 of the following file in the webkitgtk-2.32.0 source code: Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp Most likely, that line can simply be deleted. Here's the relevant excerpt, with line 779 marked by "==>": --8<---------------cut here---------------start------------->8--- GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const ProcessLauncher::LaunchOptions& launchOptions, char** argv, GError **error) { ASSERT(launcher); // For now we are just considering the network process trusted as it // requires a lot of access but doesn't execute arbitrary code like // the WebProcess where our focus lies. if (launchOptions.processType == ProcessLauncher::ProcessType::Network) return adoptGRef(g_subprocess_launcher_spawnv(launcher, argv, error)); const char* runDir = g_get_user_runtime_dir(); Vector sandboxArgs = { "--die-with-parent", "--unshare-pid", "--unshare-uts", // We assume /etc has safe permissions. // At a later point we can start masking privacy-concerning files. "--ro-bind", "/etc", "/etc", "--dev", "/dev", "--proc", "/proc", "--tmpfs", "/tmp", "--unsetenv", "TMPDIR", "--dir", runDir, "--setenv", "XDG_RUNTIME_DIR", runDir, "--symlink", "../run", "/var/run", "--symlink", "../tmp", "/var/tmp", "--ro-bind", "/sys/block", "/sys/block", "--ro-bind", "/sys/bus", "/sys/bus", "--ro-bind", "/sys/class", "/sys/class", "--ro-bind", "/sys/dev", "/sys/dev", "--ro-bind", "/sys/devices", "/sys/devices", "--ro-bind-try", "/usr/share", "/usr/share", "--ro-bind-try", "/usr/local/share", "/usr/local/share", "--ro-bind-try", DATADIR, DATADIR, // Bind mount the store inside the WebKitGTK sandbox. "--ro-bind", "@storedir@", "@storedir@", // We only grant access to the libdirs webkit is built with and // guess system libdirs. This will always have some edge cases. "--ro-bind-try", "/lib", "/lib", "--ro-bind-try", "/usr/lib", "/usr/lib", "--ro-bind-try", "/usr/local/lib", "/usr/local/lib", "--ro-bind-try", LIBDIR, LIBDIR, "--ro-bind-try", "/lib64", "/lib64", "--ro-bind-try", "/usr/lib64", "/usr/lib64", "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64", "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR, }; if (launchOptions.processType == ProcessLauncher::ProcessType::DBusProxy) { sandboxArgs.appendVector(Vector({ ==> "--ro-bind", "/usr/bin", "/usr/bin", // This is a lot of access, but xdg-dbus-proxy is trusted so that's OK. It's sandboxed // only because we have to mount .flatpak-info in its mount namespace. The user rundir // is where we mount our proxy socket. "--bind", runDir, runDir, })); } else { // xdg-dbus-proxy needs access to host abstract sockets to connect to the a11y bus. Secure // host services must not use abstract sockets. Otherwise, only the network process should // have network access, and the network process is not sandboxed at all. sandboxArgs.appendVector(Vector({ "--unshare-net" })); } --8<---------------cut here---------------end--------------->8--- Mark