From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: Closing a privilege escalation Date: Wed, 25 Apr 2018 09:25:15 -0600 Organization: XCP-1 Message-ID: <2f1d5ab7-f517-caab-749b-27217c45a995@lanl.gov> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1524669985 10769 195.159.176.226 (25 Apr 2018 15:26:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2018 15:26:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 Cc: Emacs development discussions To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 25 17:26:21 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBMJJ-0002hW-Br for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2018 17:26:21 +0200 Original-Received: from localhost ([::1]:37647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBMLQ-0001fk-2Q for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2018 11:28:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBMJL-0000mc-PY for emacs-devel@gnu.org; Wed, 25 Apr 2018 11:26:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBMJK-0006Pb-SJ for emacs-devel@gnu.org; Wed, 25 Apr 2018 11:26:23 -0400 Original-Received: from proofpoint7.lanl.gov ([204.121.3.46]:32824) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fBMJG-0006Mo-Tu; Wed, 25 Apr 2018 11:26:19 -0400 Original-Received: from pps.filterd (proofpoint7.lanl.gov [127.0.0.1]) by proofpoint7.lanl.gov (8.16.0.21/8.16.0.21) with SMTP id w3PFGwdt135382; Wed, 25 Apr 2018 09:25:16 -0600 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint7.lanl.gov with ESMTP id 2hg3pbhfu8-1; Wed, 25 Apr 2018 09:25:16 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id F06D513DDF4E; Wed, 25 Apr 2018 09:25:15 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from bismuth.lanl.gov (bismuth.lanl.gov [128.165.246.103]) by mailrelay1.lanl.gov (Postfix) with ESMTP id D034613DDC87; Wed, 25 Apr 2018 09:25:15 -0600 (MDT) In-Reply-To: Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-25_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804250144 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 204.121.3.46 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224870 Archived-At: > With some arguments, emacs started inside sudo will run the user's own > .emacs file rather than root's. This creates a known vulnerability > for privilege escalation. How does .emacs allow additional access? Anyone who can run emacs as root can run anything as root (via M-!, among many many other possibilities that cannot be countered by noexec). > For sudo-authorized users, require .emacs (and other Emacs startup > files and directories) to be owned by root. > > This won't be a big hassle for them, since > these users can sudo to edit their root-owned files. > > Do people see any problem with this? It could easily be a problem if, say, .emacs is under version control. It might also interfere with backup systems, and could be incompatible with home directories mounted in special ways (e.g., NFS). Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.