From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#37445: 27.0.50; Permission denied after make install Date: Fri, 20 Sep 2019 02:10:10 -0700 Organization: UCLA Computer Science Department Message-ID: References: <29b48e65-7e65-7d15-7e7e-08b3cefa26fa@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="224060"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: 37445@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 20 11:36:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBFKz-000w5S-SN for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Sep 2019 11:36:26 +0200 Original-Received: from localhost ([::1]:57154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBFKy-00064T-4L for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Sep 2019 05:36:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51853) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBF8e-0005nI-0m for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2019 05:23:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBEwQ-0006pt-GB for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2019 05:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBEwQ-0006po-EC for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2019 05:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBEwQ-0004hg-6e for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2019 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2019 09:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37445 X-GNU-PR-Package: emacs Original-Received: via spool by 37445-submit@debbugs.gnu.org id=B37445.156897062418031 (code B ref 37445); Fri, 20 Sep 2019 09:11:02 +0000 Original-Received: (at 37445) by debbugs.gnu.org; 20 Sep 2019 09:10:24 +0000 Original-Received: from localhost ([127.0.0.1]:56768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBEvo-0004gl-D3 for submit@debbugs.gnu.org; Fri, 20 Sep 2019 05:10:24 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBEvl-0004gV-L4 for 37445@debbugs.gnu.org; Fri, 20 Sep 2019 05:10:23 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 849081600B0; Fri, 20 Sep 2019 02:10:15 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id CGa_KKZLCjD7; Fri, 20 Sep 2019 02:10:14 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C68BD1600C2; Fri, 20 Sep 2019 02:10:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hNcFPdYO8x7n; Fri, 20 Sep 2019 02:10:14 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 86C5B1600B0; Fri, 20 Sep 2019 02:10:14 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166751 Archived-At: On 9/19/19 11:07 PM, Tino Calancha wrote: > > # Now launch Emacs: you will see at *Warnings* buffer > # File error: Testing file, Permission denied, /home/ec2-user/soft/emacs-master/src Thanks, I think I see the problem: Emacs is examining its source code, via the Lisp variable source-directory, a variable that is put into the dump file. But in your case the source code's permissions forbid access. This glitch suggests that there are more-serious security problems in the default Emacs install. If source-directory is (say) "/tmp/emacs-build/whatever", and /tmp/emacs-build is removed after the build, an attacker can provide a bogus source directory in place of the real one, and this could cause real problems. Fedora 30 solves this potential security problem by arranging for the Lisp variable source-directory to have a value like "/usr/share/emacs/26.2/", which is a place attackers shouldn't be able to overwrite. However, the default Emacs install doesn't do that. It installs the sources into (say) "/usr/local/share/emacs/27.0.50", but it doesn't arrange for source-directory to point there; instead, source-directory points to wherever the sources happened to be when Emacs was built, which could be in /tmp. This sounds like a configuration error in the default Emacs install, and I plan to look into why it's unsafe whereas the Fedora Emacs install is safer.