From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 5732DB422; Sat, 13 Dec 2025 21:43:15 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 7640BB40C; Sat, 13 Dec 2025 21:43:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) by atuin.qyliss.net (Postfix) with ESMTPS id C70A0B40B for ; Sat, 13 Dec 2025 21:43:10 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 684EEEC040D; Sat, 13 Dec 2025 16:43:08 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sat, 13 Dec 2025 16:43:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1765662188; x=1765748588; bh=bnMPLDfHaD nLQuxhAAXQhHGD7hgCS5tMJCIfDjNBTz0=; b=K3kt/K9Lj49pbNoFbVlNKovvJV x9MxXBBqV2jDUr++kv3VV+dkfjNwLIdOHfPB0ujjQFpNjWUymCnEazBoNausI2yQ 2UAxHDUb38crB1MJyTnNoKF7HVjwNDQHwKgus0tCIxHdhC+bS0kfzfL5f5QKzcUn xtRw7TRg532/subQ+bFWGcGovRG63iZewbBbia6zDwm43y930WITLa+0ScJ/LX3E pWqe5Woa4YQbxTAuWjtIlnLxKB+yj/JgmPIpWxWsolOba1AxP2MsdIcYET0dbSaV pc5QbM1ufDu8TAXDCuE1PaEmP+TYanL/u/q1FT+H9HBXU0H8FDnpmm/rwCbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1765662188; x=1765748588; bh=bnMPLDfHaDnLQuxhAAXQhHGD7hgCS5tMJCI fDjNBTz0=; b=cq4WsISiIiWXYzklT3MwBaI6041jtw8kaHWg+pZmtjkhBvV8Aqv vfLmrA4fji76yW5bvmYTYT59GKavuNqi5WKFJWuIYS6JWmje573OBUO0BayCFuJ1 vXewftV/hYARCcDFwAIkx+f2eeaDsTIXV3GH3cOx+FK0QcOOTr0QpXEmjxALYZXa O32SAUB9MdbQBUNTZA3w5+hXHSdJ3RZMKG/pnGLEgLz4JdA5Uai0Kz2vBsG52kOO 9yjk67I43LawyfBk1JpyqawR0W9qirwWRMJwnpPkJOLERU5KVsw27ll+ymdcdv9q yNRlvWgpyAefhHqYUkN0prgZ/YQqYj2Z1oQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 13 Dec 2025 16:43:07 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id C9C677AAD748; Sat, 13 Dec 2025 22:42:56 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH] host/roots: Sandbox xdg-desktop-portal-spectrum-host In-Reply-To: References: <20251212-sandbox-dbus-portal-v1-1-522705202482@gmail.com> <87o6o25h6y.fsf@alyssa.is> Date: Sat, 13 Dec 2025 22:42:54 +0100 Message-ID: <87ikea5a8x.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: 3DCO4ITUHWK7Q2MOQWAQDQXON4ZDC6RG X-Message-ID-Hash: 3DCO4ITUHWK7Q2MOQWAQDQXON4ZDC6RG X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 12/13/25 14:12, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> It is quite possible that these Landlock rules are unnecessarily >>> permissive, but all of the paths to which read and execute access is >>> granted are part of the root filesystem and therefore assumed to be >>> public knowledge. Removing access from any of them would only increase >>> the risk of accidental breakage in the future, and would not provide any >>> security improvements. seccomp *could* provide some improvements, but >>> the effort needed is too high for now. >>> >>> Signed-off-by: Demi Marie Obenour >>> --- >>> .../template/data/service/xdg-desktop-portal-spectrum-host/run | 8 = ++++++++ >>> 1 file changed, 8 insertions(+) >>=20 >> Are you sure this is working as intended? There's no rule allowing >> access to Cloud Hypervisor's VSOCK socket, and yet it still seems to be >> able to access that. Don't you need to set a rule that *restricts* >> filesystem access and then add holes? Did you ever see this deny >> anything? > > 'man 1 setpriv' states that '--landlock-access fs' blocks all > filesystem access unless a subsequent --landlock-rule permits it. > I tried running with no --landlock-rule flags and the execve of > xdg-desktop-portal-spectrum-host failed as expected. > > The socket is passed over stdin, and I'm pretty sure Landlock > doesn't restrict using an already-open file descriptor. > xdg-desktop-portal-spectrum-host does need to find the path to the > socket, but I don't think it ever accesses that path. I've been looking into this a bit myself, and from what I can tell Landlock just doesn't restrict connecting to sockets at all, even if they're inside directories that would otherwise be inaccessible. It's able to connect to both Cloud Hypervisor's VSOCK socket and the D-Bus socket even with a maximally restrictive landlock rule. So you were right after all, sorry! I will still go ahead with doing this in the program though, since I already got that far. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaT3d3wAKCRCZddwkt31p FYxWAP9pLvaTaUzvZWze1iAw+DB4ozKNby2kZ2uHoj9l1HNPXgD/dY8hs+jtUhAz kj8i0qdKUvlZziJ5yvIsblELI6WZDQo= =ix0+ -----END PGP SIGNATURE----- --=-=-=--