From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Newsgroups: gmane.emacs.bugs Subject: bug#45198: 28.0.50; Sandbox mode Date: Mon, 5 Jul 2021 21:12:39 +0200 Message-ID: References: <5818DFAA-3A9C-4335-BAAF-1227A02C290A@acm.org> <83o8ecvnok.fsf@gnu.org> <83lf9gvktv.fsf@gnu.org> <83im4kvi4e.fsf@gnu.org> <83blacun30.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28356"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 45198@debbugs.gnu.org, stefan@marxist.se, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 21:13:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0U1n-0007DK-9U for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 21:13:11 +0200 Original-Received: from localhost ([::1]:59790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0U1m-0003R7-6d for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 15:13:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0U1e-0003OH-PF for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 15:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0U1e-0007jA-H0 for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 15:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0U1e-0003kB-A4 for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 15:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jul 2021 19:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45198 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45198-submit@debbugs.gnu.org id=B45198.162551236814370 (code B ref 45198); Mon, 05 Jul 2021 19:13:02 +0000 Original-Received: (at 45198) by debbugs.gnu.org; 5 Jul 2021 19:12:48 +0000 Original-Received: from localhost ([127.0.0.1]:46672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0U1Q-0003ji-AR for submit@debbugs.gnu.org; Mon, 05 Jul 2021 15:12:48 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:37732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0U1O-0003jU-3P for 45198@debbugs.gnu.org; Mon, 05 Jul 2021 15:12:46 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id i94so23249309wri.4 for <45198@debbugs.gnu.org>; Mon, 05 Jul 2021 12:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ncFwJWnsSClosJvOKRMYJlhpIUUNxuLOLs7ScB0vtsA=; b=sT7mQgLF/ikOJZtO1nIzzLJADcIIY/GrRpveEHiAuz14uKr5VpJ7kDo90MNYzxBrQ0 f/SI5yfAMgeTyji8GVkl7keXADW/K78+MfbQyjic+NlWQcwNvU88rXHeeQbe+9oGcDbZ EL5lbWOYM3QcSUFfd7b2Y0dwVRTaMsRw+1OJt56eJKA17tT2c63DjoSVTLE2WmgWgIHA BbRFR2+3TOsiy22YnzX9++l50eBGScBfYO7lvfdfj+xNS/fQuQ9OhxHC/aC0VgXEZ5Iz knOvr6MgBqlp0UZr9LJZx+WAKX+p/CTMF1eP6TPe/cqzwCII6Ll/QJtdErdLrwVQ28/h wc7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ncFwJWnsSClosJvOKRMYJlhpIUUNxuLOLs7ScB0vtsA=; b=eL6c02C6QYxvBPrzkGxsZJgtIJaONTj+bYgyELkz71YYtar8Gq1UI3U6D7fl/tanP/ 1hZ5lYEaQoJmGtooC/Qf5eFI41iK9xOjibXd9jK8By+tvxMUUZ6LT5CzmxOjjKIS+4Dn 1FIF5GY+JGE1CsZz+5IY8RTX1WBHQf5Segdw10cfYjQn7qE+5hN2HAKc9qZXB/HAP6oM CoZOVFSxVVizBmtSZoPym2mFL9fztOMJ6o/40EKPkR4S1c6O/6WFla15LzQ1SP/ijII+ aGRiIpl14/Zm9ws9BD5iOqAr+u2F4MhgpJA1iL3/mZUbQwZ6GSIXy64f8esPlucH7jqu qr0Q== X-Gm-Message-State: AOAM532v2965CLIgtWVX54f096a/Cea085DfrjxmkNrDyGCoK45dgtX0 3KMZNpzmZzCci7V7GSnDpV0= X-Google-Smtp-Source: ABdhPJzINWIMMPIWuPmtp2CA2y5btG8K1l3XFL2Bw5+fR9ADUIh1wIhJOjnfCIs23VOGYHskK1cQJQ== X-Received: by 2002:a5d:4282:: with SMTP id k2mr12469261wrq.6.1625512360399; Mon, 05 Jul 2021 12:12:40 -0700 (PDT) Original-Received: from smtpclient.apple ([46.128.198.100]) by smtp.gmail.com with ESMTPSA id a186sm350802wme.25.2021.07.05.12.12.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jul 2021 12:12:40 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.100.0.2.22) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209486 Archived-At: > Am 18.04.2021 um 16:25 schrieb Stefan Monnier = : >=20 >>> The whole point of the sandboxing exercise is so as to be able to = have >>> flymake-mode in the hook without exposing yourself to >>> these vulnerabilities. >>=20 >> So we are going to introduce all this non-trivial machinery into = Emacs >> just to solve the Flymake use case? Is that reasonable from the >> project management POV, in your eyes? >=20 > To the extent that this machinery will only be used by those rare = places > that need it (e.g. flymake), yes, as long as the low-level interface > (e.g. the code that added the support for the `--seccomp` argument) is > simple enough. >=20 > BTW, in the context of GNU/Linux, an alternative to `--seccomp` is to > require the `bwrap` tool (that's what I use in the `elpa-admin.el` > scripts to run makefile rules from ELPA packages). >=20 I wouldn't call it an alternative, they are rather complementary = approaches, and I think we should require both for a sandbox that we = consider "hard enough". The --seccomp flag doesn't set up namespaces; = that's rather subtle and best done out-of-process by a dedicated tool = like bwrap. On the other hand, setting up a seccomp filter = out-of-process has the disadvantage that it needs to allow execve, = thereby increasing the attack surface quite a bit. The sandboxing I'd = have in mind would be a combination of bwrap (with namespaces and a = seccomp filter that allows execve) and Emacs's own seccomp filter = (banning execve).=