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#75017: 31.0.50; Untrusted user lisp files Date: Mon, 23 Dec 2024 16:29:25 +0200 Message-ID: <86ikra4gmy.fsf@gnu.org> References: <87bjx43gp7.fsf@pub.pink> <86h66w6yam.fsf@gnu.org> <86ikrb5zms.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25983"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, jm@pub.pink, monnier@iro.umontreal.ca, 75017@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 23 15:30:29 2024 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 1tPjS0-0006Xq-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Dec 2024 15:30:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPjRp-0007Qa-Mi; Mon, 23 Dec 2024 09:30:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPjRc-0007LC-I7 for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2024 09:30:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPjRc-0007Mq-05 for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2024 09:30:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=V58zpPBQgg3dVMytgtxpE1rSDjkN0UQxivsmsCpv2sk=; b=DTrRECZPIs2F4Mjb424YWQIjrNr4OveluApeaA9fjpFgDDDCEZYTHrB6vn+EVyJuztaoFh4pnKJdRu32uafa54e1UdRA68x0jAEU6+J/TleR/04UiH14eksZvYqLOLeRh9g+Aehz+S/lG9n4EFy8oTTHZ7JQWbE0TqJYpXuz2ybAOpJORreMh6GF3O8F3/+ArJvnUXqTUQLVl7zuJ3atHiUfaMu8jv3pBODR+IaGyZCQMnyzZVpnwSDe9415oY8oK1vwNVLt6Xp6tEkX98Uatig4ZzpPM2GZL/HwXswBvgCKKReQ4fCgVoxvZHn1na1y7D1LpoxMNJyoN4DWo5xc0A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPjRb-0008Oq-Ds for bug-gnu-emacs@gnu.org; Mon, 23 Dec 2024 09:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2024 14:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75017 X-GNU-PR-Package: emacs Original-Received: via spool by 75017-submit@debbugs.gnu.org id=B75017.173496418032223 (code B ref 75017); Mon, 23 Dec 2024 14:30:03 +0000 Original-Received: (at 75017) by debbugs.gnu.org; 23 Dec 2024 14:29:40 +0000 Original-Received: from localhost ([127.0.0.1]:53823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPjRD-0008Nd-Hs for submit@debbugs.gnu.org; Mon, 23 Dec 2024 09:29:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPjRA-0008NN-3x for 75017@debbugs.gnu.org; Mon, 23 Dec 2024 09:29:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPjR3-0007G5-Gv; Mon, 23 Dec 2024 09:29:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=V58zpPBQgg3dVMytgtxpE1rSDjkN0UQxivsmsCpv2sk=; b=rBMSs5i/OL9p PmL9iZ7lVuKDe8ZtrEpr9L31JIxvQo1Uj6uzQL7bbdc7IARlpXGzlQsI68Dmxw8CyKLuv/HnheSKD clgKS5IYn21XupKmOAK59M7PKIljdn5fAnCbBgM1oYvwR1IsfkzB1ZpBSatTSYC29bnNtIBmr6gwL LIcpLk/0BiMm6ckjKcWjAbblcH1QikL1B+cJAJECbRVGFtvID7qkHkCC6KvP7MHEA0H3MgBzIXvBH +S35TVvPeR731nxUJ0S5l7/G+r9vGGZT/yfQi+ZA3YveZEc3LPPJB7EnWN+pRGc2AD2kCQhog/Qdu E0fZM/YaMcXVZVgeKh7YdQ==; In-Reply-To: (message from Stefan Kangas on Mon, 23 Dec 2024 14:10:30 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297645 Archived-At: > From: Stefan Kangas > Date: Mon, 23 Dec 2024 14:10:30 +0000 > Cc: monnier@iro.umontreal.ca, jm@pub.pink, 75017@debbugs.gnu.org, > acorallo@gnu.org > > Eli Zaretskii writes: > > > So if such a file somehow materializes there, I want to know, pronto. > > First, I note that it's likely already game over if an attacker can > write to `site-init-file`, because they can then just as easily write to > your init file (or other relevant files in `load-path`) instead. > > But to do what you suggest, we would need to start with deciding under > what circumstances it is not expected to find a file in this location, > and then not just warn but refuse to load it if it meets that criteria. > I don't know how to design such criteria. > > If we can figure out a way to do that, then I agree that it would be > consistent not to treat this file as `trusted-content-p`, when it exists > unexpectedly. I think this is over-engineering. Yes, there are situations where it makes sense to trust site-init-file. No, they are not 100% of the possible situations. Which in my book means we should leave it to users to decide whether to trust that file or not.