From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Philip K." Newsgroups: gmane.emacs.bugs Subject: bug#41619: [PATCH] Mark python-shell-virtualenv-root as safe local variable Date: Tue, 16 Jun 2020 21:49:44 +0200 Message-ID: <871rmerdt3.fsf@warpmail.net> References: <87367htbaq.fsf@warpmail.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="44826"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41619@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 16 21:51:12 2020 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 1jlHby-000BUC-CG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Jun 2020 21:51:11 +0200 Original-Received: from localhost ([::1]:41826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlHbx-0000RJ-ET for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Jun 2020 15:51:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlHbq-0000R8-Hz for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2020 15:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlHbq-0001E0-7s for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2020 15:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jlHbq-0001mg-4f for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2020 15:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Philip K." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jun 2020 19:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41619-submit@debbugs.gnu.org id=B41619.15923370036786 (code B ref 41619); Tue, 16 Jun 2020 19:51:02 +0000 Original-Received: (at 41619) by debbugs.gnu.org; 16 Jun 2020 19:50:03 +0000 Original-Received: from localhost ([127.0.0.1]:49649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlHat-0001lO-D0 for submit@debbugs.gnu.org; Tue, 16 Jun 2020 15:50:03 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlHai-0001ke-Dd for 41619@debbugs.gnu.org; Tue, 16 Jun 2020 15:50:01 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0F4625C00E7; Tue, 16 Jun 2020 15:49:47 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 16 Jun 2020 15:49:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h= from:to:cc:subject:in-reply-to:date:message-id:mime-version :content-type; s=fm3; bh=bWCg8628opuHSAg2P8atpSzDIMo59sh3Nqu4XFN WWt8=; b=REjE6bz8qHkVaBMe/5zUIqTqCC66SC0MkJqE06VYzVviwyPKy1ockmc /YHznU65OSkgEz8z4SydJ6oj5KLSu06pY3bX5LCR99VZDTk1gAW+UxatFiOOPuvG xjXhW2gu/xkaBPqhPyIVjWcUIXdyGkrfMQDVyeFwHa5aABlXC7kYzBQO8NVlaY78 1c4uTfckmF4eMEsjub5+gGwm9NtkIOF0S3rNsYuZTA8YDJ8vo0GPDSyCJEcm8sCy mZwVVZYDPCquU+Rij0Ct7gqNlyZlAzU78eiXU7ja0bn5y6tDQvIMxxe36rrH2/mf Xgu9t5nb9J+/yJ5oMCUqXKBhJmX9uEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=bWCg8628opuHSAg2P 8atpSzDIMo59sh3Nqu4XFNWWt8=; b=a4+FSnCQiQacwyB8hfQdTvw+svfg1P9Sx uS8VA4bFdM2p55ro/eO8+0XnZ7mQtomu8p97KHSgy3tVIvhPfH4XPaxbPNEoeoOk NutIkR+9H4NDnk7Y1qm/8Dkwj5SGhJCJyCgNJ10z6G6Jj01RBbwRwJYtvqlE2E5/ nPHX0scOlmdBSy1Dx+QNv7etiNSEpBaHAX/kZQMcXfPdVjSg69aTLZbDC3d4L/Eb vaZMqu0RK+b7sFvkNQb0tnGqCKMPaq94eh720pxZhzzV6M5Bp7thGyr55oeZsr8Z gtbqluFOenlJB3mLkYXyIPqrAhRCo/l7h+4zCDqtXFp3OdVDseqjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejtddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujgffkfggtgesthdtredttddttdenucfhrhhomhepfdfrhhhilhhi phcumfdrfdcuoehphhhilhhiphesfigrrhhpmhgrihhlrdhnvghtqeenucggtffrrghtth gvrhhnpeehueeiffevveekteffueefkeefjeekkeekfeejleeufedtudffudfgueeigeff hfenucfkphepjeelrddvudelrdduleelrddvudehnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphhhihhlihhpseifrghrphhmrghilhdrnhgv th X-ME-Proxy: Original-Received: from localhost (p4fdbc7d7.dip0.t-ipconnect.de [79.219.199.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 877FF328005A; Tue, 16 Jun 2020 15:49:46 -0400 (EDT) In-Reply-To: <83eeqe28xt.fsf@gnu.org> (message from Eli Zaretskii on Tue, 16 Jun 2020 20:54:06 +0300) 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:182043 Archived-At: Eli Zaretskii writes: >> That would make it harder for projects to hide malicious values of >> python-shell-virtualenv-root, but it's still an attack vector in >> principle. > > Then I don't think I understand how you suggest to fix this. I don't know either, any directory with a properly configured dir-locals.el file and a bin/python executable can be exploited if the user doesn't pay attention in python-mode. As mentioned above, I agree that the best thing would be to unmark the variable as safe. I'll try to find out more on how to avoid abitrary code execution in python, and if there's some way, I would try to implement it so that the variable can be marked as safe again. -- Philip K.