From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45198: 28.0.50; Sandbox mode Date: Sat, 17 Apr 2021 21:15:40 +0300 Message-ID: <83lf9gvktv.fsf@gnu.org> References: <5818DFAA-3A9C-4335-BAAF-1227A02C290A@acm.org> <83o8ecvnok.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38635"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, mattiase@acm.org, 45198@debbugs.gnu.org, stefan@marxist.se, p.stephani2@gmail.com, joaotavora@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 17 20:17:12 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 1lXpVH-0009wM-Ik for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Apr 2021 20:17:11 +0200 Original-Received: from localhost ([::1]:56076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXpVG-0002rK-IX for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Apr 2021 14:17:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXpV8-0002rA-Dx for bug-gnu-emacs@gnu.org; Sat, 17 Apr 2021 14:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXpV8-0007Qe-6d for bug-gnu-emacs@gnu.org; Sat, 17 Apr 2021 14:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXpV8-000134-25 for bug-gnu-emacs@gnu.org; Sat, 17 Apr 2021 14:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Apr 2021 18:17: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.16186833683964 (code B ref 45198); Sat, 17 Apr 2021 18:17:02 +0000 Original-Received: (at 45198) by debbugs.gnu.org; 17 Apr 2021 18:16:08 +0000 Original-Received: from localhost ([127.0.0.1]:44513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXpUC-00011i-DZ for submit@debbugs.gnu.org; Sat, 17 Apr 2021 14:16:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXpUA-000117-4R for 45198@debbugs.gnu.org; Sat, 17 Apr 2021 14:16:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37956) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXpU3-0006nx-GT; Sat, 17 Apr 2021 14:15:55 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2547 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lXpU2-0005EH-FX; Sat, 17 Apr 2021 14:15:55 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 17 Apr 2021 13:53:34 -0400) 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:204241 Archived-At: > From: Stefan Monnier > Cc: mattiase@acm.org, joaotavora@gmail.com, p.stephani2@gmail.com, > stefan@marxist.se, 45198@debbugs.gnu.org, alan@idiocy.org > Date: Sat, 17 Apr 2021 13:53:34 -0400 > > >> My primary target is `elisp-flymake--batch-compile-for-flymake`. > > What does that mean in practice? what does that "target" require? > > It needs to take untrusted ELisp code and run it (with no need for user > interaction) in a way that doesn't introduce any security risk. That's too general to allow any meaningful discussion, in particular whether seccomp could be the basis for satisfying those requirements. > Currently the code starts a new Emacs process in batch mode and lets it > do whatever it wants, with all the security problems this entails. > > Normally, this untrusted ELisp code (the one present within > `eval-when-compile` and macros defined within the file) limits itself to > quite simple sexp manipulation, so the sandboxing can be quite > restrictive, disallowing things like user interaction, uses of > subprocesses, or writing to files. How is this different from byte-compiling some code, e.g. one downloaded from some elpa?